public class ConfigureSatelliteCommand extends BaseConfigureCommand implements SatelliteConfigurator
Constructor and Description |
---|
ConfigureSatelliteCommand(User userIn)
Create a new ConfigureSatelliteCommand class with the
user requesting the config.
|
Modifier and Type | Method and Description |
---|---|
void |
clearUpdates()
Clear the set of configuration changes from the Command.
|
java.lang.String[] |
getCommandArguments()
Get the formatted String array of command line arguments to execute
when we call out to the system utility to store the config.
|
java.lang.String[] |
getCommandArguments(java.lang.String configFilePath,
java.util.Map<java.lang.String,java.lang.String> optionMap,
java.util.List<java.lang.String> removals)
Get the formatted String array of command line arguments to execute
when we call out to the system utility to store the config.
|
java.util.List<java.lang.String> |
getKeysToBeUpdated()
Get the list of configuration values that need to be written out
to the persistence mechanism.
|
void |
remove(java.lang.String configKey)
Remove a configuration entry
|
ValidatorError[] |
storeConfiguration()
Store the Configuration to the filesystem
|
void |
updateBoolean(java.lang.String configKey,
java.lang.Boolean newValue)
Update a configuration value for this satellite.
|
void |
updateString(java.lang.String configKey,
java.lang.String newValue)
Update a String config
|
getExecutor, getUser
public ConfigureSatelliteCommand(User userIn)
userIn
- who wants to config the sat.public java.lang.String[] getCommandArguments(java.lang.String configFilePath, java.util.Map<java.lang.String,java.lang.String> optionMap, java.util.List<java.lang.String> removals)
configFilePath
- path to config file to updateoptionMap
- Map of key/value pairs to update local config with.removals
- List of keys that will be removed
Note that they have preference over the updated keyspublic java.lang.String[] getCommandArguments()
public ValidatorError[] storeConfiguration()
storeConfiguration
in interface SatelliteConfigurator
public void updateBoolean(java.lang.String configKey, java.lang.Boolean newValue)
configKey
- key to the Config value you want to setnewValue
- you want to setpublic void updateString(java.lang.String configKey, java.lang.String newValue)
configKey
- to the valuenewValue
- to setpublic void remove(java.lang.String configKey)
configKey
- to the valuepublic java.util.List<java.lang.String> getKeysToBeUpdated()
public void clearUpdates()