|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PlexusConfiguration
A configuration data hierarchy for configuring aspects of plexus. For example, to populate a ComponentDescriptor. Implementation of PlexusConfiguration may be populated by any means, for example, by XML file.
Method Summary | |
---|---|
void |
addChild(PlexusConfiguration configuration)
Adds a configuration under this configuration, which acts as a parent. |
PlexusConfiguration |
addChild(java.lang.String name)
Add a child element with a given name and return the newly created element. |
PlexusConfiguration |
addChild(java.lang.String name,
java.lang.String value)
Add a child element with a given name, and given value and return the newly created element. |
java.lang.String |
getAttribute(java.lang.String paramName)
Returns the value of the named attribute. |
java.lang.String |
getAttribute(java.lang.String name,
java.lang.String defaultValue)
Returns the value of the named attribute, or default if one cannot be found. |
java.lang.String[] |
getAttributeNames()
Returns an array of attribute names. |
PlexusConfiguration |
getChild(int i)
Returns the child configuration at the given location. |
PlexusConfiguration |
getChild(java.lang.String child)
Returns the child configuration of the given name. |
PlexusConfiguration |
getChild(java.lang.String child,
boolean createChild)
Returns the child configuration of the given name. |
int |
getChildCount()
Returns the number of directly children under this configuration. |
PlexusConfiguration[] |
getChildren()
Returns an array of all child configurations. |
PlexusConfiguration[] |
getChildren(java.lang.String name)
Returns an array of all child configurations with the given name. |
java.lang.String |
getName()
Returns the name of this configuration. |
java.lang.String |
getValue()
Returns the value of this configuration. |
java.lang.String |
getValue(java.lang.String defaultValue)
Returns the value of this configuration, or default if one cannot be found. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets an attribute on this configuration. |
void |
setName(java.lang.String name)
Sets the name of this configuration. |
void |
setValue(java.lang.String value)
Set the value of a configuration element. |
PlexusConfiguration |
setValueAndGetSelf(java.lang.String value)
Set the value of a configuration element and return the PlexusConfiguration object so that further operations can be carried out. |
Method Detail |
---|
java.lang.String getName()
void setName(java.lang.String name)
name
- java.lang.String getValue() throws PlexusConfigurationException
PlexusConfigurationException
java.lang.String getValue(java.lang.String defaultValue)
defaultValue
- value to return if none is found
void setValue(java.lang.String value)
value
- PlexusConfiguration setValueAndGetSelf(java.lang.String value)
value
-
void setAttribute(java.lang.String name, java.lang.String value)
name
- value
- java.lang.String[] getAttributeNames()
java.lang.String getAttribute(java.lang.String paramName) throws PlexusConfigurationException
PlexusConfigurationException
java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)
defaultValue
- value to return if none is found
PlexusConfiguration getChild(java.lang.String child)
child
- the name of the child to return
PlexusConfiguration getChild(int i)
i
- the position of the child under this configuration
PlexusConfiguration getChild(java.lang.String child, boolean createChild)
child
- the name of the child to returncreateChild
- true if a new child should be create, if none found
PlexusConfiguration[] getChildren()
PlexusConfiguration[] getChildren(java.lang.String name)
name
- the name of the children configurations to return
void addChild(PlexusConfiguration configuration)
configuration
- the child configuration to addPlexusConfiguration addChild(java.lang.String name)
name
-
PlexusConfiguration addChild(java.lang.String name, java.lang.String value)
name
-
int getChildCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |