|
|||||||||||
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.kernel.Resource
com.arsdigita.web.Application
com.arsdigita.cms.ContentSection
A content section represents a collection of content that is managed as a unit. Content sections typically correspond to major branches of the public site map. For example, a general news site might have content sections for World, National, Regional, Science and Technology stories. Each content section has its own production and deployment environment, including the following:
It can have its own administration roles, including managers, producers, editors and designers.
It is associated with one or more specific content types
. For example, the
"Press" section is associated with Press Releases.
It can have its own default workflows and lifecycles.
In addition to the content pages themselves, it can have any number of top-level pages for browsing, searching and any other desired purpose.
By default, each content section is associated with exactly one
package instance
and
can be mounted at exactly one node in the site map.
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
|
protected static String |
CONTENT_TYPES
|
protected static String |
CONTENT_TYPES_NOT_ASSOC
|
protected static String |
CREATABLE_CONTENT_TYPES
|
protected static String |
DEFAULT_LOCALE
|
protected static String |
ID
|
protected static String |
ITEM_RESOLVER_CLASS
|
protected static String |
LIFECYCLE_DEFINITIONS
|
protected static String |
LOCALES
|
protected static String |
NAME
|
protected static String |
PACKAGE
|
static String |
PACKAGE_TYPE
|
protected static String |
PAGE_RESOLVER_CLASS
|
protected static String |
ROOT_FOLDER
|
protected static String |
STAFF_GROUP
|
static String |
STYLESHEET
|
protected static String |
TEMPLATE_RESOLVER_CLASS
|
protected static String |
TEMPLATES_FOLDER
|
static String |
versionId
|
protected static String |
VIEWERS_GROUP
|
protected static String |
WF_TEMPLATES
|
protected static String |
XML_GENERATOR_CLASS
|
Fields inherited from class com.arsdigita.web.Application |
PRIMARY_URL |
Fields inherited from class com.arsdigita.kernel.Resource |
CHILD_RESOURCE, DESCRIPTION, PARENT_RESOURCE, RESOURCE_TYPE, TIMESTAMP, TITLE |
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, OBJECT_TYPE |
Constructor Summary | |
ContentSection(BigDecimal id)
|
|
ContentSection(com.arsdigita.persistence.DataObject obj)
|
|
ContentSection(com.arsdigita.persistence.OID oid)
|
Method Summary | |
void |
addContentType(ContentType type)
Register a content type to the content section. |
void |
addLifecycleDefinition(LifecycleDefinition definition)
Register a lifecycle definition to the content section. |
void |
addLocale(com.arsdigita.globalization.Locale locale)
Register a locale with this content section. |
void |
addLocale(com.arsdigita.globalization.Locale locale,
boolean isDefault)
Register a locale with this content section. |
void |
addWorkflowTemplate(com.arsdigita.workflow.simple.WorkflowTemplate template)
Register a workflow template to the content section. |
protected void |
afterSave()
Sets the content section of the root folder to this section. |
static ContentSection |
create(String name)
Method create. |
static ContentSection |
create(String name,
Folder folder,
com.arsdigita.categorization.Category category,
com.arsdigita.kernel.Group staff,
String prc,
String irc,
String xgc)
Create a new content section. |
static ContentSection |
create(String name,
Folder folder,
com.arsdigita.categorization.Category category,
com.arsdigita.kernel.Group staff,
String prc,
String irc,
String xgc,
String trc)
Create a new content section. |
protected static void |
createDefaultResources(ContentSection section)
Creates and maps default resources to the content section. |
protected static com.arsdigita.categorization.Category |
createRootCategory(String name)
Creates the root category for a content section. |
protected static Folder |
createRootFolder(String name)
Creates the root folder for a content section. |
Object |
get(String key)
Fetches a property of the content section. |
static ContentSectionCollection |
getAllSections()
Retrieve all content sections in the system. |
String |
getBaseDataObjectType()
|
static ContentSectionConfig |
getConfig()
|
static ContentSection |
getContentSection(ContentItem item)
Deprecated. use ContentItem.getContentSection() instead |
static ContentSection |
getContentSection(Folder folder)
Deprecated. use ContentItem.getContentSection() instead |
ContentTypeCollection |
getContentTypes()
Get all user-defined content types registered to the content section. |
ContentTypeCollection |
getCreatableContentTypes()
Get all user-defined content types registered to the content section that can be created. |
com.arsdigita.globalization.Locale |
getDefaultLocale()
Gets the default Locale. |
String |
getDisplayName()
Returns the title of the content section. |
String |
getFullPath()
|
ItemResolver |
getItemResolver()
Get the item resolver for this content section. |
String |
getItemResolverClass()
Get the class name of the {link @com.arsdigita.cms.dispatcher.ItemResolver}. |
Folder.ItemCollection |
getItems()
Fetches the child items of this section. |
LifecycleDefinitionCollection |
getLifecycleDefinitions()
Get all lifecycle definitions registered to the content section. |
SectionLocaleCollection |
getLocales()
Returns a collection of Locales associated with this content section. |
String |
getName()
Fetch the name of the content section. |
ContentTypeCollection |
getNotAssociatedContentTypes()
Return the user-defined content types that are not registered to this content section. |
PageResolver |
getPageResolver()
Get the page resolver for this content section. |
String |
getPageResolverClass()
Get the class name of the {link @com.arsdigita.cms.dispatcher.PageResolver}. |
com.arsdigita.categorization.Category |
getRootCategory()
Deprecated. use Category.getRootForObject(com.arsdigita.kernel.ACSObject) instead |
Folder |
getRootFolder()
Get the folder in which all draft items are contained, directly or indirectly. |
static ContentSection |
getSectionFromNode(com.arsdigita.kernel.SiteNode node)
Looks up the section given the SiteNode. |
String |
getServletPath()
|
com.arsdigita.kernel.Group |
getStaffGroup()
Fetch the staff group for this content section. |
String |
getStylesheetPath()
|
TemplateResolver |
getTemplateResolver()
Returns the template resolver for this content section. |
String |
getTemplateResolverClass()
Get the class name of the {link @com.arsdigita.cms.dispatcher.TemplateResolver}. |
Folder |
getTemplatesFolder()
Get the folder in which all templates for this section are contained. |
String |
getURL()
Finds the location of the content section. |
com.arsdigita.kernel.Group |
getViewersGroup()
Fetch the viewers group for this content section. |
com.arsdigita.workflow.simple.TaskCollection |
getWorkflowTemplates()
Get all workflow templates registered to the content section. |
XMLGenerator |
getXMLGenerator()
Get the XML generator for this content section. |
String |
getXMLGeneratorClass()
Get the class name of the {link @com.arsdigita.cms.dispatcher.XMLGenerator}. |
ContentSection |
initialize(String name,
Folder folder,
com.arsdigita.categorization.Category category,
com.arsdigita.kernel.Group staff,
String prc,
String irc,
String xgc,
String trc,
Folder templates,
com.arsdigita.kernel.Group viewers)
Initialize a newly created content section. |
void |
removeContentType(ContentType type)
Unregister a content type from the content section. |
void |
removeLifecycleDefinition(LifecycleDefinition definition)
Unregister a lifecycle definition from the content section. |
void |
removeLocale(com.arsdigita.globalization.Locale locale)
Unregister a locale from the content section. |
void |
removeWorkflowTemplate(com.arsdigita.workflow.simple.WorkflowTemplate template)
Unregister a workflow template from the content section. |
void |
set(String key,
Object value)
Sets a property of the content section. |
void |
setDefaultLocale(com.arsdigita.globalization.Locale locale)
Sets the default locale for a content section. |
void |
setItemResolverClass(String className)
Set the item resolver for this content section. |
void |
setName(String name)
Set the name of the content section |
void |
setPageResolverClass(String className)
Set the page resolver for this content section. |
void |
setRootCategory(com.arsdigita.categorization.Category root)
Deprecated. use Category.setRootForObject(com.arsdigita.kernel.ACSObject, com.arsdigita.categorization.Category) instead |
void |
setRootFolder(Folder root)
Set the root folder for this content section. |
void |
setStaffGroup(com.arsdigita.kernel.Group group)
Set the staff group for this content section. |
void |
setTemplateResolverClass(String className)
Sets the template resolver for this content section. |
void |
setTemplatesFolder(Folder folder)
Set the templates folder for this content section |
void |
setViewersGroup(com.arsdigita.kernel.Group group)
Set the viewers group for this content section. |
void |
setXMLGeneratorClass(String className)
Set the XML generator for this content section. |
Methods inherited from class com.arsdigita.web.Application |
afterDelete, beforeSave, createApplication, createApplication, createRootApplication, getAncestorApplications, getApplicationType, getCanonicalURL, getChildApplications, getChildApplicationsForType, getContainingApplication, getContextPath, getCurrentApplication, getPackageType, getParentApplication, getPath, getPrimaryURL, getRelevantPrivileges, getSiteNode, isInstalled, retrieveAllApplications, retrieveApplication, retrieveApplication, retrieveApplication, retrieveApplicationForPath, retrieveApplicationForSiteNode, setApplicationType, setParentApplication, setPath |
Methods inherited from class com.arsdigita.kernel.Resource |
createResource, createResource, getChildResources, getContainer, getContainingResource, getDescription, getParentResource, getResourceType, getTimestamp, getTitle, isContainerModified, retrieveAllResources, retrieveResource, retrieveResource, retrieveResource, setDescription, setParentResource, setResourceType, setTitle |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, initialize, setID, setID |
Methods inherited from class com.arsdigita.domain.ObservableDomainObject |
addObserver, getObservers |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, beforeDelete, clear, delete, disconnect, equals, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, 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 PACKAGE_TYPE
public static final String STYLESHEET
protected static final String ID
protected static final String PACKAGE
protected static final String NAME
protected static final String ROOT_FOLDER
protected static final String TEMPLATES_FOLDER
protected static final String STAFF_GROUP
protected static final String VIEWERS_GROUP
protected static final String DEFAULT_LOCALE
protected static final String LOCALES
protected static final String PAGE_RESOLVER_CLASS
protected static final String ITEM_RESOLVER_CLASS
protected static final String TEMPLATE_RESOLVER_CLASS
protected static final String XML_GENERATOR_CLASS
protected static final String CONTENT_TYPES
protected static final String CREATABLE_CONTENT_TYPES
protected static final String CONTENT_TYPES_NOT_ASSOC
protected static final String LIFECYCLE_DEFINITIONS
protected static final String WF_TEMPLATES
Constructor Detail |
public ContentSection(com.arsdigita.persistence.OID oid) throws com.arsdigita.domain.DataObjectNotFoundException
public ContentSection(com.arsdigita.persistence.DataObject obj)
public ContentSection(BigDecimal id) throws com.arsdigita.domain.DataObjectNotFoundException
Method Detail |
public static ContentSectionConfig getConfig()
public String getBaseDataObjectType()
public Object get(String key)
key
- The name of the attribute
public void set(String key, Object value)
key
- The name of the attributevalue
- The value of the attributeprotected void afterSave()
public String getName()
public String getDisplayName()
public void setName(String name)
name
- The namepublic String getURL()
public String getFullPath()
public Folder getRootFolder()
ContentItem.getLiveVersion()
on the folder
returned by this method.
public void setRootFolder(Folder root)
root
- The root folderpublic Folder getTemplatesFolder()
public void setTemplatesFolder(Folder folder)
folder
- the folder where all templates for this section will
be storedpublic com.arsdigita.categorization.Category getRootCategory()
Category.getRootForObject(com.arsdigita.kernel.ACSObject)
instead
public void setRootCategory(com.arsdigita.categorization.Category root)
Category.setRootForObject(com.arsdigita.kernel.ACSObject, com.arsdigita.categorization.Category)
instead
root
- The root categorypublic com.arsdigita.kernel.Group getStaffGroup()
public void setStaffGroup(com.arsdigita.kernel.Group group)
group
- The staff grouppublic com.arsdigita.kernel.Group getViewersGroup()
public void setViewersGroup(com.arsdigita.kernel.Group group)
group
- The viewers grouppublic String getPageResolverClass()
public PageResolver getPageResolver()
server resources
.
public void setPageResolverClass(String className)
className
- The class namepublic String getItemResolverClass()
public ItemResolver getItemResolver()
content items
.
public void setItemResolverClass(String className)
className
- The class namepublic String getTemplateResolverClass()
public TemplateResolver getTemplateResolver()
com.arsdigita.cms.dispatcher.TemplateResolver
.public void setTemplateResolverClass(String className)
className
- The name of a class that implements
com.arsdigita.cms.dispatcher.TemplateResolver
.public String getXMLGeneratorClass()
public XMLGenerator getXMLGenerator()
public void setXMLGeneratorClass(String className)
className
- The class namepublic com.arsdigita.globalization.Locale getDefaultLocale()
public void setDefaultLocale(com.arsdigita.globalization.Locale locale)
locale
- The locale. If null, unset the default locale.public SectionLocaleCollection getLocales()
public void addLocale(com.arsdigita.globalization.Locale locale)
locale
- The localepublic void addLocale(com.arsdigita.globalization.Locale locale, boolean isDefault)
locale
- The localeisDefault
- A flag, if true, which indicates that this locale
should be the default locale for this content section.public void removeLocale(com.arsdigita.globalization.Locale locale)
locale
- public ContentTypeCollection getContentTypes()
public ContentTypeCollection getCreatableContentTypes()
public void addContentType(ContentType type)
type
- The content typepublic void removeContentType(ContentType type)
type
- The content typepublic ContentTypeCollection getNotAssociatedContentTypes()
public LifecycleDefinitionCollection getLifecycleDefinitions()
public void addLifecycleDefinition(LifecycleDefinition definition)
definition
- The lifecycle definitionpublic void removeLifecycleDefinition(LifecycleDefinition definition)
definition
- The lifecycle definitionpublic com.arsdigita.workflow.simple.TaskCollection getWorkflowTemplates()
public void addWorkflowTemplate(com.arsdigita.workflow.simple.WorkflowTemplate template)
template
- The workflow templatepublic void removeWorkflowTemplate(com.arsdigita.workflow.simple.WorkflowTemplate template)
template
- The workflow templatepublic static ContentSection getSectionFromNode(com.arsdigita.kernel.SiteNode node) throws com.arsdigita.domain.DataObjectNotFoundException
node
- The site node
com.arsdigita.domain.DataObjectNotFoundException
public static ContentSection getContentSection(ContentItem item) throws com.arsdigita.domain.DataObjectNotFoundException
ContentItem.getContentSection()
instead
item
- A content item
com.arsdigita.domain.DataObjectNotFoundException
public static ContentSection getContentSection(Folder folder) throws com.arsdigita.domain.DataObjectNotFoundException
ContentItem.getContentSection()
instead
folder
- A content folder
com.arsdigita.domain.DataObjectNotFoundException
public static ContentSectionCollection getAllSections()
public static ContentSection create(String name, Folder folder, com.arsdigita.categorization.Category category, com.arsdigita.kernel.Group staff, String prc, String irc, String xgc)
name
- The package instancefolder
- The root foldercategory
- The root categorystaff
- The staff groupprc
- The page resolver class nameirc
- The item resolver class namexgc
- The XML generator class name
public static ContentSection create(String name, Folder folder, com.arsdigita.categorization.Category category, com.arsdigita.kernel.Group staff, String prc, String irc, String xgc, String trc)
name
- The package instancefolder
- The root foldercategory
- The root categorystaff
- The staff groupprc
- The page resolver class nameirc
- The item resolver class namexgc
- The XML generator class nametrc
- The template resolver class name
public static ContentSection create(String name)
name
- Name of the content section
protected static void createDefaultResources(ContentSection section)
section
- The content section
MP: create resource types.
MP: use the resources API.
MP: only create resources once.protected static Folder createRootFolder(String name)
name
- The name of the content section
protected static com.arsdigita.categorization.Category createRootCategory(String name)
name
- The name of the content section
public ContentSection initialize(String name, Folder folder, com.arsdigita.categorization.Category category, com.arsdigita.kernel.Group staff, String prc, String irc, String xgc, String trc, Folder templates, com.arsdigita.kernel.Group viewers)
name
- The package instance namefolder
- The root foldercategory
- The root categorystaff
- The staff groupprc
- The page resolver class nameirc
- The item resolver class namexgc
- The XML generator class nametrc
- The template resolver class name
public Folder.ItemCollection getItems()
public String getServletPath()
public String getStylesheetPath()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |