Revision 43093 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/impl/DefaultDataManager.java
DefaultDataManager.java | ||
---|---|---|
264 | 264 |
@Override |
265 | 265 |
public NewDataStoreParameters createNewStoreParameters(String explorerName, String providerName) throws InitializeException, ProviderNotRegisteredException { |
266 | 266 |
try { |
267 |
DataServerExplorer explorer = this.openServerExplorer(explorerName, null); |
|
267 |
DataServerExplorer explorer = this.openServerExplorer(explorerName, (DataServerExplorerParameters)null);
|
|
268 | 268 |
return explorer.getAddParameters(providerName); |
269 | 269 |
} catch (Exception ex) { |
270 | 270 |
throw new InitializeException(ex); |
... | ... | |
305 | 305 |
); |
306 | 306 |
return explorer; |
307 | 307 |
} |
308 |
|
|
308 |
|
|
309 |
@Override |
|
310 |
public DataServerExplorer openServerExplorer(String explorerName, Object... arguments) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException { |
|
311 |
if( (arguments.length % 2)!= 0 ) { |
|
312 |
throw new ValidateDataParametersException(); |
|
313 |
} |
|
314 |
DataFactory explorerFactory = this.getServerExplorerRegister().getFactory(explorerName); |
|
315 |
DataServerExplorerParameters parameters = (DataServerExplorerParameters) explorerFactory.createParameters(); |
|
316 |
for( int i=0; i<arguments.length; i+=2 ) { |
|
317 |
String name = (String) arguments[i]; |
|
318 |
Object value = arguments[i+1]; |
|
319 |
parameters.setDynValue(name, value); |
|
320 |
} |
|
321 |
return this.openServerExplorer(explorerName, parameters); |
|
322 |
|
|
323 |
} |
|
324 |
|
|
309 | 325 |
/** |
310 | 326 |
* @param parameters |
311 | 327 |
* @return |
... | ... | |
366 | 382 |
} |
367 | 383 |
|
368 | 384 |
@Override |
385 |
public DataStore openStore(String providerName, Object... arguments) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException { |
|
386 |
if( (arguments.length % 2)!= 0 ) { |
|
387 |
throw new ValidateDataParametersException(); |
|
388 |
} |
|
389 |
DataFactory providerFactory = this.getStoreProviderRegister().getFactory(providerName); |
|
390 |
DataStoreParameters parameters = (DataStoreParameters) providerFactory.createParameters(); |
|
391 |
for( int i=0; i<arguments.length; i+=2 ) { |
|
392 |
String name = (String) arguments[i]; |
|
393 |
Object value = arguments[i+1]; |
|
394 |
parameters.setDynValue(name, value); |
|
395 |
} |
|
396 |
return this.openStore(providerName, parameters); |
|
397 |
} |
|
398 |
|
|
399 |
@Override |
|
369 | 400 |
public FeatureStore createMemoryStore(String autoOrderAttributeName) throws InitializeException { |
370 | 401 |
try { |
371 | 402 |
DataStoreParameters parameters = createMemoryStoreParameters(autoOrderAttributeName); |
... | ... | |
390 | 421 |
@Override |
391 | 422 |
public List<String> getStoreProviders(String explorerName) { |
392 | 423 |
try { |
393 |
DataServerExplorer explorer = openServerExplorer(explorerName, null); |
|
424 |
DataServerExplorer explorer = openServerExplorer(explorerName, (DataServerExplorerParameters)null);
|
|
394 | 425 |
List names = explorer.getDataStoreProviderNames(); |
395 | 426 |
return names; |
396 | 427 |
} catch (Exception ex) { |
... | ... | |
734 | 765 |
} |
735 | 766 |
} |
736 | 767 |
|
768 |
@Override |
|
737 | 769 |
public List getFeatureCacheProviders() { |
738 | 770 |
ExtensionPoint extensionPoint = |
739 | 771 |
ToolsLocator.getExtensionPointManager().get(DATA_MANAGER_CACHE); |
... | ... | |
745 | 777 |
} |
746 | 778 |
} |
747 | 779 |
|
780 |
@Override |
|
748 | 781 |
public DynObject createCacheParameters(String name) |
749 | 782 |
throws InitializeException, ProviderNotRegisteredException { |
750 | 783 |
if (name == null) { |
Also available in: Unified diff