|
|||||||||||
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.TemplateMapping
com.arsdigita.cms.ItemTemplateMapping
Represents a mapping from (content item + use context type) to a template. This class is package scope since it is part of the internal templating implementation.
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
|
static String |
ITEM
|
static String |
TEMPLATE
|
static String |
USE_CONTEXT
|
static String |
versionId
|
Fields inherited from class com.arsdigita.cms.TemplateMapping |
IS_DEFAULT |
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE |
Constructor Summary | |
ItemTemplateMapping()
|
|
ItemTemplateMapping(BigDecimal id)
|
|
ItemTemplateMapping(com.arsdigita.persistence.DataObject obj)
|
|
ItemTemplateMapping(com.arsdigita.persistence.OID oid)
|
|
ItemTemplateMapping(String type)
|
Method Summary | |
ContentItem |
getContentItem()
|
ContentSection |
getContentSection()
Return the context section where the template is associated. |
protected static com.arsdigita.cms.ItemTemplateCollection |
getContextsWithTypes(ContentItem item)
Retrieve all use context/mime type combinations along with possibly null template for the item in that pair. |
protected static com.arsdigita.cms.ItemTemplateCollection |
getItems(Template template)
Retrieve all content items for the given template, along with their use context |
static ItemTemplateMapping |
getMapping(ContentItem item,
String useContext)
Deprecated. use getMapping(ContentItem item, String useContext, MimeType mimeType) |
static ItemTemplateMapping |
getMapping(ContentItem item,
String useContext,
com.arsdigita.mimetypes.MimeType mimeType)
Load the specified mapping; return null if no such mapping exists |
static ItemTemplateMapping |
getMapping(ContentItem item,
String useContext,
Template template)
|
com.arsdigita.kernel.ACSObject |
getParent()
Return the parent of the template within the section. |
protected static Template |
getTemplate(ContentItem item,
String useContext)
Deprecated. use getTemplate(ContentItem item, String useContext, MimeType mimeType) |
protected static Template |
getTemplate(ContentItem item,
String useContext,
com.arsdigita.mimetypes.MimeType mimeType)
Get the template for the item in the specified use context. |
protected static com.arsdigita.cms.ItemTemplateCollection |
getTemplates(ContentItem item)
Retrieve all templates for the given content item, along with their use context |
protected static com.arsdigita.cms.ItemTemplateCollection |
getUseContexts(ContentItem item)
Retrieve all use contexts along with possibly null template for the item in that use context. |
Boolean |
isDefault()
Determine if the template will be the default within its context. |
void |
setContentItem(ContentItem item)
|
void |
setDefault(Boolean b)
Set whether the template will be the default within its context. |
Methods inherited from class com.arsdigita.cms.TemplateMapping |
getTemplate, getUseContext, setTemplate, setUseContext |
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 versionId
public static final String BASE_DATA_OBJECT_TYPE
public static final String ITEM
public static final String TEMPLATE
public static final String USE_CONTEXT
Constructor Detail |
public ItemTemplateMapping()
public ItemTemplateMapping(com.arsdigita.persistence.OID oid) throws com.arsdigita.domain.DataObjectNotFoundException
public ItemTemplateMapping(BigDecimal id) throws com.arsdigita.domain.DataObjectNotFoundException
public ItemTemplateMapping(com.arsdigita.persistence.DataObject obj)
public ItemTemplateMapping(String type)
Method Detail |
public ContentSection getContentSection()
TemplateMapping
getContentSection
in class TemplateMapping
public final ContentItem getContentItem()
public final void setContentItem(ContentItem item)
public com.arsdigita.kernel.ACSObject getParent()
TemplateMapping
getParent
in class TemplateMapping
public Boolean isDefault()
TemplateMapping
isDefault
in class TemplateMapping
public void setDefault(Boolean b)
TemplateMapping
setDefault
in class TemplateMapping
public static ItemTemplateMapping getMapping(ContentItem item, String useContext)
public static ItemTemplateMapping getMapping(ContentItem item, String useContext, com.arsdigita.mimetypes.MimeType mimeType)
public static ItemTemplateMapping getMapping(ContentItem item, String useContext, Template template)
protected static Template getTemplate(ContentItem item, String useContext)
protected static Template getTemplate(ContentItem item, String useContext, com.arsdigita.mimetypes.MimeType mimeType)
protected static com.arsdigita.cms.ItemTemplateCollection getTemplates(ContentItem item)
protected static com.arsdigita.cms.ItemTemplateCollection getUseContexts(ContentItem item)
protected static com.arsdigita.cms.ItemTemplateCollection getContextsWithTypes(ContentItem item)
protected static com.arsdigita.cms.ItemTemplateCollection getItems(Template template)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |