public String getNamespace() { return DataStorePluginOptions.getStoreNamespace(getPluginName()); }
public String getNamespace() { return DataStorePluginOptions.getStoreNamespace(getPluginName()); }
public String getNamespace() { return DataStorePluginOptions.getStoreNamespace(getPluginName()); }
public String getNamespace() { return DataStorePluginOptions.getStoreNamespace(getPluginName()); }
public String getNamespace() { return DataStorePluginOptions.getStoreNamespace(getPluginName()); }
public String getNamespace() { return DataStorePluginOptions.getStoreNamespace(getPluginName()); }
public String getNamespace() { return DataStorePluginOptions.getStoreNamespace(getPluginName()); }
public String getNamespace() { return DataStorePluginOptions.getStoreNamespace(getPluginName()); }
@Override public String computeResults(final OperationParams params) throws Exception { // Search for properties relevant to the given name pattern = DataStorePluginOptions.getStoreNamespace(getEntryName()); return super.computeResults(params, pattern); }
/** * Attempt to load the datastore configuration from the config file. * * @param configFile * @return */ public boolean loadFromConfig(final File configFile) { final String namespace = DataStorePluginOptions.getStoreNamespace(storeName); return loadFromConfig( ConfigOptions.loadProperties(configFile, "^" + namespace), namespace, configFile); }
@Override public boolean prepare(OperationParams params) { super.prepare(params); Properties existingProps = getGeoWaveConfigProperties(params); // Load the old store, so that we can override the values String oldStore = null; if (parameters.size() >= 1) { oldStore = parameters.get(0); if (!newPluginOptions.load( existingProps, DataStorePluginOptions.getStoreNamespace(oldStore))) { throw new ParameterException("Could not find store: " + oldStore); } } // Successfully prepared. return true; }
@Override public void execute(OperationParams params) { Properties existingProps = getGeoWaveConfigProperties(params); if (parameters.size() < 2) { throw new ParameterException("Must specify <existing store> <new store> names"); } // This is the new store name. String newStore = parameters.get(1); String newStoreNamespace = DataStorePluginOptions.getStoreNamespace(newStore); // Make sure we're not already in the index. DataStorePluginOptions existPlugin = new DataStorePluginOptions(); if (existPlugin.load(existingProps, newStoreNamespace)) { throw new ParameterException("That store already exists: " + newStore); } // Save the options. newPluginOptions.save(existingProps, newStoreNamespace); // Make default? if (Boolean.TRUE.equals(makeDefault)) { existingProps.setProperty(DataStorePluginOptions.DEFAULT_PROPERTY_NAMESPACE, newStore); } // Write properties file ConfigOptions.writeProperties(getGeoWaveConfigFile(params), existingProps); }
if (pluginOptions.load( existingProps, DataStorePluginOptions.getStoreNamespace(defaultStore))) {
if (!inputStoreLoader.loadFromConfig( configProperties, DataStorePluginOptions.getStoreNamespace(inputStoreName), configFile)) { throw new ParameterException("Cannot find store name: " + inputStoreLoader.getStoreName());
dataStore.save(props, DataStorePluginOptions.getStoreNamespace("test")); final AddStoreCommand addStore = new AddStoreCommand(); addStore.setParameters("test");