Interface PlexusConfiguration
-
public interface PlexusConfigurationA 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChild(PlexusConfiguration configuration)Adds a configuration under this configuration, which acts as a parent.java.lang.StringgetAttribute(java.lang.String paramName)Returns the value of the named attribute.java.lang.StringgetAttribute(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.PlexusConfigurationgetChild(int i)Returns the child configuration at the given location.PlexusConfigurationgetChild(java.lang.String child)Returns the child configuration of the given name.PlexusConfigurationgetChild(java.lang.String child, boolean createChild)Returns the child configuration of the given name.intgetChildCount()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.StringgetName()Returns the name of this configuration.java.lang.StringgetValue()Returns the value of this configuration.java.lang.StringgetValue(java.lang.String defaultValue)Returns the value of this configuration, or default if one cannot be found.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of this configuration.- Returns:
- the name of this configuration
-
getValue
java.lang.String getValue() throws PlexusConfigurationExceptionReturns the value of this configuration.- Returns:
- the value of this configuration
- Throws:
PlexusConfigurationException
-
getValue
java.lang.String getValue(java.lang.String defaultValue)
Returns the value of this configuration, or default if one cannot be found.- Parameters:
defaultValue- value to return if none is found- Returns:
- the value of this configuration
-
getAttributeNames
java.lang.String[] getAttributeNames()
Returns an array of attribute names.- Returns:
- an array of attribute names
-
getAttribute
java.lang.String getAttribute(java.lang.String paramName) throws PlexusConfigurationExceptionReturns the value of the named attribute.- Returns:
- the value of the named attribute
- Throws:
PlexusConfigurationException
-
getAttribute
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.- Parameters:
defaultValue- value to return if none is found- Returns:
- the value of the named attribute
-
getChild
PlexusConfiguration getChild(java.lang.String child)
Returns the child configuration of the given name.- Parameters:
child- the name of the child to return- Returns:
- the child configuration of the given name
-
getChild
PlexusConfiguration getChild(int i)
Returns the child configuration at the given location.- Parameters:
i- the position of the child under this configuration- Returns:
- the child configuration at the given location
-
getChild
PlexusConfiguration getChild(java.lang.String child, boolean createChild)
Returns the child configuration of the given name.- Parameters:
child- the name of the child to returncreateChild- true if a new child should be create, if none found- Returns:
- the child configuration of the given name, or new child if created
-
getChildren
PlexusConfiguration[] getChildren()
Returns an array of all child configurations.- Returns:
- an array of all child configurations
-
getChildren
PlexusConfiguration[] getChildren(java.lang.String name)
Returns an array of all child configurations with the given name.- Parameters:
name- the name of the children configurations to return- Returns:
- an array of all child configurations with the given name
-
addChild
void addChild(PlexusConfiguration configuration)
Adds a configuration under this configuration, which acts as a parent.- Parameters:
configuration- the child configuration to add
-
getChildCount
int getChildCount()
Returns the number of directly children under this configuration.- Returns:
- the number of directly children under this configuration.
-
-