svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.impl / src / main / java / org / gvsig / fmap / dal / feature / impl / EditingManager.java @ 43966
History | View | Annotate | Download (2.43 KB)
1 |
|
---|---|
2 |
package org.gvsig.fmap.dal.feature.impl; |
3 |
|
4 |
import java.util.Iterator; |
5 |
import org.gvsig.fmap.dal.exception.DataException; |
6 |
import org.gvsig.fmap.dal.feature.Feature; |
7 |
import org.gvsig.fmap.dal.feature.FeatureReference; |
8 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
9 |
import org.gvsig.fmap.dal.feature.FeatureType; |
10 |
import org.gvsig.fmap.dal.feature.spi.FeatureProvider; |
11 |
import org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider.FeatureTypeChanged; |
12 |
|
13 |
|
14 |
public interface EditingManager { |
15 |
/*
|
16 |
Este interface, con el tiempo deberia ir al SPI.
|
17 |
|
18 |
Tendria que sustituir a:
|
19 |
- FeatureManager
|
20 |
- FeatureTypeManager
|
21 |
- SpatialManager
|
22 |
como mecanismos para guardar los datos mientras se esta en edicion.
|
23 |
|
24 |
Habria que eliminar estos managers del DefaultFeatureStore y sustituirlos
|
25 |
por este.
|
26 |
|
27 |
En una primera implementacion, se mantendrian estos managers como parte interna
|
28 |
de la implementacion del MemoryEditingManager.
|
29 |
|
30 |
*/
|
31 |
|
32 |
public void dispose(); |
33 |
|
34 |
public void delete(Feature feature); |
35 |
|
36 |
public void delete(FeatureReference featureReference); |
37 |
|
38 |
public void add(Feature newFeature); |
39 |
|
40 |
public int update(Feature newFeature, Feature oldFeature); |
41 |
|
42 |
public int update(FeatureType type, FeatureType oldType); |
43 |
|
44 |
public void restore(FeatureReference featureReference); |
45 |
|
46 |
public void restore(FeatureReference featureReference, int code); |
47 |
|
48 |
public void restore(String featureTypeId); |
49 |
|
50 |
public void restore(String featureTypeId, int code); |
51 |
|
52 |
public boolean isDeleted(Feature feature); |
53 |
|
54 |
public boolean isDeleted(FeatureReference featureReference); |
55 |
|
56 |
public boolean isDeleted(FeatureType type); |
57 |
|
58 |
public boolean isDeleted(String featureTypeId); |
59 |
|
60 |
public boolean isSelectionCompromised(); |
61 |
|
62 |
public Iterator<FeatureProvider> getDeletedFeatures(); |
63 |
public Iterator<FeatureProvider> getInsertedFeatures(); |
64 |
public Iterator<FeatureProvider> getUpdatedFeatures(); |
65 |
|
66 |
public Iterator<FeatureTypeChanged> getFeatureTypesChanged() throws DataException; |
67 |
|
68 |
public FeatureType getFeatureType(String id) throws DataException ; |
69 |
|
70 |
public Feature getFeature(FeatureReference reference, FeatureStore store, FeatureType type) throws DataException; |
71 |
|
72 |
|
73 |
/*
|
74 |
it = featureTypeManager.newsIterator();
|
75 |
|
76 |
position = expansionManager.update(type, oldType);
|
77 |
|
78 |
expansionManager.restore(oldType.getId(),position);
|
79 |
|
80 |
spatialManager.cancelModifies();
|
81 |
*/
|
82 |
} |