|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pietschy.command.AbstractBuilder
public class AbstractBuilder
Provides common methods required by all builders.
Constructor Summary | |
---|---|
AbstractBuilder()
|
Method Summary | |
---|---|
protected java.lang.String |
getAttribute(org.w3c.dom.Element element,
java.lang.String attributeName)
Gets an attribute from an element. |
CommandManager |
getCommandManager()
Gets the associated CommandManager for the builder to use as required. |
java.lang.String |
getElementPath(org.w3c.dom.Element element)
Returns a string representing the elements position in the command heirarchy. |
protected java.lang.String |
getElementText(org.w3c.dom.Element element)
Gets the textural value of an element. |
protected boolean |
isEmptyElement(org.w3c.dom.Element element)
Checks if the specified element is empty. |
protected boolean |
isIncluded(org.w3c.dom.Element e)
Tests if the specified element has been conditionally included. |
protected void |
populateProperties(Command command,
org.w3c.dom.Element commandRoot)
|
void |
setCommandManager(CommandManager commandManager)
Sets the associated CommandManager for the builder to use as required. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractBuilder()
Method Detail |
---|
public CommandManager getCommandManager()
CommandManager
for the builder to use as required. This will be
configured when the builder is installed. The CommandManager
is typically used to gain access the the class loader and resource bundle.
CommandManager
.CommandManager.getClassLoader()
public void setCommandManager(CommandManager commandManager)
CommandManager
for the builder to use as required. This will be
configured when the builder is installed. The CommandManager
is typically used to gain access the the class loader and resource bundle.
commandManager
- the associated CommandManager
.CommandManager.getClassLoader()
protected java.lang.String getElementText(org.w3c.dom.Element element)
Names.I18N_ATTRIBUTE
then
this method will attempt to load the value from the resource bundle.
element
- the element whose text value is to be extracted.
protected java.lang.String getAttribute(org.w3c.dom.Element element, java.lang.String attributeName)
Names.I18N_ATTRIBUTE_PREFIX
then
this method will attempt to load the attribute from the resource bundle. This method returns null if
the the requested attribute isn't present.
element
- the element constaining the attributeattributeName
- the attribute name
protected boolean isEmptyElement(org.w3c.dom.Element element)
element
- the element to check.
public java.lang.String getElementPath(org.w3c.dom.Element element)
element
- the element to examine.
protected boolean isIncluded(org.w3c.dom.Element e)
This method will always return true
if there is no include-if element. If present, this method will evaulate the exprerssion using
ConditionEvaluator.evaluate(String)
returning the result.
e
- the element that may or may not have a include-if attriubte.
protected void populateProperties(Command command, org.w3c.dom.Element commandRoot)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |