com.arsdigita.formbuilder
Class PersistentOptionGroup
java.lang.Object
com.arsdigita.domain.DomainObject
com.arsdigita.domain.ObservableDomainObject
com.arsdigita.kernel.ACSObject
com.arsdigita.auditing.AuditedACSObject
com.arsdigita.formbuilder.PersistentComponent
com.arsdigita.formbuilder.PersistentWidget
com.arsdigita.formbuilder.PersistentOptionGroup
- All Implemented Interfaces:
- AttributeMetaDataProvider, Audited, PersistentComponentFactory
- Direct Known Subclasses:
- PersistentCheckboxGroup, PersistentRadioGroup, PersistentSelect
- public abstract class PersistentOptionGroup
- extends PersistentWidget
This class is responsible for persisting Bebop OptionGroups. The OptionGroup
is saved with the save() method. To resurrect the OptionGroup, use the constructor
taking the id of the saved OptionGroup and then invoke createComponent().
- Version:
- $Id: //core-platform/dev/src/com/arsdigita/formbuilder/PersistentOptionGroup.java#10 $
- Author:
- Peter Marklund
Methods inherited from class com.arsdigita.formbuilder.PersistentWidget |
addValidationListener, clearValidationListeners, copyValuesToWidget, deserializeDefaultValue, getDefaultValue, getParameterModel, getParameterName, getValidationListeners, getValueClass, instantiateParameterModel, setDefaultValue, setParameterModel, setParameterName, setup |
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.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 |
versionId
public static final String versionId
- See Also:
- Constant Field Values
BASE_DATA_OBJECT_TYPE
public static final String BASE_DATA_OBJECT_TYPE
- BASE_DATA_OBJECT_TYPE represents the full name of the
underlying DataObject of this class.
- See Also:
- Constant Field Values
PersistentOptionGroup
public PersistentOptionGroup(String typeName)
- Constructor that creates a new OptionGroup domain object that
can be saved to the database later on.
PersistentOptionGroup
public PersistentOptionGroup(ObjectType type)
PersistentOptionGroup
public PersistentOptionGroup(DataObject obj)
PersistentOptionGroup
public PersistentOptionGroup(OID oID)
throws DataObjectNotFoundException
- Extending classes can use this constructor to set the sub class
id and object type.
delete
public void delete()
- Description copied from class:
DomainObject
- Deletes this object.
- Specified by:
delete
in interface PersistentComponentFactory
- Overrides:
delete
in class PersistentWidget
createComponent
public abstract Component createComponent()
- Create a sub class of OptionGroup. This method
must be implemented by sub clases.
- Specified by:
createComponent
in interface PersistentComponentFactory
- Specified by:
createComponent
in class PersistentComponent
addOption
public void addOption(PersistentOption option)
addOption
public void addOption(PersistentOption option,
boolean selected)
addOption
public void addOption(PersistentOption option,
int position)
addOption
public void addOption(PersistentOption option,
int position,
boolean selected)
removeOption
public void removeOption(PersistentOption option)
setOptionSelected
public void setOptionSelected(PersistentOption option,
boolean selected)
isMultiple
public abstract boolean isMultiple()
clearOptions
public void clearOptions()
- Will remove the association with the options and also attempt
to delete the options themselves.
getOptions
public Collection getOptions()
- Returns an iterator over the PersistentOption objects contained in this
option group
getSelectedOptions
protected List getSelectedOptions()
getAttributeMetaData
public AttributeMetaDataList getAttributeMetaData()
- I am overriding this method since I don't want default value to be
supplied on the add/edit form of PersistentOptionGroups
- Specified by:
getAttributeMetaData
in interface AttributeMetaDataProvider
- Overrides:
getAttributeMetaData
in class PersistentWidget
addDataToComponent
protected void addDataToComponent(Component component)
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC