public interface PropertyActions
| Modifier and Type | Method and Description |
|---|---|
Operation<Void> |
create(Path configFile,
Map<String,String> configs)
Creates a handler for persisting property file changes to a new property file.
|
Operation<Void> |
delete(Path configFile)
Creates a handler for deleting a property file.
|
Map<String,String> |
getProperties(Path propFile)
Gets the current key:value pairs set in the given property file.
|
Operation<Void> |
update(Path configFile,
Map<String,String> configs,
boolean keepIfNotPresent)
Creates a handler for persisting property file changes to an existing property file.
|
Operation<Void> create(Path configFile, Map<String,String> configs) throws ConfiguratorException
configFile - the property file to be createdconfigs - map of key:value pairs to be written to the property fileConfiguratorException - if an error occurs creating the operatorOperation<Void> delete(Path configFile) throws ConfiguratorException
configFile - the property file to be deletedConfiguratorException - if an error occurs creating the operatorOperation<Void> update(Path configFile, Map<String,String> configs, boolean keepIfNotPresent) throws ConfiguratorException
configFile - the property file to be updatedconfigs - map of key:value pairs to be written to the property filekeepIfNotPresent - if true, any keys in the current property file that are not in the
configs map will be left with their initial values; if false, they will be removed
from the fileConfiguratorException - if an error occurs creating the operatorMap<String,String> getProperties(Path propFile) throws ConfiguratorException
propFile - the property file to queryConfiguratorException - if there is an error reading the stateThis work is licensed under a Creative Commons Attribution 4.0 International License.