public class JBossSystemPropertiesPropertyIO extends AbstractXMLFilePropertyIO
<system-properties> <property name="n1" value="v1"/> <property name="n2" value="v2"/> <property name="nN" value="vN"/> </system-properties>
Constructor and Description |
---|
JBossSystemPropertiesPropertyIO(File file)
Returns a
JBossSystemPropertiesPropertyIO with loads properties from the file . |
JBossSystemPropertiesPropertyIO(File file,
boolean readonly)
Returns a
JBossSystemPropertiesPropertyIO with loads properties from the file . |
JBossSystemPropertiesPropertyIO(File file,
boolean readonly,
boolean cached)
Returns a
JBossSystemPropertiesPropertyIO with loads properties from the file . |
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 Properties |
loadXml(File file)
Loads the properties from the XML file.
|
protected void |
saveXml(Properties properties,
File file)
Saving the properties to the XML file, if that is possible.
|
getProperties, reload, setValue, validate
getFile, getName, getSource
getCacheTime, getLastLoaded, getLastSaved, getLogger, getTypedProperties, getTypedValue, getValue, isCached, isReadonly, logPerformanceGetProperties, logPerformanceSetValue, setCacheTime, storeTypedValue, updateLastLoaded, updateLastSaved, validateWritable
public JBossSystemPropertiesPropertyIO(File file)
JBossSystemPropertiesPropertyIO
with loads properties from the file
. false
and cached is set to true
.file
- the file
to load properties from.public JBossSystemPropertiesPropertyIO(File file, boolean readonly)
JBossSystemPropertiesPropertyIO
with loads properties from the file
.
Attributes cached is set to true
.file
- the file
to load properties from.readonly
- is the FilePropertyIO
to be read only.public JBossSystemPropertiesPropertyIO(File file, boolean readonly, boolean cached)
JBossSystemPropertiesPropertyIO
with loads properties from the file
.file
- readonly
- is the JBossSystemPropertiesPropertyIO
to be read only.cached
- shall the values be cached in the PropertyIO
's.protected Properties loadXml(File file) throws PropertyIOException
AbstractXMLFilePropertyIO
loadXml
in class AbstractXMLFilePropertyIO
file
- the XML filePropertyIOException
- if any failure loading the properties.XMLUtils.loadXmlFromFile(File)
protected void saveXml(Properties properties, File file) throws PropertyIOException
AbstractXMLFilePropertyIO
saveXml
in class AbstractXMLFilePropertyIO
properties
- the Properties to be saved.file
- the file to save to.PropertyIOException
- if either problems saving, or saving is not possible.public String backup()
PropertyIO
\n].
backup
in interface PropertyIO
backup
in class AbstractPropertyIO