public class CompositePropertyIO extends AbstractPropertyIO
Constructor and Description |
---|
CompositePropertyIO(List<? extends PropertyIO> ios)
Returns a
CompositePropertyIO initialized with an list of PropertyIO instances. |
CompositePropertyIO(PropertyIO... ios)
Returns a
CompositePropertyIO initialized with an array of PropertyIO instances. |
Modifier and Type | Method and Description |
---|---|
String |
backup()
Returns a string containing all the properties [name=value] in the PropertyIO seperated by a line feed [
|
protected List<PropertyIO> |
getIos()
Gets the list of PropertyIO's.
|
String |
getName()
A short descriptive name of the Property IO.
|
Properties |
getProperties()
Gets all the name,value pair in a Properties class instance.
|
String |
getSource()
A detailed description of the source of the property data.
|
String |
getValue(String propertyName)
Gets the string value of the name.
|
void |
reload()
Reloads the name,value pairs for the PropertyIO, or forces the values to reload when read next time.
|
void |
setValue(String propertyName,
String value)
Sets the name,value as String in the IO.
|
void |
validate()
Validates the PropertyIO.
|
getCacheTime, getLastLoaded, getLastSaved, getLogger, getTypedProperties, getTypedValue, isCached, isReadonly, logPerformanceGetProperties, logPerformanceSetValue, setCacheTime, storeTypedValue, updateLastLoaded, updateLastSaved, validateWritable
public CompositePropertyIO(PropertyIO... ios)
CompositePropertyIO
initialized with an array of PropertyIO
instances.ios
- an array of PropertyIO.public CompositePropertyIO(List<? extends PropertyIO> ios)
CompositePropertyIO
initialized with an list of PropertyIO
instances.ios
- an list of PropertyIO.List
protected List<PropertyIO> getIos()
Collections.unmodifiableList
with the PropertyIO.public String getName()
PropertyIO
public String getSource()
PropertyIO
public String getValue(String propertyName)
PropertyIO
${name}
in the value, will be passed by the StringUtils.replaceInlinedProperties(String)
method, to replace ${name} where name can either be
a System.getProperty(String) or System.getenv(String).getValue
in interface PropertyIO
getValue
in class AbstractPropertyIO
propertyName
- the name of the property.null
is returned.StringUtils.replaceInlinedProperties(String)
,
PropertyFrameworkGlobals
public void setValue(String propertyName, String value) throws PropertyIOException
PropertyIO
propertyName
- the name of the propertyvalue
- the string value of the property.PropertyIOException
- if the IO is readonly or failed to write the value.public void reload()
PropertyIO
reload
in interface PropertyIO
reload
in class AbstractPropertyIO
public void validate() throws PropertyIOException
PropertyIO
PropertyIOException
public Properties getProperties()
PropertyIO
Properties
public String backup()
PropertyIO
\n].
backup
in interface PropertyIO
backup
in class AbstractPropertyIO