|
|||||||||||
| 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 Library |
enclosingLibrary
|
protected WidgetDefinition |
parent
|
| Constructor Summary | |
AbstractWidgetDefinition()
|
|
| Method Summary | |
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. |
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. |
Library |
getEnclosingLibrary()
Gets the Library object containing this definition |
FormDefinition |
getFormDefinition()
Gets the FormDefinition. |
String |
getId()
Gets id of this widget definition. |
org.apache.cocoon.util.location.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. |
void |
setAttributes(Map attributes)
|
void |
setDisplayData(Map displayData)
Sets the various display data for this widget. |
void |
setEnclosingLibrary(Library library)
Sets the Library object containing this definition (should only be used by Library itself!) |
void |
setId(String id)
|
void |
setLocation(org.apache.cocoon.util.location.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 Library enclosingLibrary
protected CreateListener createListener
| Constructor Detail |
public AbstractWidgetDefinition()
| Method Detail |
public FormDefinition getFormDefinition()
WidgetDefinitionFormDefinition.
getFormDefinition in interface WidgetDefinitionpublic Library getEnclosingLibrary()
WidgetDefinition
getEnclosingLibrary in interface WidgetDefinitionpublic void setEnclosingLibrary(Library library)
WidgetDefinition
setEnclosingLibrary in interface WidgetDefinition
public void initializeFrom(WidgetDefinition definition)
throws Exception
initializeFrom in interface WidgetDefinitionException
public void checkCompleteness()
throws IncompletenessException
checkCompleteness in interface WidgetDefinitionIncompletenessExceptionpublic void makeImmutable()
protected void checkMutable()
public void setParent(WidgetDefinition definition)
setParent in interface WidgetDefinitionpublic WidgetDefinition getParent()
public WidgetState getState()
public void setState(WidgetState state)
public void setLocation(org.apache.cocoon.util.location.Location location)
public org.apache.cocoon.util.location.Location getLocation()
WidgetDefinition
getLocation in interface WidgetDefinitionpublic String getId()
WidgetDefinition
getId in interface WidgetDefinitionpublic void setId(String id)
public void setAttributes(Map attributes)
public Object getAttribute(String name)
WidgetDefinition
getAttribute in interface WidgetDefinitionname - the attribute name
public 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 WidgetDefinitionSAXExceptionpublic 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 WidgetDefinitionSAXException
public void generateDisplayData(ContentHandler contentHandler)
throws SAXException
WidgetDefinition
generateDisplayData in interface WidgetDefinitionSAXExceptionpublic boolean validate(Widget widget)
WidgetDefinition
validate in interface WidgetDefinitionwidget - the widget
true if validation was successful.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||