]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 /*******************************************************************************\r
2  *  Copyright (c) 2010 Association for Decentralized Information Management in\r
3  *  Industry THTH ry.\r
4  *  All rights reserved. This program and the accompanying materials\r
5  *  are made available under the terms of the Eclipse Public License v1.0\r
6  *  which accompanies this distribution, and is available at\r
7  *  http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  *  Contributors:\r
10  *      VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.databoard.accessor.file;
13
14 import java.util.Map;\r
15 \r
16 import org.simantics.databoard.accessor.MapAccessor;\r
17 import org.simantics.databoard.accessor.error.AccessorException;\r
18 import org.simantics.databoard.binding.Binding;\r
19 import org.simantics.databoard.binding.error.BindingException;\r
20
21 public interface FileMapAccessor extends MapAccessor, FileAccessor {
22
23         /**
24          * Set & copy all entries from a Map Value.
25          *  
26          * If entries are removed and they have accessors, the accessors are invalidated. 
27          * 
28          * @param mapBinding
29          * @param newMap
30          * @throws BindingException binding error
31          * @throws UnsupportedOperationException cannot set a new value
32          */
33         void setValueNoflush(Binding mapBinding, Object newMap) throws AccessorException;
34         
35         
36         /**
37          * Put an entry to the map. If previous entry exists for the key, it is removed. 
38          * 
39          * @param keyBinding
40          * @param key
41          * @param valueBinding
42          * @param value
43          * @throws AccessorException
44          */
45         void putNoflush(Binding keyBinding, Object key, Binding valueBinding, Object value) throws AccessorException;
46
47         void removeNoflush(Binding keyBinding, Object key) throws AccessorException;
48         
49         void putAllNoflush(Binding keyBinding, Binding valueBinding, Map<Object, Object> from) throws AccessorException;
50         void putAllNoflush(Binding keyBinding, Binding valueBinding, Object[] keys, Object[] values) throws AccessorException;
51         void clearNoflush() throws AccessorException;
52 }
53