com.arsdigita.cms
Class StandalonePage

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.StandalonePage
All Implemented Interfaces:
com.arsdigita.auditing.Audited, CustomCopy

public class StandalonePage
extends ContentPage

Represents a top-level page on the site. The page will usually represent a piece of JSP code, represented as an internal, one-off template.

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

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String TEMPLATE
           
 
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, 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
StandalonePage()
          Default constructor.
StandalonePage(BigDecimal id)
          Load a StandalonePage with the given ID
StandalonePage(com.arsdigita.persistence.DataObject obj)
          Load a StandalonePage by encapsulating the given data object
StandalonePage(com.arsdigita.persistence.OID oid)
          Constructor.
StandalonePage(String type)
          Create a new StandalonePage with the given type
 
Method Summary
protected  void afterSave()
          Save: associate the built-in template with this page in the public context.
 String getBody()
          Return the body of this page; the body will probably contain some JSP code
 Template getTemplate()
          Return the internal template used by this page.
 void setBody(String text)
          Return the JSP body of this page
 void setBody(String text, com.arsdigita.mimetypes.MimeType mime)
          Return the body of this page; the body will probably contain some JSP code.
 void setLive(ContentItem version)
          Publish/unpublish this page and its associated template
 void setTemplate(Template t)
          Set the internal template used by this page.
 
Methods inherited from class com.arsdigita.cms.ContentPage
getBaseDataObjectType, getContentBundle, getDisplayName, getLaunchDate, getPagesInSectionQuery, getPagesInSectionQuery, getPagesInSectionQuery, getPagesInSectionQuery, getSearchSummary, getTitle, setLaunchDate, setName, setPagesQueryParameters, setPagesQueryParameters, setTitle
 
Methods inherited from class com.arsdigita.cms.ContentItem
addCategory, addPendingVersion, 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, 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

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
Constructor Detail

StandalonePage

public StandalonePage()
Default constructor. This creates a new content item.


StandalonePage

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

StandalonePage

public StandalonePage(BigDecimal id)
               throws com.arsdigita.domain.DataObjectNotFoundException
Load a StandalonePage with the given ID

Parameters:
id - The id for the retrieved DataObject.

StandalonePage

public StandalonePage(com.arsdigita.persistence.DataObject obj)
Load a StandalonePage by encapsulating the given data object


StandalonePage

public StandalonePage(String type)
Create a new StandalonePage with the given type

Method Detail

getTemplate

public final Template getTemplate()
Return the internal template used by this page. This method will be called by the authoring kit UI.


setTemplate

public final void setTemplate(Template t)
Set the internal template used by this page. This method will be called by the authoring kit UI.


getBody

public final String getBody()
Return the body of this page; the body will probably contain some JSP code


setBody

public final void setBody(String text,
                          com.arsdigita.mimetypes.MimeType mime)
Return the body of this page; the body will probably contain some JSP code.

Parameters:
text - the text for the body
mime - the mime type for the body

setBody

public final void setBody(String text)
Return the JSP body of this page

Parameters:
text - the text for the body

setLive

public void setLive(ContentItem version)
Publish/unpublish this page and its associated template

Overrides:
setLive in class ContentItem
Parameters:
version - the version which should become live, null to make the item non-live

afterSave

protected void afterSave()
Save: associate the built-in template with this page in the public context. Thus, all requests to this page will return the built-in template.

Overrides:
afterSave in class ContentItem


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