Revision 37595 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/impl/undo/command/AbstractFeatureCommand.java

View differences:

AbstractFeatureCommand.java
42 42

  
43 43
package org.gvsig.fmap.dal.feature.impl.undo.command;
44 44

  
45
import org.gvsig.fmap.dal.exception.DataException;
45 46
import org.gvsig.fmap.dal.feature.Feature;
46
import org.gvsig.fmap.dal.feature.impl.FeatureManager;
47
import org.gvsig.fmap.dal.feature.impl.SpatialManager;
47
import org.gvsig.fmap.dal.feature.impl.DefaultFeatureStore;
48
import org.gvsig.tools.undo.RedoException;
48 49
import org.gvsig.tools.undo.command.impl.AbstractCommand;
49 50

  
50 51

  
......
55 56
 */
56 57
public abstract class AbstractFeatureCommand extends AbstractCommand {
57 58
    protected Feature feature;
58
    protected FeatureManager expansionManager;
59
    protected SpatialManager spatialManager;
60

  
61
    protected AbstractFeatureCommand(FeatureManager expansionManager,
62
            SpatialManager spatialManager, Feature feature,
63
        String description) {
59
    protected DefaultFeatureStore featureStore;
60
    
61
    protected AbstractFeatureCommand(DefaultFeatureStore featureStore,         
62
        Feature feature, String description) {
64 63
        super(description);
64
        this.featureStore = featureStore;
65 65
        this.feature = feature;
66
        this.expansionManager = expansionManager;
67
        this.spatialManager = spatialManager;
68 66
    }
69 67

  
70 68
    /**
......
75 73
    public Feature getFeature() {
76 74
        return feature;
77 75
    }
76

  
77

  
78
    public int getType() {
79
        return DELETE;
80
    }
81
    
82
    
83
    public void redo() throws RedoException {
84
        try {
85
            execute();
86
        } catch (DataException e) {
87
            throw new RedoException(this, e);
88
        }
89
    }
90

  
91
    public abstract void execute() throws DataException;      
78 92
}

Also available in: Unified diff