public abstract class MAbstractProperties extends java.lang.Object implements MProperties
Constructor and Description |
---|
MAbstractProperties() |
Modifier and Type | Method and Description |
---|---|
void |
delete(java.lang.String path)
Delete the attribute and nested elements referenced by the specified path parameter.
|
java.lang.Object |
get(java.lang.String path,
java.lang.Object defaultValue)
returns default value in case of null or exception
|
java.lang.Object |
get(java.lang.String path,
java.lang.Object defaultValue,
boolean doSubstitution) |
int |
getPropertyCount(java.lang.String path)
Deprecated.
Replaced by getCount(path)
|
java.lang.String |
getString(java.lang.String path)
If the value of at the path is a string, return it,
otherwise, return null.
|
java.lang.String |
getString(java.lang.String path,
java.lang.String defaultValue)
Returns the value of getString(path) if not null, otherwise
returns defaultValue
|
java.lang.String |
getValue(java.lang.String path)
Deprecated.
Replaced by getString(path)
|
java.lang.String |
getValue(java.lang.String path,
java.lang.String defaultValue)
Deprecated.
Replaced by getString(path, defautlValue)
|
boolean |
isLinkChased()
Returns if link chasing is turned on
|
void |
setLinkChased(boolean flag)
Set whether link chasing should be turned on, by default don't do anything
|
protected java.lang.String |
toPrevRepoKey(java.lang.String path)
Utility method to covert MProperty syntax to AssocKeys
|
protected java.lang.String |
toRepoKey(java.lang.String path)
Utility method to covert MProperty syntax to AssocKeys
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, elements, get, get, getCount, getPath, getRegistry, isChanged, isLocked, isWritable, lock, set
public java.lang.Object get(java.lang.String path, java.lang.Object defaultValue)
get
in interface MProperties
public java.lang.Object get(java.lang.String path, java.lang.Object defaultValue, boolean doSubstitution)
public int getPropertyCount(java.lang.String path) throws MException
getPropertyCount
in interface MProperties
MException
public java.lang.String getString(java.lang.String path)
getString
in interface MProperties
public java.lang.String getString(java.lang.String path, java.lang.String defaultValue)
getString
in interface MProperties
public java.lang.String getValue(java.lang.String path)
getValue
in interface MProperties
public java.lang.String getValue(java.lang.String path, java.lang.String defaultValue)
getValue
in interface MProperties
defaultValue
- lets you pass in a default value that is returned if there is no current value.public boolean isLinkChased()
isLinkChased
in interface MProperties
public void setLinkChased(boolean flag)
setLinkChased
in interface MProperties
protected java.lang.String toPrevRepoKey(java.lang.String path) throws MException
MException
protected java.lang.String toRepoKey(java.lang.String path) throws MException
MException
public void delete(java.lang.String path) throws MException
MProperties
MProperties
instance if the instance was
created as a settable instance and it is not locked.delete
in interface MProperties
path
- can specify an attribute at any level
in the 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