com.arsdigita.cms
Class ContentPage

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.versioning.VersionedACSObject
                  extended bycom.arsdigita.cms.ContentItem
                      extended bycom.arsdigita.cms.ContentPage
All Implemented Interfaces:
com.arsdigita.auditing.Audited, CustomCopy
Direct Known Subclasses:
StandalonePage, TextPage, UserDefinedContentItem

public class ContentPage
extends ContentItem

This class extends content item with the additional attributes name and title. The name attribute is used in generating the URL for this content page.

Version:
$Id: //cms/dev/src/com/arsdigita/cms/ContentPage.java#38 $
Author:
Uday Mathur, Jack Chung, Michael Pih

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String LAUNCH_DATE
           
protected static String PAGES_IN_CATEGORY
           
protected static String PAGES_IN_FOLDER
           
static String QUERY_CATEGORY_ID
           
static String QUERY_PAGE
           
static String QUERY_ROOT_ID
           
static String QUERY_TYPE
           
static String SUMMARY
           
static String TITLE
           
static String versionId
           
 
Fields inherited from class com.arsdigita.cms.ContentItem
ANCESTORS, AUDITING, CHILDREN, CONTENT_SECTION, CONTENT_TYPE, DRAFT, DRAFT_VERSION, LANGUAGE, LIVE, NAME, PARENT, PENDING, VERSION, VERSIONS
 
Fields inherited from class com.arsdigita.versioning.VersionedACSObject
IS_DELETED, MASTER
 
Fields inherited from class com.arsdigita.kernel.ACSObject
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE
 
Constructor Summary
ContentPage()
          Default constructor.
ContentPage(BigDecimal id)
          Constructor.
ContentPage(com.arsdigita.persistence.DataObject obj)
           
ContentPage(com.arsdigita.persistence.OID oid)
          Constructor.
ContentPage(String type)
           
 
Method Summary
 String getBaseDataObjectType()
           
 ContentBundle getContentBundle()
           
 String getDisplayName()
          Fetch the display name of the content item.
 Date getLaunchDate()
           
static com.arsdigita.persistence.DataQuery getPagesInSectionQuery(ContentSection s, String context)
          Deprecated. This doesn't filter its results based on the permissions of the current user. Use getPagesInSectionQuery( ContentSection s, String context, OID userOID ) instead.
static com.arsdigita.persistence.DataQuery getPagesInSectionQuery(ContentSection s, String context, com.arsdigita.categorization.Category cat)
          Deprecated. This doesn't filter its results based on the permissions of the current user. Use getPagesInSectionQuery( ContentSection s, String context, Category cat, OID userOID ) instead.
static com.arsdigita.persistence.DataQuery getPagesInSectionQuery(ContentSection s, String context, com.arsdigita.categorization.Category cat, com.arsdigita.persistence.OID userOID)
          Retrieve all pages within the given content section that belong to the given category
static com.arsdigita.persistence.DataQuery getPagesInSectionQuery(ContentSection s, String context, com.arsdigita.persistence.OID userOID)
          Retrieve all pages within the given content section.
 String getSearchSummary()
           
 String getTitle()
           
 void setLaunchDate(Date ldate)
           
 void setName(String name)
          Sets the name of the content page.
protected static com.arsdigita.persistence.DataQuery setPagesQueryParameters(String name, ContentSection s, String context)
          Deprecated. This doesn't filter its results based on the permissions of the current user. Use setPagesQueryParameters( String name, ContentSection s, String context, OID userOID ) instead.
protected static com.arsdigita.persistence.DataQuery setPagesQueryParameters(String name, ContentSection s, String context, com.arsdigita.persistence.OID userOID)
           
 void setTitle(String value)
           
 
Methods inherited from class com.arsdigita.cms.ContentItem
addCategory, addPendingVersion, afterSave, assertDraft, assertLive, assertMaster, assertPending, beforeDelete, beforeSave, canPublishToFS, copy, copy, copyProperty, copyProperty, copyServices, copyServicesFrom, createLiveVersion, createPendingVersion, get, getCategories, getCategoryCollection, getChildren, getContentSection, getContentType, getCreationDate, getCreationIP, getCreationUser, getDraftVersion, getLanguage, getLastModifiedDate, getLastModifiedIP, getLastModifiedUser, getLifecycle, getLiveVersion, getLocale, getName, getParent, getPath, getPathInfo, getPathInfo, getPathNoJsp, getPendingVersions, getPublicVersion, getVersion, getWorkingVersion, initialize, isDraftVersion, isLive, isLiveVersion, isPendingVersion, isPublished, makeCopy, promotePendingVersion, publish, publishToFS, removeCategory, removeLifecycle, removePendingVersion, set, setContentSection, setContentType, setDefaultCategory, setLanguage, setLifecycle, setLive, setLiveVersion, setParent, setVersion, setVersionRecursively, unpublish, unpublishFromFS
 
Methods inherited from class com.arsdigita.versioning.VersionedACSObject
applyTag, applyUniqueTag, autoPropagateMaster, getMaster, getRolledBackTo, getTransactions, getTransactions, isMaster, isRolledBack, isSubtype, permanentlyDelete, propagateMaster, recordAttributeChange, rollBackTo, rollBackTo, rollForward, save, setMaster, trackChanges
 
Methods inherited from class com.arsdigita.kernel.ACSObject
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, 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, 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

versionId

public static final String versionId
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
See Also:
Constant Field Values

TITLE

public static final String TITLE
See Also:
Constant Field Values

SUMMARY

public static final String SUMMARY
See Also:
Constant Field Values

LAUNCH_DATE

public static final String LAUNCH_DATE
See Also:
Constant Field Values

PAGES_IN_FOLDER

protected static final String PAGES_IN_FOLDER
See Also:
Constant Field Values

PAGES_IN_CATEGORY

protected static final String PAGES_IN_CATEGORY
See Also:
Constant Field Values

QUERY_PAGE

public static final String QUERY_PAGE
See Also:
Constant Field Values

QUERY_TYPE

public static final String QUERY_TYPE
See Also:
Constant Field Values

QUERY_ROOT_ID

public static final String QUERY_ROOT_ID
See Also:
Constant Field Values

QUERY_CATEGORY_ID

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

ContentPage

public ContentPage()
Default constructor. This creates a new content page.


ContentPage

public ContentPage(com.arsdigita.persistence.OID oid)
            throws com.arsdigita.domain.DataObjectNotFoundException
Constructor. The contained DataObject is retrieved from the persistent storage mechanism with an OID specified by oid.

Parameters:
oid - The OID for the retrieved DataObject.

ContentPage

public ContentPage(BigDecimal id)
            throws com.arsdigita.domain.DataObjectNotFoundException
Constructor. The contained DataObject is retrieved from the persistent storage mechanism with an OID specified by id and ContentPage.BASE_DATA_OBJECT_TYPE.

Parameters:
id - The id for the retrieved DataObject.

ContentPage

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

ContentPage

public ContentPage(String type)
Method Detail

getBaseDataObjectType

public String getBaseDataObjectType()
Overrides:
getBaseDataObjectType in class ContentItem
Returns:
the base PDL object type for this item. Child classes should override this method to return the correct value.

getDisplayName

public String getDisplayName()
Description copied from class: ContentItem
Fetch the display name of the content item. The display name for a ContentItem is the name property.

Overrides:
getDisplayName in class ContentItem
Returns:
The name of the content item

setName

public void setName(String name)
Sets the name of the content page. If the parent of the page is a ContentBundle this method sets the bundle's name as well.

Overrides:
setName in class ContentItem
Parameters:
name - The name of the content item

getContentBundle

public final ContentBundle getContentBundle()

getTitle

public String getTitle()

setTitle

public void setTitle(String value)

getLaunchDate

public Date getLaunchDate()

setLaunchDate

public void setLaunchDate(Date ldate)

setPagesQueryParameters

protected static com.arsdigita.persistence.DataQuery setPagesQueryParameters(String name,
                                                                             ContentSection s,
                                                                             String context)
Deprecated. This doesn't filter its results based on the permissions of the current user. Use setPagesQueryParameters( String name, ContentSection s, String context, OID userOID ) instead.


setPagesQueryParameters

protected static com.arsdigita.persistence.DataQuery setPagesQueryParameters(String name,
                                                                             ContentSection s,
                                                                             String context,
                                                                             com.arsdigita.persistence.OID userOID)

getPagesInSectionQuery

public static com.arsdigita.persistence.DataQuery getPagesInSectionQuery(ContentSection s,
                                                                         String context,
                                                                         com.arsdigita.categorization.Category cat)
Deprecated. This doesn't filter its results based on the permissions of the current user. Use getPagesInSectionQuery( ContentSection s, String context, Category cat, OID userOID ) instead.

Retrieve all pages within the given content section that belong to the given category

Parameters:
s - the section
context - if ContentItem.LIVE, retrieve only live items. If ContentItem.DRAFT, return only draft items
cat - the category
Returns:
a DataQuery of all then pages within a section that belong to the given category

getPagesInSectionQuery

public static com.arsdigita.persistence.DataQuery getPagesInSectionQuery(ContentSection s,
                                                                         String context,
                                                                         com.arsdigita.categorization.Category cat,
                                                                         com.arsdigita.persistence.OID userOID)
Retrieve all pages within the given content section that belong to the given category

Parameters:
s - the section
context - if ContentItem.LIVE, retrieve only live items. If ContentItem.DRAFT, return only draft items
cat - the category
userOID - the OID of the current user
Returns:
a DataQuery of all then pages within a section that belong to the given category which the current user has permission to view

getPagesInSectionQuery

public static com.arsdigita.persistence.DataQuery getPagesInSectionQuery(ContentSection s,
                                                                         String context)
Deprecated. This doesn't filter its results based on the permissions of the current user. Use getPagesInSectionQuery( ContentSection s, String context, OID userOID ) instead.

Retrieve all pages within the given content section.

Parameters:
s - the section
context - if ContentItem.LIVE, retrieve only live items. If ContentItem.DRAFT, return only draft items
Returns:
a DataQuery of all the pages within the section.

getPagesInSectionQuery

public static com.arsdigita.persistence.DataQuery getPagesInSectionQuery(ContentSection s,
                                                                         String context,
                                                                         com.arsdigita.persistence.OID userOID)
Retrieve all pages within the given content section.

Parameters:
s - the section
context - if ContentItem.LIVE, retrieve only live items. If ContentItem.DRAFT, return only draft items
userOID - the OID of the current user
Returns:
a DataQuery of all the pages within the section which the current user has permission to view

getSearchSummary

public String getSearchSummary()


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