Forge - Parent 1.0.0.Final

org.jboss.forge.maven.plugins
Class ConfigurationElementBuilder

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

public class ConfigurationElementBuilder
extends Object
implements ConfigurationElement

Author:
Paul Bakker

Method Summary
 ConfigurationElementBuilder addChild(PluginElement element)
           
 ConfigurationElementBuilder addChild(String configElement)
           
static ConfigurationElementBuilder create()
           
static ConfigurationElementBuilder create(ConfigurationBuilder configurationBuilder)
           
static ConfigurationElementBuilder create(ConfigurationElementBuilder elementBuilder)
           
 ConfigurationElementBuilder createConfigurationElement(String name)
           
static ConfigurationElementBuilder createFromExisting(ConfigurationElement 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()
           
 ConfigurationElementBuilder getParentElement()
           
 ConfigurationBuilder getParentPluginConfig()
           
 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 hasChilderen()
           
 boolean isPlugin()
           
 ConfigurationElementBuilder setName(String name)
           
 ConfigurationElementBuilder setText(String text)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

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

isPlugin

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

hasChilderen

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

getText

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

setText

public ConfigurationElementBuilder setText(String text)

addChild

public ConfigurationElementBuilder addChild(String configElement)

addChild

public ConfigurationElementBuilder addChild(PluginElement element)

getParentPluginConfig

public ConfigurationBuilder getParentPluginConfig()

getParentElement

public ConfigurationElementBuilder getParentElement()

create

public static ConfigurationElementBuilder create()

create

public static ConfigurationElementBuilder create(ConfigurationBuilder configurationBuilder)

create

public static ConfigurationElementBuilder create(ConfigurationElementBuilder elementBuilder)

createFromExisting

public static ConfigurationElementBuilder createFromExisting(ConfigurationElement element)

setName

public ConfigurationElementBuilder setName(String name)

createConfigurationElement

public ConfigurationElementBuilder createConfigurationElement(String name)

getChildren

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

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 - Parent 1.0.0.Final

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.