]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/file/FileMapAccessor.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / accessor / file / FileMapAccessor.java
1 /*******************************************************************************
2  *  Copyright (c) 2010 Association for Decentralized Information Management in
3  *  Industry THTH ry.
4  *  All rights reserved. This program and the accompanying materials
5  *  are made available under the terms of the Eclipse Public License v1.0
6  *  which accompanies this distribution, and is available at
7  *  http://www.eclipse.org/legal/epl-v10.html
8  *
9  *  Contributors:
10  *      VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.databoard.accessor.file;
13
14 import java.util.Map;
15
16 import org.simantics.databoard.accessor.MapAccessor;
17 import org.simantics.databoard.accessor.error.AccessorException;
18 import org.simantics.databoard.binding.Binding;
19 import org.simantics.databoard.binding.error.BindingException;
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