|
|||||||||||
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.formbuilder.MetaObject
The MetaObject class maintains the meta-information required by the formbuilder UI for creating and editing the attributes of persistent objects.
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
|
static String |
CLASS_NAME
|
static String |
PRETTY_NAME
|
static String |
PRETTY_PLURAL
|
static String |
PROPERTIES_FORM
|
static String |
TYPE_ID
|
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE, versionId |
Constructor Summary | |
MetaObject()
Default constructor. |
|
MetaObject(BigDecimal id)
Constructor. |
|
MetaObject(DataObject obj)
Constructor. |
|
MetaObject(ObjectType type)
Constructor used by subclasses when creating a new meta object. |
|
MetaObject(OID oid)
Constructor. |
|
MetaObject(String typeName)
Constructor used by subclasses when creating a new meta object. |
Method Summary | |
static MetaObject |
create(BebopObjectType type,
String prettyName,
String prettyPlural,
String className,
String propertiesForm)
Creates a new meta object, initialising all the default attributes |
static MetaObject |
findByClass(BebopObjectType type,
Class name)
Returns the meta object associated with a particular class. |
static MetaObject |
findByClassName(BebopObjectType type,
String name)
Returns the meta object associated with a particular class. |
String |
getPrettyName()
Gets the pretty name for the meta object |
String |
getPrettyPlural()
Gets the pretty plural name for the meta object |
Class |
getPropertiesForm()
Gets the class used to create and edit instances of the widget represented by this meta object. |
String |
getPropertiesFormName()
Gets the class used to create and edit instances of the widget represented by this meta object. |
BebopObjectType |
getType()
Retrieves teh object type for the meta object |
Class |
getWidgetClass()
Gets the class represented by this meta object |
String |
getWidgetClassName()
Gets the widget class name for the meta object |
static MetaObjectCollection |
getWidgets(BebopObjectType type)
Retrieves a collection of all the meta objects related to a particular object type |
static MetaObjectCollection |
getWidgets(String app,
Class type)
Retrieves a collection of all the meta objects related to a particular object type |
static MetaObjectCollection |
getWidgets(String app,
String className)
Retrieves a collection of all the meta objects related to a particular object type |
static MetaObject |
retrieve(DataObject obj)
|
void |
setPrettyName(String name)
Sets the pretty name for the meta object |
void |
setPrettyPlural(String name)
Sets the pretty plural name for the meta object |
void |
setPropertiesForm(Class type)
Sets the class used to create and edit instances of the widget represented by this meta object. |
void |
setPropertiesFormName(String name)
Sets the class name used to create and edit instances of the widget represented by this meta object. |
void |
setType(BebopObjectType type)
Sets the object type for the meta object |
protected void |
setup(BebopObjectType type,
String prettyName,
String prettyPlural,
String className,
String propertiesForm)
This method is intended to be called by static create methods to setup any required
attributes when creating a new meta object. |
void |
setWidgetClass(Class type)
Sets the widget class that this meta object represents |
void |
setWidgetClassName(String name)
Sets the widget class name for the meta object |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, beforeSave, checkPrivilege, doCreateCheck, doWriteCheck, getBaseDataObjectType, getContainer, getDefaultDomainClass, getDisplayName, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, initialize, 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 |
Field Detail |
public static final String BASE_DATA_OBJECT_TYPE
public static final String TYPE_ID
public static final String PRETTY_NAME
public static final String PRETTY_PLURAL
public static final String CLASS_NAME
public static final String PROPERTIES_FORM
Constructor Detail |
public MetaObject()
public MetaObject(String typeName)
typeName
- the base data object typepublic MetaObject(ObjectType type)
type
- the base data object typepublic MetaObject(DataObject obj)
obj
- the data objectpublic MetaObject(BigDecimal id) throws DataObjectNotFoundException
id
- the id of the object to retrievepublic MetaObject(OID oid) throws DataObjectNotFoundException
Method Detail |
public static MetaObject create(BebopObjectType type, String prettyName, String prettyPlural, String className, String propertiesForm)
type
- the ObjectType
related to the meta objectprettyName
- the pretty name of the objectprettyPlural
- the plural of the pretty nameclassName
- the fully qualified java class name of the object
whose meta information is being maintainedpropertiesForm
- the name of a subclass of
PropertiesForm
used to create
and edit the object.protected void setup(BebopObjectType type, String prettyName, String prettyPlural, String className, String propertiesForm)
create
methods to setup any required
attributes when creating a new meta object.
type
- the BebopObjectType
related to the meta objectprettyName
- the pretty name of the objectprettyPlural
- the plural of the pretty nameclassName
- the fully qualified java class name of the object
whose meta information is being maintainedpropertiesForm
- the name of a subclass of
PropertiesForm
used to create
and edit the object.public static MetaObject retrieve(DataObject obj)
public static MetaObject findByClass(BebopObjectType type, Class name) throws DataObjectNotFoundException
name
- the class to find the meta object for
com.arsdigita.domainDataObjectNotFoundException
- if no meta object
could be found for this specified class
DataObjectNotFoundException
public static MetaObject findByClassName(BebopObjectType type, String name) throws DataObjectNotFoundException
name
- the name of the class to find the meta object for
com.arsdigita.domainDataObjectNotFoundException
- if no meta object
could be found for this specified class
DataObjectNotFoundException
public static MetaObjectCollection getWidgets(String app, String className) throws DataObjectNotFoundException
className
- the name of the object type to
retrieve objects for.
DataObjectNotFoundException
- if there
is no object type matching the className parameterpublic static MetaObjectCollection getWidgets(String app, Class type) throws DataObjectNotFoundException
DataObjectNotFoundException
- if there
is no object type matching the class parameterpublic static MetaObjectCollection getWidgets(BebopObjectType type)
type
- the object type to
retrieve objects for.public void setType(BebopObjectType type)
type
- the new object typepublic BebopObjectType getType() throws DataObjectNotFoundException
DataObjectNotFoundException
- if the
object type could not be retrievedpublic void setPrettyName(String name)
name
- the new pretty namepublic String getPrettyName()
public void setPrettyPlural(String name)
name
- the new pretyy plural namepublic String getPrettyPlural()
public void setWidgetClass(Class type)
type
- the class of the widgetpublic Class getWidgetClass() throws ClassNotFoundException
ClassNotFoundException
public void setWidgetClassName(String name)
name
- the name of the widget classpublic String getWidgetClassName()
public void setPropertiesForm(Class type)
PropertiesEditor
or
PropertiesForm
type
- the class for the formpublic Class getPropertiesForm() throws ClassNotFoundException
ClassNotFoundException
public void setPropertiesFormName(String name)
PropertiesEditor
or
PropertiesForm
name
- the fully qualified class namepublic String getPropertiesFormName()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |