de.smartics.ci.config.hudson
Enum HudsonConfigElement

Package class diagram package HudsonConfigElement
java.lang.Object
  extended by java.lang.Enum<HudsonConfigElement>
      extended by de.smartics.ci.config.hudson.HudsonConfigElement
All Implemented Interfaces:
Serializable, Comparable< HudsonConfigElement>

public enum HudsonConfigElement
     
     
extends Enum< HudsonConfigElement>

Definition of XML elements of a Hudson configuration.


Enum Constant Summary
ENTRY
          Identifies the entry XML element.
 
Method Summary
static org.jdom.Element findElement(org.jdom.Element rootElement, org.jdom.Element element, org.jdom.Element targetRootElement)
          Finds the element within the target root element.
 String getName()
          Returns the name of the XML element this enum element identifies.
static HudsonConfigElement valueFor(String elementName)
          Returns the element for the given name.
static HudsonConfigElement valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HudsonConfigElement[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ENTRY

public static final HudsonConfigElement ENTRY
Identifies the entry XML element.

Method Detail

values

public static HudsonConfigElement[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (HudsonConfigElement c : HudsonConfigElement.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static HudsonConfigElement valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getName

public String getName()
Returns the name of the XML element this enum element identifies.

Returns:
the name of the XML element this enum element identifies.

valueFor

public static HudsonConfigElement valueFor(String elementName)
                                    throws IllegalArgumentException
Returns the element for the given name.

Parameters:
elementName - the name of the request element.
Returns:
the requested element.
Throws:
IllegalArgumentException - if the elementName does not match a known element name.

findElement

public static org.jdom.Element findElement(org.jdom.Element rootElement,
                                           org.jdom.Element element,
                                           org.jdom.Element targetRootElement)
                                    throws org.jdom.JDOMException
Finds the element within the target root element.

rootElement is analog to targetRootElement. This method finds the analog element of element within the target document.

Parameters:
rootElement - the root element to the element.
element - the element relative to the rootElement.
targetRootElement - the root element within which the element specified by element is requested. This root element is the root element of the target document.
Returns:
the analog element of element within targetRootElement.
Throws:
org.jdom.JDOMException - on any problem accessing any element information.


Copyright © 2012 Kronseder & Reiner GmbH - smartics. All Rights Reserved.