|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.oddjob.ant.AntJobRtc
Wrapper class that holds the attributes of an element, its children, and any text within it. It then takes care of configuring that element at runtime.
Based on an original by Stefan Bodewig
| Constructor Summary | |
AntJobRtc(org.apache.tools.ant.Project project,
java.lang.Object proxy,
java.lang.String elementTag)
Sole constructor creating a wrapper for the specified object. |
|
| 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 |
addText(java.lang.String data)
Adds characters from #PCDATA areas to the wrapped element. |
void |
configure()
Configure with preset or no properties. |
void |
configure(RegistryLookup registry,
boolean nullAllowed)
Configures the wrapped element. |
java.lang.String |
getAttribute(java.lang.String name)
Get the PropertyHelper for an attribute. |
java.util.Hashtable |
getAttributeMap()
Return the attribute map. |
java.util.Enumeration |
getChildren()
Returns an enumeration of all child wrappers. |
java.lang.String |
getElementTag()
Returns the tag name of the wrapped element. |
RegistryLookup |
getRegistryLookup()
|
java.lang.StringBuffer |
getText()
Get the text content of this element. |
java.lang.Object |
getWrappedObject()
Get the object for which this RuntimeConfigurable holds the configuration information |
boolean |
isNullAllowed()
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
Set an attribute to a given value |
void |
setNullAllowed(boolean value)
|
void |
setRegistryLookup(RegistryLookup registry)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AntJobRtc(org.apache.tools.ant.Project project,
java.lang.Object proxy,
java.lang.String elementTag)
proxy - The element to configure. Must not be null.elementTag - The tag name generating this element.
Should not be null.| Method Detail |
public java.lang.Object getWrappedObject()
getWrappedObject in interface RuntimeConfigurationpublic void setNullAllowed(boolean value)
public boolean isNullAllowed()
public void setAttribute(java.lang.String name,
java.lang.String value)
name - the name of the attribute.value - the attribute's value.public java.lang.String getAttribute(java.lang.String name)
getAttribute in interface RuntimeConfigurationname - The attribute name.
public java.util.Hashtable getAttributeMap()
public void addChild(RuntimeConfiguration child)
addChild in interface RuntimeConfigurationchild - The child element wrapper to add to this one.
Must not be null.public java.util.Enumeration getChildren()
getChildren in interface RuntimeConfigurationpublic void addText(java.lang.String data)
data - Text to add to the wrapped element.
Should not be null.
public void addText(char[] buf,
int start,
int count)
addText in interface RuntimeConfigurationbuf - 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.public java.lang.StringBuffer getText()
public java.lang.String getElementTag()
getElementTag in interface RuntimeConfigurationnull, but may be.
public void configure()
throws ArooaException
configure in interface RuntimeConfigurationArooaException - If it can't be configured.
public void configure(RegistryLookup registry,
boolean nullAllowed)
throws ArooaException
id attribute, a reference
is added to the project as well.
configure in interface RuntimeConfigurationArooaException - if the configuration fails, for instance due
to invalid attributes or children, or text being added to
an element which doesn't accept it.public RegistryLookup getRegistryLookup()
public void setRegistryLookup(RegistryLookup registry)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||