@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; }
if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
@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 (existingOptions.load(existingProps, getNamespace())) { throw new ParameterException("That store already exists: " + getPluginName());
if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
if (pluginOptions.load( existingProps, DataStorePluginOptions.getStoreNamespace(defaultStore))) {