com.arsdigita.cms
Class TextPage

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
                          extended bycom.arsdigita.cms.TextPage
All Implemented Interfaces:
com.arsdigita.auditing.Audited, CustomCopy
Direct Known Subclasses:
Article

public class TextPage
extends ContentPage

This class extends a content page with an additional text attribute.

Version:
$Revision: #19 $ $DateTime: 2004/04/07 16:07:11 $
Author:
Jack Chung (flattop@arsdigita.com), Michael Pih (pihman@arsdigita.com)

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
protected static int SUMMARY_SIZE
           
static String TEXT_ASSET
           
static String versionId
           
 
Fields inherited from class com.arsdigita.cms.ContentPage
LAUNCH_DATE, PAGES_IN_CATEGORY, PAGES_IN_FOLDER, QUERY_CATEGORY_ID, QUERY_PAGE, QUERY_ROOT_ID, QUERY_TYPE, SUMMARY, TITLE
 
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
TextPage()
          Default constructor.
TextPage(BigDecimal id)
          Constructor.
TextPage(com.arsdigita.persistence.DataObject obj)
           
TextPage(com.arsdigita.persistence.OID oid)
          Constructor.
TextPage(String type)
           
 
Method Summary
 String getBaseDataObjectType()
           
 String getSearchSummary()
          Return a short summary of the text body for search.
 TextAsset getTextAsset()
          Return the text asset for this TextPage.
protected  void propagateMaster(com.arsdigita.versioning.VersionedACSObject master)
           
 void setTextAsset(TextAsset text)
          Pass in a null value to remove the text of this item.
 
Methods inherited from class com.arsdigita.cms.ContentPage
getContentBundle, getDisplayName, getLaunchDate, getPagesInSectionQuery, getPagesInSectionQuery, getPagesInSectionQuery, getPagesInSectionQuery, getTitle, setLaunchDate, setName, setPagesQueryParameters, setPagesQueryParameters, setTitle
 
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, 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

TEXT_ASSET

public static final String TEXT_ASSET
See Also:
Constant Field Values

SUMMARY_SIZE

protected static final int SUMMARY_SIZE
See Also:
Constant Field Values
Constructor Detail

TextPage

public TextPage()
Default constructor. This creates a new text page.


TextPage

public TextPage(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.

TextPage

public TextPage(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 TextPage.BASE_DATA_OBJECT_TYPE.

Parameters:
id - The id for the retrieved DataObject.

TextPage

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

TextPage

public TextPage(String type)
Method Detail

getBaseDataObjectType

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

getTextAsset

public TextAsset getTextAsset()
Return the text asset for this TextPage. Could return null if there is no text body actually associated with the page


setTextAsset

public void setTextAsset(TextAsset text)
Pass in a null value to remove the text of this item. Explicitly call text.delete() to remove the text from the database


getSearchSummary

public String getSearchSummary()
Return a short summary of the text body for search. This method is WRONG, because the text body could actually be extremely large, and doing substring on it is NOT safe

Overrides:
getSearchSummary in class ContentPage

propagateMaster

protected void propagateMaster(com.arsdigita.versioning.VersionedACSObject master)


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