|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.controller.ControllerElement
A ControllerElement is the superclass for the three types of objects that are produced by a Controller when it transitions from one state to another. Output, Input and Transition objects all extend this class, and share the behaviors specified here. IMPORTANT NOTE: We don't use Logging (e.g. log4j) in this object, as it is sometimes stored in session when the server shuts down, and must be able to re-instantiate from the serialized form without needing to wait for ConfigManager to be initialized.
| Constructor Summary | |
protected |
ControllerElement()
Default constructor |
| Method Summary | |
void |
addNested(ControllerElement e)
Add a nested item to this element |
Vector |
allNested()
Return the nested items from this item |
Object |
clone()
Shouldn't be normally called directly. |
static ControllerElement |
fromXML(org.w3c.dom.Node n)
Base Class 'deserialization' from XML given a DOM Node N. |
protected static ControllerElement |
fromXML(org.w3c.dom.Node n,
ControllerElement ce)
Return a controller element based upon the xml fragment |
String |
getAttribute(String att)
Get the value of an "attribute" for this ControllerElement item. |
HashMap |
getAttributes()
Return the entire Hashtable of attribute values for this ControllerElement |
HashMap |
getAttributesOrNull()
Same as above but will return null if no attributes have ever been set. |
ControllerElement |
getContent(String name)
|
Vector |
getContents()
Returns the contents of this controller element |
protected ControllerResponse |
getControllerResponse()
|
String |
getDescription()
Get the description of this element |
int |
getDisplayLength()
Get the display length suggested by the controller for this item. |
String |
getLabel()
Get the label of this element |
int |
getLines()
Get the suggested number of lines for this item |
String |
getName()
Get the name of this element. |
Vector |
getNested()
Return the entire Vector of nested elements in this element |
ControllerElement |
getNested(String nestedName)
Return a specific Element nested within this Element |
int |
getNestedCount()
A method to support JSTL 1.0 usage; returns the size of the nested controller elements. |
Iterator |
getNestedIterator()
Retrieve the iterator to all tested objects. |
Map |
getNestedMap()
Return a Map of all nested elements keyed by controllerElement name. |
Vector |
getNestedOrNull()
Same as getNested. |
ControllerElement |
getParent()
Return the "parent" of this element - e.g. the element that this element is nested within |
String |
getTitle()
Get the name of this element. |
String |
getType()
Returns whatever the type is |
void |
remove()
Remove this item from the "nested" items of it's parent. |
void |
removeNested(ControllerElement elementToRemove)
Remove an element from the nested elements for this item |
void |
setAttribute(String attrib,
String val)
Set the named attribute of this Output to the given value |
void |
setControllerResponse(ControllerResponse newResponse)
Called by the ControllerResponse to hand itself back to this element so that it can be accessed by the elements as required |
void |
setDescription(String newDescription)
Used by the controller to set the description of this element |
void |
setDisplayLength(int newLength)
Set the suggested display length (in caracters) for this Controller element |
void |
setLabel(String newLabel)
Set a label for this element |
void |
setLines(int newLines)
Set the display number of lines suggested for this item |
void |
setName(String newName)
Used by the controller to set the name of this element |
void |
setParent(ControllerElement t)
Set the "parent" of this element - e.g. the element that this element is nested within |
void |
setType(String s)
Sets the descriptive data type for this ControllerElement |
FastStringBuffer |
toXML(FastStringBuffer stream)
Convert the object to an xml fragment. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected ControllerElement()
| Method Detail |
public Vector getContents()
public void addNested(ControllerElement e)
e - A ControllerElement to nest inside this elementpublic Vector allNested()
public Object clone()
throws CloneNotSupportedException
CloneNotSupportedException - as per the API spec.
public static ControllerElement fromXML(org.w3c.dom.Node n)
throws ControllerException
n - A DOM Node object.
ControllerException
protected static ControllerElement fromXML(org.w3c.dom.Node n,
ControllerElement ce)
throws ControllerException
n - The DOM node that represents the controller-elementce - The created controller element subclass
ControllerException - if fragment is not a controller elementpublic String getAttribute(String att)
att - The name of the attribute whose value is wanted
public HashMap getAttributes()
public HashMap getAttributesOrNull()
public ControllerElement getContent(String name)
public String getDescription()
public int getDisplayLength()
public String getLabel()
public int getLines()
public String getName()
public String getTitle()
public Vector getNested()
public int getNestedCount()
In JSTL 1.0 it is not possible to the retrieve sizes of collections directly without using a wrapper or a custom tag action.
public Vector getNestedOrNull()
public Iterator getNestedIterator()
public ControllerElement getParent()
public String getType()
public void remove()
throws ControllerException
ControllerException - if the current item is not nested
public void removeNested(ControllerElement elementToRemove)
throws ControllerException
elementToRemove - The element to be removed from the list of
nested items.
ControllerException - if there is no such item nested in this item
public void setAttribute(String attrib,
String val)
attrib - The name of an "attribtue" for this ControllerElement itemval - The value for this attributepublic void setDescription(String newDescription)
newDescription - The description being set by this objectpublic void setDisplayLength(int newLength)
newLength - The specified length for display of this elementpublic void setLabel(String newLabel)
newLabel - The new label for this elementpublic void setLines(int newLines)
newLines - The number of lines to specifypublic void setName(String newName)
newName - The new name for this elementpublic void setParent(ControllerElement t)
t - The ControllerElement that has this element as a nested itempublic void setType(String s)
s - a new java.lang.Stringpublic FastStringBuffer toXML(FastStringBuffer stream)
stream - a pre-allocated FastStringBuffer to append to
public ControllerElement getNested(String nestedName)
throws ControllerException
nestedName - the name of the element to retrieve
ControllerExceptionpublic Map getNestedMap()
public void setControllerResponse(ControllerResponse newResponse)
newResponse - the new Response.protected ControllerResponse getControllerResponse()
|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||