com.arsdigita.formbuilder
Class PersistentComponent

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.auditing.AuditedACSObject
                  extended bycom.arsdigita.formbuilder.PersistentComponent
All Implemented Interfaces:
AttributeMetaDataProvider, Audited, PersistentComponentFactory
Direct Known Subclasses:
PersistentFormSection, PersistentLabel, PersistentOption, PersistentText, PersistentWidget

public abstract class PersistentComponent
extends AuditedACSObject
implements PersistentComponentFactory, AttributeMetaDataProvider

The super class of all domain objects in the Form Builder service that enable persistence of Bebop Forms and their Components. Every sub class of this class will manage persistence of a particular Bebop component. Of special importance to the application developer is the save() method which is used to persist a component. The getID() method returns an ACSObject to be used when retrieving the component with the createComponent(BigDecimal) method.

Version:
$Id: //core-platform/dev/src/com/arsdigita/formbuilder/PersistentComponent.java#14 $
Author:
Peter Marklund
See Also:
SimpleQuestionnaire

Field Summary
static String ATTRIBUTE_STRING
           
static String BASE_DATA_OBJECT_TYPE
          The fully qualified name of the underlying DataObject of this class.
static String versionId
           
 
Fields inherited from class com.arsdigita.kernel.ACSObject
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE
 
Constructor Summary
PersistentComponent(DataObject obj)
           
PersistentComponent(ObjectType type)
           
PersistentComponent(OID oID)
          Sub classes may use this constructor to retrieve an existing Component domain object with an id and object type
PersistentComponent(String objectType)
          Sub classes can create a new component domain object with this constructor.
 
Method Summary
protected  void beforeSave()
          Save this PersistentComponent.
abstract  Component createComponent()
          Factory method that creates the Bebop component whose persistence is handled by this domain object.
 String getAdminName()
           
 AttributeMetaDataList getAttributeMetaData()
           
protected  String getComponentAttribute(String name)
          For use internally by extending classes to get Component attributes ( usually HTML attributes)
 String getDescription()
           
 void setAdminName(String adminName)
           
protected  void setComponentAttribute(String name, String value)
          For use internally by extending classes to set Component attributes ( usually HTML attributes)
 void setDescription(String description)
           
protected  void setDomainClass(String domainClass)
          The SimpleQuestionnaire needs to set this so that we can distinguish SimpleQuestionnaires from other PersistentForms
 
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, delete, 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
delete, getID, isNew, save
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
The fully qualified name of the underlying DataObject of this class.

See Also:
Constant Field Values

ATTRIBUTE_STRING

public static final String ATTRIBUTE_STRING
See Also:
Constant Field Values
Constructor Detail

PersistentComponent

public PersistentComponent(String objectType)
Sub classes can create a new component domain object with this constructor.


PersistentComponent

public PersistentComponent(ObjectType type)

PersistentComponent

public PersistentComponent(OID oID)
                    throws DataObjectNotFoundException
Sub classes may use this constructor to retrieve an existing Component domain object with an id and object type


PersistentComponent

public PersistentComponent(DataObject obj)
Method Detail

beforeSave

protected void beforeSave()
Save this PersistentComponent. All component attributes and the class name of this PersistentComponent instance are saved.

Overrides:
beforeSave in class ACSObject

createComponent

public abstract Component createComponent()
Factory method that creates the Bebop component whose persistence is handled by this domain object.

Specified by:
createComponent in interface PersistentComponentFactory

setDomainClass

protected void setDomainClass(String domainClass)
The SimpleQuestionnaire needs to set this so that we can distinguish SimpleQuestionnaires from other PersistentForms


setComponentAttribute

protected void setComponentAttribute(String name,
                                     String value)
For use internally by extending classes to set Component attributes ( usually HTML attributes)


getComponentAttribute

protected String getComponentAttribute(String name)
For use internally by extending classes to get Component attributes ( usually HTML attributes)


setAdminName

public void setAdminName(String adminName)

getAdminName

public String getAdminName()

setDescription

public void setDescription(String description)

getDescription

public String getDescription()

getAttributeMetaData

public AttributeMetaDataList getAttributeMetaData()
Specified by:
getAttributeMetaData in interface AttributeMetaDataProvider


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC