Forge - Maven API 2.0.0.Alpha3

org.jboss.forge.maven.plugins
Class ConfigurationElementImpl

java.lang.Object
  extended by org.jboss.forge.maven.plugins.ConfigurationElementImpl
All Implemented Interfaces:
ConfigurationElement, PluginElement

public class ConfigurationElementImpl
extends Object
implements ConfigurationElement

Author:
Paul Bakker

Constructor Summary
ConfigurationElementImpl()
           
 
Method Summary
 void addChild(PluginElement element)
           
 ConfigurationElement getChildByContent(String content)
          Returns the child element that contains the given content.
 ConfigurationElement getChildByContent(String content, boolean directChildsOnly)
          Returns the child element that contains the given content.
 ConfigurationElement getChildByName(String name)
          Checks if the child element that has the given name exists.
 ConfigurationElement getChildByName(String name, boolean directChildsOnly)
          Returns the child element that has the given name exists.
 List<PluginElement> getChildren()
           
 String getName()
           
 String getText()
           
 boolean hasChildByContent(String content)
          Checks if a child element is present with the given content.
 boolean hasChildByContent(String content, boolean directChildsOnly)
          Checks if a child element is present with the given content.
 boolean hasChildByName(String name)
          Checks if the child element that has the given name exists.
 boolean hasChildByName(String name, boolean directChildsOnly)
          Checks if the child element that has the given name exists.
 boolean hasChildren()
           
 boolean isPlugin()
           
 void setChildren(List<PluginElement> children)
           
 void setName(String name)
           
 void setText(String text)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigurationElementImpl

public ConfigurationElementImpl()
Method Detail

setName

public void setName(String name)

setText

public void setText(String text)

getName

public String getName()
Specified by:
getName in interface ConfigurationElement

isPlugin

public boolean isPlugin()
Specified by:
isPlugin in interface ConfigurationElement

hasChildren

public boolean hasChildren()
Specified by:
hasChildren in interface ConfigurationElement

getText

public String getText()
Specified by:
getText in interface ConfigurationElement

addChild

public void addChild(PluginElement element)

getChildren

public List<PluginElement> getChildren()
Specified by:
getChildren in interface ConfigurationElement

setChildren

public void setChildren(List<PluginElement> children)

hasChildByContent

public boolean hasChildByContent(String content,
                                 boolean directChildsOnly)
Description copied from interface: ConfigurationElement
Checks if a child element is present with the given content.

Specified by:
hasChildByContent in interface ConfigurationElement
Parameters:
content - The content to filter on.
directChildsOnly - True if only direct elements should be matched
Returns:
True if an element was found containing the given content

hasChildByContent

public boolean hasChildByContent(String content)
Description copied from interface: ConfigurationElement
Checks if a child element is present with the given content. Also search indirect child elements.

Specified by:
hasChildByContent in interface ConfigurationElement
Parameters:
content - The content to filter on.
Returns:
True if an element was found containing the given content
See Also:
ConfigurationElement.hasChildByContent(String, boolean)

getChildByContent

public ConfigurationElement getChildByContent(String content,
                                              boolean directChildsOnly)
Description copied from interface: ConfigurationElement
Returns the child element that contains the given content.

Specified by:
getChildByContent in interface ConfigurationElement
Parameters:
content - The content to filter on.
directChildsOnly - True if only direct elements should be matched
Returns:
The element found, or raises an ConfigurationElementNotFoundException if the element was not found.

getChildByContent

public ConfigurationElement getChildByContent(String content)
Description copied from interface: ConfigurationElement
Returns the child element that contains the given content. Also search indirect child elements.

Specified by:
getChildByContent in interface ConfigurationElement
Parameters:
content - The content to filter on.
Returns:
The element found, or raises an ConfigurationElementNotFoundException if the element was not found.
See Also:
ConfigurationElement.getChildByContent(String, boolean)

hasChildByName

public boolean hasChildByName(String name,
                              boolean directChildsOnly)
Description copied from interface: ConfigurationElement
Checks if the child element that has the given name exists.

Specified by:
hasChildByName in interface ConfigurationElement
Parameters:
name - The element name to filter on.
directChildsOnly - True if only direct elements should be matched
Returns:
The element found, or raises an ConfigurationElementNotFoundException if the element was not found.

hasChildByName

public boolean hasChildByName(String name)
Description copied from interface: ConfigurationElement
Checks if the child element that has the given name exists. Also search indirect child elements.

Specified by:
hasChildByName in interface ConfigurationElement
Parameters:
name - The element name to filter on.
Returns:
The element found, or raises an ConfigurationElementNotFoundException if the element was not found.

getChildByName

public ConfigurationElement getChildByName(String name,
                                           boolean directChildsOnly)
Description copied from interface: ConfigurationElement
Returns the child element that has the given name exists.

Specified by:
getChildByName in interface ConfigurationElement
Parameters:
name - The element name to filter on.
directChildsOnly - True if only direct elements should be matched
Returns:
The element found, or raises an ConfigurationElementNotFoundException if the element was not found.

getChildByName

public ConfigurationElement getChildByName(String name)
Description copied from interface: ConfigurationElement
Checks if the child element that has the given name exists. Also search indirect child elements.

Specified by:
getChildByName in interface ConfigurationElement
Parameters:
name - The element name to filter on.
Returns:
The element found, or raises an ConfigurationElementNotFoundException if the element was not found.

toString

public String toString()
Overrides:
toString in class Object

Forge - Maven API 2.0.0.Alpha3

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.