Revision 44297 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/DefaultFeatureStore.java

View differences:

DefaultFeatureStore.java
128 128
import org.gvsig.fmap.dal.feature.spi.FeatureStoreProviderServices;
129 129
import org.gvsig.fmap.dal.feature.spi.cache.FeatureCacheProvider;
130 130
import org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProviderServices;
131
import org.gvsig.fmap.dal.impl.DALResourcesStorage;
132 131
import org.gvsig.fmap.dal.impl.DefaultDataManager;
133 132
import org.gvsig.fmap.dal.resource.Resource;
134 133
import org.gvsig.fmap.dal.spi.DataStoreInitializer2;
......
167 166
import org.gvsig.tools.undo.UndoException;
168 167
import org.gvsig.tools.undo.command.Command;
169 168
import org.gvsig.tools.util.HasAFile;
170
import org.gvsig.tools.util.ResourcesStorage;
169
import org.gvsig.tools.resourcesstorage.ResourcesStorage;
171 170
import org.gvsig.tools.util.UnmodifiableBasicMap;
172 171
import org.gvsig.tools.util.UnmodifiableBasicSet;
173 172
import org.gvsig.tools.util.UnmodifiableBasicSetChained;
......
1586 1585
    
1587 1586

  
1588 1587
    private void saveDALFile() {       
1589
        org.gvsig.tools.util.ResourcesStorage.Resource resource = null;
1588
        org.gvsig.tools.resourcesstorage.ResourcesStorage.Resource resource = null;
1590 1589
        try {
1591
            DataServerExplorer explorer = this.getExplorer();
1592
            if( explorer == null ) {
1590
            ResourcesStorage resourcesStorage = this.getResourcesStorage();
1591
            if( resourcesStorage == null || resourcesStorage.isReadOnly() ) {
1593 1592
                return;
1594 1593
            }
1595
            resource = explorer.getResource(this, "dal");
1596
            if( resource == null ) {
1594
            resource = resourcesStorage.getResource("dal");
1595
            if( resource == null || resource.isReadOnly() ) {
1597 1596
                return;
1598 1597
            }
1599 1598
            DALFile dalFile = DALFile.getDALFile();
......
1609 1608
    }
1610 1609
    
1611 1610
    private void loadDALFile() {
1612
        org.gvsig.tools.util.ResourcesStorage.Resource resource = null;
1611
        org.gvsig.tools.resourcesstorage.ResourcesStorage.Resource resource = null;
1613 1612
        try {
1614
            DataServerExplorer explorer = this.getExplorer();
1615
            if( explorer == null ) {
1613
            ResourcesStorage resourcesStorage = this.getResourcesStorage();
1614
            if( resourcesStorage == null ) {
1616 1615
                return;
1617 1616
            }
1618
            resource = explorer.getResource(this, "dal");
1617
            resource = resourcesStorage.getResource("dal");
1619 1618
            if( resource == null || !resource.exists() ) {
1620 1619
                return;
1621 1620
            }
......
1956 1955
        return findFirst(query);
1957 1956
    }
1958 1957
    
1958
    @Override
1959 1959
    public Feature findFirst(FeatureQuery query) throws DataException {
1960 1960
        final MutableObject<Feature> feature = new MutableObject<>();
1961 1961
        try {
......
2979 2979

  
2980 2980
    @Override
2981 2981
    public ResourcesStorage getResourcesStorage() {
2982
        return new DALResourcesStorage(this);
2982
        try {
2983
            DataServerExplorer explorer = this.getExplorer();
2984
            if( explorer==null ) {
2985
                return null;
2986
            }
2987
            return this.getExplorer().getResourcesStorage(this);
2988
        } catch (Exception ex) {
2989
            LOG.warn("Can't create resources storage",ex);
2990
            return null;
2991
        }
2983 2992
    }
2984 2993

  
2985 2994
    @Override

Also available in: Unified diff