org.oddjob.arooa
Interface RuntimeConfiguration

All Known Implementing Classes:
AntJobRtc, ArooaRuntime

public interface RuntimeConfiguration


Method Summary
 void addChild(RuntimeConfiguration child)
          Adds a child element to the wrapped element.
 void addText(char[] buf, int start, int count)
          Adds characters from #PCDATA areas to the wrapped element.
 void configure()
           
 void configure(RegistryLookup registry, boolean nullAllowed)
          Configures the wrapped element.
 java.lang.String getAttribute(java.lang.String name)
          Get the text for an attribute.
 java.util.Enumeration getChildren()
          Returns an enumeration of all child wrappers.
 java.lang.String getElementTag()
          Returns the tag name of the wrapped element.
 java.lang.Object getWrappedObject()
          Get the object for which this RuntimeConfigurable holds the configuration information
 

Method Detail

getWrappedObject

public java.lang.Object getWrappedObject()
Get the object for which this RuntimeConfigurable holds the configuration information

Returns:
the object whose configure is held by this instance.

getElementTag

public java.lang.String getElementTag()
Returns the tag name of the wrapped element.

Returns:
The tag name of the wrapped element. This is unlikely to be null, but may be.

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Get the text for an attribute.

Parameters:
name - The attribute name.
Returns:
The attributes text. Null if it's inline.

addChild

public void addChild(RuntimeConfiguration child)
Adds a child element to the wrapped element.

Parameters:
child - The child element wrapper to add to this one. Must not be null.

addText

public void addText(char[] buf,
                    int start,
                    int count)
Adds characters from #PCDATA areas to the wrapped element.

Parameters:
buf - A character array of the text within the element. Must not be null.
start - The start element in the array.
count - The number of characters to read from the array.

getChildren

public java.util.Enumeration getChildren()
Returns an enumeration of all child wrappers.

Returns:
an enumeration of the child wrappers.

configure

public void configure(RegistryLookup registry,
                      boolean nullAllowed)
               throws ArooaException
Configures the wrapped element. The attributes and text for the wrapped element are configured. Each time the wrapper is configured, the attributes and text for it are reset. If the element has an id attribute, a reference is added to the project as well.

Throws:
ArooaException - if the configuration fails, for instance due to invalid attributes or children, or text being added to an element which doesn't accept it.

configure

public void configure()
               throws ArooaException
Throws:
ArooaException