|
|||||||||||
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.cms.ContentType
A Content Type defines the characteristics of a content
item. Content management resources are registered to a content
type, including the Authoring Kit
, and templates
.
Each content type is associated with a domain object
and a data object
type.
Field Summary | |
static String |
AUTHORING_KIT
|
static String |
BASE_DATA_OBJECT_TYPE
|
static String |
CLASSNAME
|
static String |
DESCRIPTION
|
static String |
IS_INTERNAL
|
static String |
ITEM_FORM
|
static String |
ITEM_FORM_ID
|
static String |
LABEL
|
static String |
OBJECT_TYPE
|
static String |
versionId
|
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID |
Constructor Summary | |
|
ContentType()
Default constructor. |
|
ContentType(BigDecimal id)
Constructor. |
|
ContentType(com.arsdigita.persistence.DataObject obj)
|
|
ContentType(com.arsdigita.persistence.OID oid)
Constructor. |
protected |
ContentType(String type)
|
Method Summary | |
protected void |
beforeSave()
|
AuthoringKit |
createAuthoringKit()
Create an authoring kit to this content type. |
AuthoringKit |
createAuthoringKit(String createComponent)
Create an authoring kit to this content type. |
static ContentType |
findByAssociatedObjectType(String objType)
Find the content type with the associated with the object type. |
static ContentTypeCollection |
getAllContentTypes()
Fetches a collection of all content types, including internal content types. |
String |
getAssociatedObjectType()
Returns the object type of the items of this content type. |
AuthoringKit |
getAuthoringKit()
Fetch the authoring kit for this content type. |
String |
getBaseDataObjectType()
|
String |
getClassName()
Fetch the class name of the Java domain object implementation. |
String |
getDescription()
Fetches the description for the content type. |
com.arsdigita.formbuilder.PersistentForm |
getItemForm()
Retrieve the persistent form of this content type |
BigDecimal |
getItemFormID()
Fetch the item creation form id of the Java domain object implementation. |
String |
getLabel()
Fetches the label for the content type. |
static ContentTypeCollection |
getRegisteredContentTypes()
Fetches a collection of content types that have been registered to at least one content section, excluding internal content types. |
static ContentTypeCollection |
getUserDefinedContentTypes()
Fetches a collection of all user-defined (non-internal) content types. |
static Iterator |
getXSLFileURLs()
Gets an iterator of java.net.URL objects for all registered XSL files |
Boolean |
isInternal()
An internal content type is one that is not user-defined and maintained internally. |
static void |
registerXSLFile(ContentType type,
String path)
NB this interface is liable to change. |
void |
setAssociatedObjectType(String objType)
Set the data object type representation of this content type. |
void |
setClassName(String className)
Set the name of the Java class implementation of this content type. |
void |
setDescription(String description)
Sets the description for this content type. |
void |
setInternal(boolean isInternal)
Make this content type internal or not. |
void |
setItemFormID(BigDecimal itemFormID)
Sets the item creation form id of the Java domain object implementation. |
void |
setLabel(String label)
Sets the label for this content type. |
static void |
unregisterXSLFile(ContentType type,
String path)
NB this interface is liable to change. |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, 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 versionId
public static final String BASE_DATA_OBJECT_TYPE
public static final String OBJECT_TYPE
public static final String LABEL
public static final String DESCRIPTION
public static final String CLASSNAME
public static final String IS_INTERNAL
public static final String AUTHORING_KIT
public static final String ITEM_FORM_ID
public static final String ITEM_FORM
Constructor Detail |
public ContentType()
public ContentType(com.arsdigita.persistence.OID oid) throws com.arsdigita.domain.DataObjectNotFoundException
DataObject
is retrieved
from the persistent storage mechanism with an OID
specified by oid.
oid
- The OID
for the retrieved
DataObject
.public ContentType(BigDecimal id) throws com.arsdigita.domain.DataObjectNotFoundException
DataObject
is retrieved
from the persistent storage mechanism with an OID
specified by id and
ContentType.BASE_DATA_OBJECT_TYPE
.
id
- The id
for the retrieved
DataObject
.protected ContentType(String type)
public ContentType(com.arsdigita.persistence.DataObject obj)
Method Detail |
public String getBaseDataObjectType()
protected void beforeSave()
public String getAssociatedObjectType()
public void setAssociatedObjectType(String objType)
objType
- The qualified name of the data object typepublic String getLabel()
public void setLabel(String label)
label
- The labelpublic String getDescription()
public void setDescription(String description)
description
- The descriptionpublic String getClassName()
public void setClassName(String className)
className
- The name of the Java domain objectpublic Boolean isInternal()
An internal content type is one that is not user-defined and maintained internally. A content type should be made internal under the following two conditions:
The Template
content type is one such
internal content type.
public void setInternal(boolean isInternal)
isInternal
- true if this content type should be internal,
false otherwisepublic AuthoringKit getAuthoringKit()
public AuthoringKit createAuthoringKit()
save()
method on the
returned AuthoringKit.
public AuthoringKit createAuthoringKit(String createComponent)
save()
method on the
returned AuthoringKit.
createComponent
- the create component class associated with
the authoring kitpublic BigDecimal getItemFormID()
public void setItemFormID(BigDecimal itemFormID)
itemFormID
- The id of the persistent form used to create an item
of this content typepublic com.arsdigita.formbuilder.PersistentForm getItemForm() throws com.arsdigita.domain.DataObjectNotFoundException
com.arsdigita.domain.DataObjectNotFoundException
public static ContentType findByAssociatedObjectType(String objType) throws com.arsdigita.domain.DataObjectNotFoundException
objType
- The fully-qualified name of the data object type
com.arsdigita.domain.DataObjectNotFoundException
public static ContentTypeCollection getAllContentTypes()
public static ContentTypeCollection getUserDefinedContentTypes()
public static ContentTypeCollection getRegisteredContentTypes()
public static void registerXSLFile(ContentType type, String path)
type
- the content typepath
- the path relative to the server rootpublic static void unregisterXSLFile(ContentType type, String path)
type
- the content typepath
- the path relative to the server rootpublic static Iterator getXSLFileURLs()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |