|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A read/write extension of the Configuration interface.
Method Summary | |
void |
addAll(Configuration other)
Add all the attributes, children and value from specified configuration element to current configuration element. |
void |
addAllAttributes(Configuration other)
Add all attributes from specified configuration element to current configuration element. |
void |
addAllChildren(Configuration other)
Add all child Configuration objects from specified
configuration element to current configuration element. |
void |
addChild(Configuration configuration)
Add a child Configuration to this configuration element. |
MutableConfiguration |
getMutableChild(java.lang.String name)
Equivalent to getMutableChild( name, true ) |
MutableConfiguration |
getMutableChild(java.lang.String name,
boolean autoCreate)
Gets a child node of this configuration. |
MutableConfiguration[] |
getMutableChildren()
Returns an array of mutable children. |
MutableConfiguration[] |
getMutableChildren(java.lang.String name)
Returns an array of mutable children with the given name. |
void |
removeChild(Configuration configuration)
Remove a child Configuration to this configuration element. |
void |
setAttribute(java.lang.String name,
boolean value)
Set the value of the specified attribute to the specified boolean. |
void |
setAttribute(java.lang.String name,
double value)
Set the value of the specified attribute to the specified double. |
void |
setAttribute(java.lang.String name,
float value)
Set the value of the specified attribute to the specified float. |
void |
setAttribute(java.lang.String name,
int value)
Set the value of the specified attribute to the specified int. |
void |
setAttribute(java.lang.String name,
long value)
Set the value of the specified attribute to the specified long. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Set the value of the specified attribute to the specified string. |
void |
setValue(boolean value)
Set the value of this Configuration object to the specified boolean. |
void |
setValue(double value)
Set the value of this Configuration object to the specified double. |
void |
setValue(float value)
Set the value of this Configuration object to the specified float. |
void |
setValue(int value)
Set the value of this Configuration object to the specified int. |
void |
setValue(long value)
Set the value of this Configuration object to the specified long. |
void |
setValue(java.lang.String value)
Set the value of this Configuration object to the specified string. |
Methods inherited from interface org.apache.avalon.framework.configuration.Configuration |
getAttribute, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsInteger, getAttributeAsLong, getAttributeAsLong, getAttributeNames, getChild, getChild, getChildren, getChildren, getLocation, getName, getNamespace, getValue, getValue, getValueAsBoolean, getValueAsBoolean, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFloat, getValueAsInteger, getValueAsInteger, getValueAsLong, getValueAsLong |
Method Detail |
public void setValue(java.lang.String value)
Configuration
object to the specified string.
value
- a String
valuepublic void setValue(int value)
Configuration
object to the specified int.
value
- a int
valuepublic void setValue(long value)
Configuration
object to the specified long.
value
- a long
valuepublic void setValue(boolean value)
Configuration
object to the specified boolean.
value
- a boolean
valuepublic void setValue(float value)
Configuration
object to the specified float.
value
- a float
valuepublic void setValue(double value)
Configuration
object to the specified double.
value
- a double
valuepublic void setAttribute(java.lang.String name, java.lang.String value)
name
- name of the attribute to setvalue
- a String
value. If null, the attribute is removed.public void setAttribute(java.lang.String name, int value)
name
- name of the attribute to setvalue
- an int
valuepublic void setAttribute(java.lang.String name, long value)
name
- name of the attribute to setvalue
- an long
valuepublic void setAttribute(java.lang.String name, boolean value)
name
- name of the attribute to setvalue
- an boolean
valuepublic void setAttribute(java.lang.String name, float value)
name
- name of the attribute to setvalue
- an float
valuepublic void setAttribute(java.lang.String name, double value)
name
- name of the attribute to setvalue
- an double
valuepublic void addChild(Configuration configuration)
Configuration
to this configuration element.
configuration
- a Configuration
valuepublic void addAll(Configuration other)
other
- the Configuration
elementpublic void addAllAttributes(Configuration other)
other
- the Configuration
elementpublic void addAllChildren(Configuration other)
Configuration
objects from specified
configuration element to current configuration element.
other
- the other Configuration
valuepublic void removeChild(Configuration configuration)
Configuration
to this configuration element.
configuration
- a Configuration
valuepublic MutableConfiguration getMutableChild(java.lang.String name) throws ConfigurationException
getMutableChild( name, true )
ConfigurationException
public MutableConfiguration getMutableChild(java.lang.String name, boolean autoCreate) throws ConfigurationException
autoCreate
is true
, a new mutable child is created and added to
this configuration before being returned.
name
- the name of the child.autoCreate
- set to true to create the child node if it doesn't exist.
null
if autoCreate
was false and no child by the given name existed.
ConfigurationException
- if an error occurrs.public MutableConfiguration[] getMutableChildren() throws ConfigurationException
getMutableChild
.
ConfigurationException
- if an error occurrs.public MutableConfiguration[] getMutableChildren(java.lang.String name) throws ConfigurationException
getMutableChild
.
ConfigurationException
- if an error occurrs.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |