public class MXmlProperties extends MAbstractProperties implements MProperties
Constructor and Description |
---|
MXmlProperties(java.io.InputStream instream)
Create a new Xml properties given an InputStream object.
|
MXmlProperties(java.io.Reader reader)
Create a new Xml properties given a Reader object.
|
MXmlProperties(java.lang.String filename)
Create a new Xml properties given a xml filename.
|
Modifier and Type | Method and Description |
---|---|
void |
append(java.lang.String path,
java.lang.Object value)
append method comment.
|
java.util.Enumeration |
elements(java.lang.String path)
elements method comment.
|
java.lang.Object |
get(java.lang.String path)
get method comment.
|
java.lang.Object |
get(java.lang.String path,
boolean doSubstitution)
get method comment.
|
int |
getCount(java.lang.String path)
getCount method comment.
|
java.lang.String |
getPath()
If the xml is created using filename,
|
MPropertiesRegistry |
getRegistry()
getRegistry method comment.
|
protected void |
init(java.lang.Object input)
Helper to create a new Xml properties given either Reader or InputStream
|
boolean |
isChanged()
isChanged method comment.
|
boolean |
isLocked()
isLocked method comment.
|
boolean |
isWritable()
isWritable method comment.
|
void |
lock()
lock method comment.
|
void |
set(java.lang.String path,
java.lang.Object value)
set method comment.
|
java.lang.String |
toString() |
delete, get, get, getPropertyCount, getString, getString, getValue, getValue, isLinkChased, setLinkChased, toPrevRepoKey, toRepoKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
delete, get, getPropertyCount, getString, getString, getValue, getValue, isLinkChased, setLinkChased
public MXmlProperties(java.io.InputStream instream) throws MException
instream
- java.lang.StringMException
- The exception description.public MXmlProperties(java.io.Reader reader) throws MException
reader
- java.lang.StringMException
- The exception description.public MXmlProperties(java.lang.String filename) throws MException
filename
- java.lang.StringMException
- The exception description.public void append(java.lang.String path, java.lang.Object value) throws MException
append
in interface MProperties
path
- can specify an attribute at any level in the tree.
See also Format of path Argument in the description of MProperties.get(String path, Object defaultValue)
value
- Value to add.MException
- on invalid entry format.public java.util.Enumeration elements(java.lang.String path) throws MException
elements
in interface MProperties
MException
public java.lang.Object get(java.lang.String path) throws MException
get
in interface MProperties
path
- can specify a property at any level
in the property tree. The syntax is as follows:
/foo|x/bar|y/baz
See also Format of path Argument in the description
of MProperties.get(String path, Object defaultValue)
MException
- on invalid entry format.public java.lang.Object get(java.lang.String path, boolean doSubstitution) throws MException
get
in interface MProperties
path
- can specify a property at any level
in the property tree. The syntax is as follows:
/foo|x/bar|y/baz
doSubstitution
- If true then global variable substitution is done ,
otherwise no substitution is done.MException
- on invalid entry format.public int getCount(java.lang.String path) throws MException
getCount
in interface MProperties
MException
public java.lang.String getPath()
getPath
in interface MProperties
public MPropertiesRegistry getRegistry()
getRegistry
in interface MProperties
protected void init(java.lang.Object input) throws MException
MException
- The exception description.public boolean isChanged()
isChanged
in interface MProperties
MProperties.lock()
,
MPropertiesRegistry.newProperties(String)
public boolean isLocked()
isLocked
in interface MProperties
public boolean isWritable()
isWritable
in interface MProperties
public void lock() throws MException
lock
in interface MProperties
MException
MProperties.isLocked()
public void set(java.lang.String path, java.lang.Object value) throws MException
set
in interface MProperties
MException
public java.lang.String toString()
toString
in class java.lang.Object