]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/file/FileMapAccessor.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / accessor / file / FileMapAccessor.java
diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/file/FileMapAccessor.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/file/FileMapAccessor.java
new file mode 100644 (file)
index 0000000..7ca2218
--- /dev/null
@@ -0,0 +1,53 @@
+/*******************************************************************************\r
+ *  Copyright (c) 2010 Association for Decentralized Information Management in\r
+ *  Industry THTH ry.\r
+ *  All rights reserved. This program and the accompanying materials\r
+ *  are made available under the terms of the Eclipse Public License v1.0\r
+ *  which accompanies this distribution, and is available at\r
+ *  http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ *  Contributors:\r
+ *      VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.databoard.accessor.file;
+
+import java.util.Map;\r
+\r
+import org.simantics.databoard.accessor.MapAccessor;\r
+import org.simantics.databoard.accessor.error.AccessorException;\r
+import org.simantics.databoard.binding.Binding;\r
+import org.simantics.databoard.binding.error.BindingException;\r
+
+public interface FileMapAccessor extends MapAccessor, FileAccessor {
+
+       /**
+        * Set & copy all entries from a Map Value.
+        *  
+        * If entries are removed and they have accessors, the accessors are invalidated. 
+        * 
+        * @param mapBinding
+        * @param newMap
+        * @throws BindingException binding error
+        * @throws UnsupportedOperationException cannot set a new value
+        */
+       void setValueNoflush(Binding mapBinding, Object newMap) throws AccessorException;
+       
+       
+       /**
+        * Put an entry to the map. If previous entry exists for the key, it is removed. 
+        * 
+        * @param keyBinding
+        * @param key
+        * @param valueBinding
+        * @param value
+        * @throws AccessorException
+        */
+       void putNoflush(Binding keyBinding, Object key, Binding valueBinding, Object value) throws AccessorException;
+
+       void removeNoflush(Binding keyBinding, Object key) throws AccessorException;
+       
+       void putAllNoflush(Binding keyBinding, Binding valueBinding, Map<Object, Object> from) throws AccessorException;
+       void putAllNoflush(Binding keyBinding, Binding valueBinding, Object[] keys, Object[] values) throws AccessorException;
+       void clearNoflush() throws AccessorException;
+}
+