1 /*******************************************************************************
\r
2 * Copyright (c) 2010 Association for Decentralized Information Management in
\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
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.databoard.accessor.file;
14 import org.simantics.databoard.accessor.ArrayAccessor;
\r
15 import org.simantics.databoard.accessor.ArrayAccessor.CloseableArrayAccessor;
\r
16 import org.simantics.databoard.accessor.CloseableAccessor;
\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
21 public interface FileArrayAccessor extends ArrayAccessor, FileAccessor, CloseableAccessor, CloseableArrayAccessor {
28 * @throws AccessorException
30 void addNoflush(Binding binding, Object value) throws AccessorException;
33 * Add an array of elements.
37 * @throws AccessorException
39 void addAllNoflush(Binding binding, Object[] values) throws AccessorException;
42 * Add an array of elements.
44 * If elements are inserted in the middle of the array, existing interest sets
45 * are updated to reflect the new positions.
47 * @param index position to insert new value to
50 * @throws AccessorException
52 void addAllNoflush(int index, Binding binding, Object[] values) throws AccessorException;
57 * If elements are inserted in the middle of the array, existing interest sets
58 * are updated to reflect the new positions.
60 * @param index position to insert new value to
63 * @throws AccessorException
65 void addNoflush(int index, Binding binding, Object value) throws AccessorException;
68 * Set all elements from an Array Value.
70 * If array becomes shorter and there are accessors to the removed elements,
71 * the accessors are invalidated.
75 * @throws BindingException binding error
76 * @throws UnsupportedOperationException cannot set a new value
78 void setValueNoflush(Binding binding, Object newValue) throws AccessorException;
81 * Replace a value container with a new value.
86 * @throws AccessorException
88 void setNoflush(int index, Binding binding, Object value) throws AccessorException;
91 * Remove an element at an index.
93 * If there are listeners to elements after the <code>null</code>, the
94 * interest sets and accessor paths are updated and decreased.
96 * If there was an accessor, it becomes invalid.
100 * @throws AccessorException
102 void removeNoflush(int index, int count) throws AccessorException;
105 * Set new array size
\r
108 * @throws AccessorException
\r
110 void setSizeNoflush(int newSize) throws AccessorException;
\r