|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.apache.avalon.framework.configuration.AbstractConfiguration
|
+--org.apache.avalon.framework.configuration.DefaultConfiguration
This is the default Configuration implementation.
| Field Summary | |
protected static Configuration[] |
EMPTY_ARRAY
|
| Constructor Summary | |
DefaultConfiguration(java.lang.String name,
java.lang.String location)
Create a new DefaultConfiguration instance. |
|
DefaultConfiguration(java.lang.String name,
java.lang.String location,
java.lang.String ns,
java.lang.String prefix)
Create a new DefaultConfiguration instance. |
|
| Method Summary | |
java.lang.String |
addAttribute(java.lang.String name,
java.lang.String value)
Deprecated. Use setAttribute() instead |
void |
addChild(Configuration configuration)
Add a child Configuration to this configuration element. |
void |
appendValueData(java.lang.String value)
Deprecated. Use setValue() instead |
protected void |
checkWriteable()
|
java.lang.String |
getAttribute(java.lang.String name)
Returns the value of the attribute specified by its name as a String. |
java.lang.String[] |
getAttributeNames()
Return an array of all attribute names. |
Configuration |
getChild(java.lang.String name,
boolean createNew)
Return the first Configuration object child of this
associated with the given name. |
int |
getChildCount()
Return count of children. |
Configuration[] |
getChildren()
Return an Iterator of Configuration |
Configuration[] |
getChildren(java.lang.String name)
Return an Enumeration of Configuration objects
children of this associated with the given name. |
java.lang.String |
getLocation()
Returns a description of location of element. |
java.lang.String |
getName()
Returns the name of this configuration element. |
java.lang.String |
getNamespace()
Returns the namespace of this configuration element |
protected java.lang.String |
getPrefix()
Returns the prefix of the namespace |
java.lang.String |
getValue()
Returns the value of the configuration element as a String. |
void |
makeReadOnly()
|
void |
removeChild(Configuration configuration)
Remove a child Configuration to this configuration element. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
|
void |
setValue(java.lang.String value)
|
| Methods inherited from class org.apache.avalon.framework.configuration.AbstractConfiguration |
getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsFloat, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsInteger, getAttributeAsLong, getAttributeAsLong, getChild, getValue, getValueAsBoolean, getValueAsBoolean, getValueAsFloat, getValueAsFloat, getValueAsInteger, getValueAsInteger, getValueAsLong, getValueAsLong |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final Configuration[] EMPTY_ARRAY
| Constructor Detail |
public DefaultConfiguration(java.lang.String name,
java.lang.String location)
DefaultConfiguration instance.
public DefaultConfiguration(java.lang.String name,
java.lang.String location,
java.lang.String ns,
java.lang.String prefix)
DefaultConfiguration instance.name - config node namelocation - Builder-specific locator stringns - Namespace string (typically a URI). Should not be null; use ""
if no namespace.prefix - A short string prefixed to element names, associating
elements with a longer namespace string. Should not be null; use "" if no
namespace.| Method Detail |
public java.lang.String getName()
org.apache.avalon.framework.configuration.ConfigurationConfiguration node.
public java.lang.String getNamespace()
throws ConfigurationException
org.apache.avalon.framework.configuration.Configuration
protected java.lang.String getPrefix()
throws ConfigurationException
getPrefix in class AbstractConfigurationConfigurationException - if prefix is not present (null).public java.lang.String getLocation()
org.apache.avalon.framework.configuration.Configuration
public java.lang.String getValue()
throws ConfigurationException
String.ConfigurationException - If the value is not present.public java.lang.String[] getAttributeNames()
public Configuration[] getChildren()
Iterator of Configuration
elements containing all node children.
- Returns:
- The child nodes with name
public java.lang.String getAttribute(java.lang.String name)
throws ConfigurationException
String.ConfigurationException - If the attribute is not present.
public Configuration getChild(java.lang.String name,
boolean createNew)
Configuration object child of this
associated with the given name.getChild in class AbstractConfigurationorg.apache.avalon.framework.configuration.AbstractConfigurationname - the name of the childcreateNew - true if you want to create a new Configuration object if none existspublic Configuration[] getChildren(java.lang.String name)
Enumeration of Configuration objects
children of this associated with the given name.
Enumeration may be empty.name - The name of the required children Configuration.public void appendValueData(java.lang.String value)
public void setValue(java.lang.String value)
public void setAttribute(java.lang.String name,
java.lang.String value)
public java.lang.String addAttribute(java.lang.String name,
java.lang.String value)
public void addChild(Configuration configuration)
Configuration to this configuration element.public void removeChild(Configuration configuration)
Configuration to this configuration element.public int getChildCount()
public void makeReadOnly()
protected final void checkWriteable()
throws java.lang.IllegalStateException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||