public class ConfigPropertiesHelper
extends java.lang.Object
NamedConfiguration| Modifier and Type | Class and Description |
|---|---|
static class |
ConfigPropertiesHelper.ConfigSet
The set of propeties for a configuration.
|
static class |
ConfigPropertiesHelper.Property
A configuration property.
|
| Constructor and Description |
|---|
ConfigPropertiesHelper() |
| Modifier and Type | Method and Description |
|---|---|
ConfigPropertiesHelper.ConfigSet |
createConfiguration(java.lang.String configName)
Creates a named configuration.
|
ConfigPropertiesHelper.ConfigSet |
createDefaultConfiguration()
Creates the default configuration.
|
ConfigPropertiesHelper.ConfigSet |
getConfiguration(java.lang.String configName)
Return the configuration of a specified name (or null if there is no configuration for this name).
|
java.util.Set<java.lang.String> |
getConfigurationPropertiesNames(java.lang.String configName)
Return the names of the configuration properties for a named configuration.
|
java.lang.Object |
getConfigurationProperty(java.io.File dir,
java.lang.String propertyName,
java.lang.String configName)
Return the property with a specified name for a named configuration.
|
java.lang.Class |
getConfigurationPropertyType(java.lang.String propertyName,
java.lang.String configName)
Return the type of the property with a specified name for a named configuration.
|
ConfigPropertiesHelper.ConfigSet |
getDefaultConfiguration()
Return the default configuration (or null if there is no default configuration).
|
java.lang.Object |
getDefaultConfigurationProperty(java.lang.String propertyName,
java.lang.String configName)
Return the default value for a property with a specified name for a named configuration.
|
boolean |
hasConfiguration(java.lang.String configName)
Return true if there is a configuration for a specified name.
|
boolean |
hasConfigurationProperty(java.lang.String propertyName,
java.lang.String configName)
Return true if there is a property with a specified name for a named configuration.
|
boolean |
hasDefaultConfiguration()
Return true if there is a default configuration.
|
void |
setConfigurationProperty(java.io.File dir,
java.lang.String propertyName,
java.lang.String configName,
java.lang.Object property)
Set the value of the property with a specified name for a named configuration.Return null by default.
|
public ConfigPropertiesHelper.ConfigSet createDefaultConfiguration()
public ConfigPropertiesHelper.ConfigSet createConfiguration(java.lang.String configName)
configName - the configuration namepublic java.util.Set<java.lang.String> getConfigurationPropertiesNames(java.lang.String configName)
configName - the configuration namepublic boolean hasConfigurationProperty(java.lang.String propertyName,
java.lang.String configName)
propertyName - the property nameconfigName - the configuration namepublic java.lang.Object getDefaultConfigurationProperty(java.lang.String propertyName,
java.lang.String configName)
propertyName - the property nameconfigName - the configuration namepublic java.lang.Class getConfigurationPropertyType(java.lang.String propertyName,
java.lang.String configName)
propertyName - the property nameconfigName - the configuration namepublic void setConfigurationProperty(java.io.File dir,
java.lang.String propertyName,
java.lang.String configName,
java.lang.Object property)
dir - the base directorypropertyName - the property nameconfigName - the configuration nameproperty - the property valuepublic java.lang.Object getConfigurationProperty(java.io.File dir,
java.lang.String propertyName,
java.lang.String configName)
dir - the base directorypropertyName - the property nameconfigName - the configuration namepublic ConfigPropertiesHelper.ConfigSet getDefaultConfiguration()
public boolean hasDefaultConfiguration()
public boolean hasConfiguration(java.lang.String configName)
configName - the configuration namepublic ConfigPropertiesHelper.ConfigSet getConfiguration(java.lang.String configName)
configName - the configuration namme