com.arsdigita.cms.dispatcher
Class CMSPage

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.TextStylable
              extended bycom.arsdigita.bebop.BlockStylable
                  extended bycom.arsdigita.bebop.Page
                      extended bycom.arsdigita.cms.dispatcher.CMSPage
All Implemented Interfaces:
Cloneable, com.arsdigita.bebop.Component, com.arsdigita.bebop.Container, com.arsdigita.dispatcher.Dispatcher, com.arsdigita.util.Lockable, ResourceHandler
Direct Known Subclasses:
AccessDenied, ContentItemPage, ContentSectionPage, FormsUserPage, ItemSearchPage, Logout, MasterPage, SearchResultRedirector, SectionConfigurationPage, WorkspacePage

public class CMSPage
extends com.arsdigita.bebop.Page
implements ResourceHandler

A CMSPage is a Bebop Page implementation of the ResourceHandler interface.

It stores the current ContentSection and, if applicable, the ContentItem in the page state as request local objects. Components that are part of the CMSPage may access these objects by calling:

 getContentSection(PageState state);
 

Version:
$Revision: #29 $ $DateTime: 2004/04/07 16:07:11 $
Author:
Michael Pih (pihman@arsdigita.com), Uday Mathur (umathur@arsdigita.com)

Field Summary
static String ASSETS
          The global assets URL stub XML parameter name.
static String CMS_XML_NS
          Deprecated. use com.arsdigita.cms.CMS.CMS_XML_NS instead
static String PAGE_CLASS
          The XML page class.
static String versionId
           
 
Fields inherited from class com.arsdigita.bebop.Page
m_invisible, m_panel
 
Fields inherited from class com.arsdigita.bebop.BlockStylable
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
CMSPage()
           
CMSPage(com.arsdigita.bebop.Label title)
           
CMSPage(com.arsdigita.bebop.Label title, com.arsdigita.bebop.Container panel)
           
CMSPage(String title)
           
CMSPage(String title, com.arsdigita.bebop.Container panel)
           
 
Method Summary
protected  void buildPage()
          Builds the page.
 void dispatch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, com.arsdigita.dispatcher.RequestContext actx)
          Services the Bebop page.
protected  com.arsdigita.xml.Element generateXMLHelper(com.arsdigita.bebop.PageState ps, com.arsdigita.xml.Document parent)
           
 ContentItem getContentItem(javax.servlet.http.HttpServletRequest request)
          Deprecated. use com.arsdigita.cms.CMS.getContext().getContentItem() instead
 ContentItem getContentItem(com.arsdigita.bebop.PageState state)
          Deprecated. use com.arsdigita.cms.CMS.getContext().getContentItem() instead
 ContentSection getContentSection(javax.servlet.http.HttpServletRequest request)
          Deprecated. use com.arsdigita.cms.CMS.getContext().getContentSection() instead
 ContentSection getContentSection(com.arsdigita.bebop.PageState state)
          Deprecated. use com.arsdigita.cms.CMS.getContext().getContentSection() instead
static com.arsdigita.kernel.User getCurrentUser(com.arsdigita.bebop.PageState state)
          Deprecated. Use Kernel.getContext().getParty() if possible and Web.getContext().getUser() if necessary.
 String getXMLParameter(String name)
          Fetches the value of the XML parameter.
 void init()
          Finishes and locks the page.
 void setXMLParameter(String name, String value)
          Set an XML parameter.
 
Methods inherited from class com.arsdigita.bebop.Page
add, add, addActionListener, addClientStylesheet, addComponent, addComponentStateParam, addGlobalStateParam, addRequestListener, buildDocument, children, contains, fireActionEvent, fireRequestEvent, generateXML, generateXML, get, getComponent, getComponentParameters, getErrorDisplay, getPanel, getParameters, getStateModel, getTitle, getTitle, indexOf, isEmpty, isUsingHttpSession, isVisibleDefault, lock, parameterName, parameterName, prepare, process, process, removeActionListener, removeRequestListener, respond, setErrorDisplay, setPanel, setStyleSheet, setTitle, setTitle, setUsingHttpSession, setVisibleDefault, size, stateContains, stateIndex, stateSize
 
Methods inherited from class com.arsdigita.bebop.BlockStylable
setBorder, setBorder, setBorderColor, setHorizontalAlignment, setMargin, setMargin, setPadding, setPadding, setVerticalAlignment
 
Methods inherited from class com.arsdigita.bebop.TextStylable
setBackgroundColor, setColor
 
Methods inherited from class com.arsdigita.bebop.SimpleComponent
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, register, register, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible
 
Methods inherited from class com.arsdigita.bebop.Completable
addCompletionListener, fireCompletionEvent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.arsdigita.bebop.Component
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, register, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible
 
Methods inherited from interface com.arsdigita.util.Lockable
isLocked
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

CMS_XML_NS

public static final String CMS_XML_NS
Deprecated. use com.arsdigita.cms.CMS.CMS_XML_NS instead

The CMS XML namespace.

See Also:
Constant Field Values

ASSETS

public static final String ASSETS
The global assets URL stub XML parameter name.

See Also:
Constant Field Values

PAGE_CLASS

public static final String PAGE_CLASS
The XML page class.

See Also:
Constant Field Values
Constructor Detail

CMSPage

public CMSPage()

CMSPage

public CMSPage(String title)

CMSPage

public CMSPage(String title,
               com.arsdigita.bebop.Container panel)

CMSPage

public CMSPage(com.arsdigita.bebop.Label title)

CMSPage

public CMSPage(com.arsdigita.bebop.Label title,
               com.arsdigita.bebop.Container panel)
Method Detail

buildPage

protected void buildPage()
Builds the page.


init

public void init()
Finishes and locks the page. If the page is already locked, does nothing. This method is called by the Dispatcher that initializes this page.

Specified by:
init in interface ResourceHandler

getXMLParameter

public String getXMLParameter(String name)
Fetches the value of the XML parameter.

Parameters:
name - The parameter name
Returns:
The parameter value

setXMLParameter

public void setXMLParameter(String name,
                            String value)
Set an XML parameter.

Parameters:
name - The parameter name
value - The parameter value

getContentSection

public ContentSection getContentSection(javax.servlet.http.HttpServletRequest request)
Deprecated. use com.arsdigita.cms.CMS.getContext().getContentSection() instead

Fetch the request-local content section.

Specified by:
getContentSection in interface ResourceHandler
Parameters:
request - The HTTP request
Returns:
The current content section

getContentSection

public ContentSection getContentSection(com.arsdigita.bebop.PageState state)
Deprecated. use com.arsdigita.cms.CMS.getContext().getContentSection() instead

Fetch the request-local content section.

Parameters:
state - The page state
Returns:
The current content section

getContentItem

public ContentItem getContentItem(javax.servlet.http.HttpServletRequest request)
Deprecated. use com.arsdigita.cms.CMS.getContext().getContentItem() instead

Fetch the request-local content item.

Specified by:
getContentItem in interface ResourceHandler
Parameters:
request - The HTTP request
Returns:
The current content item

getContentItem

public ContentItem getContentItem(com.arsdigita.bebop.PageState state)
Deprecated. use com.arsdigita.cms.CMS.getContext().getContentItem() instead

Fetch the request-local content item.

Parameters:
state - The page state
Returns:
The current content item

dispatch

public void dispatch(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response,
                     com.arsdigita.dispatcher.RequestContext actx)
              throws IOException,
                     javax.servlet.ServletException
Services the Bebop page.

Specified by:
dispatch in interface com.arsdigita.dispatcher.Dispatcher
Parameters:
request - The servlet request object
response - the servlet response object
actx - The request context
Throws:
IOException
javax.servlet.ServletException

generateXMLHelper

protected com.arsdigita.xml.Element generateXMLHelper(com.arsdigita.bebop.PageState ps,
                                                      com.arsdigita.xml.Document parent)

getCurrentUser

public static com.arsdigita.kernel.User getCurrentUser(com.arsdigita.bebop.PageState state)
Deprecated. Use Kernel.getContext().getParty() if possible and Web.getContext().getUser() if necessary.



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