|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cocoon.forms.formmodel.AbstractWidgetDefinition
Provides functionality that is common across many WidgetDefinition implementations.
Field Summary | |
protected CreateListener |
createListener
|
protected WidgetDefinition |
parent
|
Constructor Summary | |
AbstractWidgetDefinition()
|
Method Summary | |
protected void |
addCreateListener(CreateListener listener)
|
void |
addValidator(WidgetValidator validator)
|
void |
checkCompleteness()
Checks if this definition is complete or not. |
protected void |
checkMutable()
Check that this definition is mutable, i.e. is in setup phase. |
protected void |
copyMap(Map dest,
Map src)
helper to copy a map |
void |
fireCreateEvent(CreateEvent event)
|
void |
generateDisplayData(ContentHandler contentHandler)
Generates SAX events for display data. |
void |
generateDisplayData(String name,
ContentHandler contentHandler)
Generates SAX events for named display data. |
void |
generateLabel(ContentHandler contentHandler)
Generates SAX events for the label of this widget. |
Object |
getAttribute(String name)
Gets an attribute that has been defined on the widget's definition. |
FormDefinition |
getFormDefinition()
Gets the FormDefinition . |
String |
getId()
Gets id of this widget definition. |
Location |
getLocation()
Gets source location of this widget definition. |
WidgetDefinition |
getParent()
Gets the parent of this definition. |
WidgetState |
getState()
|
void |
initializeFrom(WidgetDefinition definition)
initialize this definition with the other, sort of like a copy constructor |
void |
makeImmutable()
Locks this definition so that it becomes immutable. |
protected void |
setAttributes(Map attributes)
|
void |
setDisplayData(Map displayData)
Sets the various display data for this widget. |
protected void |
setId(String id)
|
void |
setLocation(Location location)
|
void |
setParent(WidgetDefinition definition)
Sets the parent of this definition |
void |
setState(WidgetState state)
|
boolean |
validate(Widget widget)
Validate a widget using the validators that were defined in its definition. |
void |
widgetCreated(Widget widget)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cocoon.forms.formmodel.WidgetDefinition |
createInstance |
Field Detail |
protected WidgetDefinition parent
protected CreateListener createListener
Constructor Detail |
public AbstractWidgetDefinition()
Method Detail |
public FormDefinition getFormDefinition()
WidgetDefinition
FormDefinition
.
getFormDefinition
in interface WidgetDefinition
public void initializeFrom(WidgetDefinition definition) throws Exception
initializeFrom
in interface WidgetDefinition
Exception
protected void copyMap(Map dest, Map src)
dest
- destination mapsrc
- source mappublic void checkCompleteness() throws IncompletenessException
checkCompleteness
in interface WidgetDefinition
IncompletenessException
public void makeImmutable()
protected void checkMutable()
public void setParent(WidgetDefinition definition)
setParent
in interface WidgetDefinition
public WidgetDefinition getParent()
public WidgetState getState()
public void setState(WidgetState state)
public void setLocation(Location location)
public Location getLocation()
WidgetDefinition
getLocation
in interface WidgetDefinition
public String getId()
WidgetDefinition
getId
in interface WidgetDefinition
protected void setId(String id)
protected void setAttributes(Map attributes)
public Object getAttribute(String name)
WidgetDefinition
getAttribute
in interface WidgetDefinition
name
- the attribute name
protected void addCreateListener(CreateListener listener)
public void widgetCreated(Widget widget)
public void fireCreateEvent(CreateEvent event)
public void generateLabel(ContentHandler contentHandler) throws SAXException
WidgetDefinition
generateLabel
in interface WidgetDefinition
SAXException
public void setDisplayData(Map displayData)
displayData
- an association of {name, sax fragment}public void addValidator(WidgetValidator validator)
public void generateDisplayData(String name, ContentHandler contentHandler) throws SAXException
WidgetDefinition
generateDisplayData
in interface WidgetDefinition
SAXException
public void generateDisplayData(ContentHandler contentHandler) throws SAXException
WidgetDefinition
generateDisplayData
in interface WidgetDefinition
SAXException
public boolean validate(Widget widget)
WidgetDefinition
validate
in interface WidgetDefinition
widget
- the widget
true
if validation was successful.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |