|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.domain.DomainObject
com.arsdigita.domain.ObservableDomainObject
com.arsdigita.kernel.ACSObject
com.arsdigita.auditing.AuditedACSObject
com.arsdigita.formbuilder.PersistentComponent
com.arsdigita.formbuilder.PersistentWidget
This class is responsible for persisting attributes common to Bebop Widgets. Sub classes of this abstract class manage persistence of different Bebop Widgets (TextArea etc.).
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
BASE_DATA_OBJECT_TYPE represents the full name of the underlying DataObject of this class. |
static String |
DEFAULT_VALUE
|
static String |
versionId
|
Fields inherited from class com.arsdigita.formbuilder.PersistentComponent |
ATTRIBUTE_STRING |
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE |
Constructor Summary | |
PersistentWidget(DataObject obj)
|
|
PersistentWidget(ObjectType type)
|
|
PersistentWidget(OID oID)
Sub classes may use this constructor to retrieve an existing Widget domain object with an id and object type. |
|
PersistentWidget(String objectType)
Sub classes can create a new widget domain object with this constructor. |
Method Summary | |
void |
addValidationListener(PersistentParameterListener parameterListener)
|
void |
clearValidationListeners()
Removes all validation listeners associated with this widget |
protected void |
copyValuesToWidget(Widget widget)
|
void |
delete()
Deletes this object. |
static Object |
deserializeDefaultValue(String defaultValue)
This provides a method to take a default value and deserialize it in to its original object. |
AttributeMetaDataList |
getAttributeMetaData()
|
Object |
getDefaultValue()
Get the default value of the widget. |
String |
getParameterModel()
Will return null if no value has been set. |
String |
getParameterName()
Will return null if no value has been set. |
Collection |
getValidationListeners()
Return a collection with all PersistentParameterListeners of this widget. |
protected Class |
getValueClass()
Most Widgets have String as their value class which is what is returned by this default implementation. |
protected ParameterModel |
instantiateParameterModel()
|
void |
setDefaultValue(Object defaultValue)
You have to make sure that the defaulValue is an instance of the Class returned by the method getValueClass() (for example this is a String for TextAreas and a java.util.Date for Dates). |
void |
setParameterModel(String parameterModel)
The class name of the parameter model to be used for the widget |
void |
setParameterName(String parameterName)
|
protected void |
setup(String parameterName)
|
Methods inherited from class com.arsdigita.formbuilder.PersistentComponent |
beforeSave, createComponent, getAdminName, getComponentAttribute, getDescription, setAdminName, setComponentAttribute, setDescription, setDomainClass |
Methods inherited from class com.arsdigita.auditing.AuditedACSObject |
getCreationDate, getCreationIP, getCreationUser, getLastModifiedDate, getLastModifiedIP, getLastModifiedUser, initialize |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getBaseDataObjectType, getContainer, getDefaultDomainClass, getDisplayName, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, isContainerModified, setID, setID |
Methods inherited from class com.arsdigita.domain.ObservableDomainObject |
addObserver, getObservers |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, clear, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.arsdigita.formbuilder.PersistentComponentFactory |
getID, isNew, save |
Field Detail |
public static final String versionId
public static final String DEFAULT_VALUE
public static final String BASE_DATA_OBJECT_TYPE
Constructor Detail |
public PersistentWidget(String objectType)
public PersistentWidget(ObjectType type)
public PersistentWidget(DataObject obj)
public PersistentWidget(OID oID) throws DataObjectNotFoundException
Method Detail |
protected void setup(String parameterName)
public void delete()
DomainObject
delete
in interface PersistentComponentFactory
delete
in class DomainObject
DataObject.delete()
public void setParameterName(String parameterName)
public String getParameterName()
public void addValidationListener(PersistentParameterListener parameterListener)
public Collection getValidationListeners()
public void clearValidationListeners()
public void setParameterModel(String parameterModel)
public String getParameterModel()
public void setDefaultValue(Object defaultValue)
public Object getDefaultValue()
public static Object deserializeDefaultValue(String defaultValue)
protected Class getValueClass()
public AttributeMetaDataList getAttributeMetaData()
getAttributeMetaData
in interface AttributeMetaDataProvider
getAttributeMetaData
in class PersistentComponent
protected ParameterModel instantiateParameterModel()
protected void copyValuesToWidget(Widget widget)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |