com.arsdigita.cms
Class TemplateMapping

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.cms.TemplateMapping
Direct Known Subclasses:
CategoryTemplateMapping, ItemTemplateMapping, SectionTemplateMapping

public abstract class TemplateMapping
extends com.arsdigita.kernel.ACSObject

Represents a mapping between an arbitrary parent and a template. Known implementations are SectionTemplateMapping and ItemTemplateMapping

Version:
$Id: //cms/dev/src/com/arsdigita/cms/TemplateMapping.java#9 $
Author:
Stanislav Freidin (sfreidin@arsdigita.com)

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String IS_DEFAULT
           
static String TEMPLATE
           
static String USE_CONTEXT
           
 
Fields inherited from class com.arsdigita.kernel.ACSObject
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE, versionId
 
Constructor Summary
TemplateMapping()
           
TemplateMapping(BigDecimal id)
           
TemplateMapping(com.arsdigita.persistence.DataObject obj)
           
TemplateMapping(com.arsdigita.persistence.OID oid)
           
TemplateMapping(String type)
           
 
Method Summary
abstract  ContentSection getContentSection()
          Return the context section where the template is associated.
abstract  com.arsdigita.kernel.ACSObject getParent()
          Return the parent of the template within the section.
 Template getTemplate()
          Return the template for this mapping
 String getUseContext()
          Get the use context in which this template is associated
abstract  Boolean isDefault()
          Determine if the template will be the default within its context.
abstract  void setDefault(Boolean b)
          Set whether the template will be the default within its context.
 void setTemplate(Template t)
          Set the new template for this mapping
 void setUseContext(String context)
          Set the use context for this mapping
 
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

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
See Also:
Constant Field Values

TEMPLATE

public static final String TEMPLATE
See Also:
Constant Field Values

USE_CONTEXT

public static final String USE_CONTEXT
See Also:
Constant Field Values

IS_DEFAULT

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

TemplateMapping

public TemplateMapping()

TemplateMapping

public TemplateMapping(com.arsdigita.persistence.OID oid)
                throws com.arsdigita.domain.DataObjectNotFoundException

TemplateMapping

public TemplateMapping(BigDecimal id)
                throws com.arsdigita.domain.DataObjectNotFoundException

TemplateMapping

public TemplateMapping(com.arsdigita.persistence.DataObject obj)

TemplateMapping

public TemplateMapping(String type)
Method Detail

getContentSection

public abstract ContentSection getContentSection()
Return the context section where the template is associated. Child classes should override this method to do the right thing.


getParent

public abstract com.arsdigita.kernel.ACSObject getParent()
Return the parent of the template within the section. This will most likely be a content type or a content item.


getTemplate

public Template getTemplate()
Return the template for this mapping


setTemplate

public void setTemplate(Template t)
Set the new template for this mapping


getUseContext

public String getUseContext()
Get the use context in which this template is associated


setUseContext

public void setUseContext(String context)
Set the use context for this mapping


isDefault

public abstract Boolean isDefault()
Determine if the template will be the default within its context. Child classes should override this method to do the right thing.


setDefault

public abstract void setDefault(Boolean b)
Set whether the template will be the default within its context. Child classes should override this method to do the right thing.



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