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