com.arsdigita.cms.ui
Class ContentSectionPage

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
                          extended bycom.arsdigita.cms.ui.ContentSectionPage
All Implemented Interfaces:
com.arsdigita.bebop.event.ActionListener, Cloneable, com.arsdigita.bebop.Component, com.arsdigita.bebop.Container, com.arsdigita.dispatcher.Dispatcher, EventListener, com.arsdigita.util.Lockable, ResourceHandler

public class ContentSectionPage
extends CMSPage
implements com.arsdigita.bebop.event.ActionListener

Contains the entire admin UI for a content section.

Version:
$Id: //cms/dev/src/com/arsdigita/cms/ui/ContentSectionPage.java#33 $
Author:
Jack Chung, Michael Pih, Xixi D'Moon <xdmoon@redhat.com>, Justin Ross <jross@redhat.com>

Field Summary
static int BROWSE_TAB
          Index of the browse tab
static int CATEGORIES_TAB
          Index of the categories tab
static int CONTENTTYPES_TAB
          Index of the content types tab
static int LIFECYCLES_TAB
          Index of the lifecycles tab
static String RESOURCE_BUNDLE
           
static int ROLES_TAB
          Index of the roles tab
static int SEARCH_TAB
          Index of the search tab
static String SET_FOLDER
          The URL parameter that can be passed in in order to set the current folder.
static String SET_TAB
          The URL parameter that can be passed in in order to set the current tab.
static String SET_TEMPLATE
          The URL parameter that can be passed in in order to set the current template (for setting the content type)
static int USER_ADMIN_TAB
           
static String versionId
           
static int WORKFLOW_TAB
          Index of the workflows tab
 
Fields inherited from class com.arsdigita.cms.dispatcher.CMSPage
ASSETS, CMS_XML_NS, PAGE_CLASS
 
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
ContentSectionPage()
          Contains the UI for administering a content section.
 
Method Summary
 void actionPerformed(com.arsdigita.bebop.event.ActionEvent event)
          When a new tab is selected, reset the state of the formerly-selected pane.
protected  void addToPane(com.arsdigita.bebop.TabbedPane pane, String tabName, com.arsdigita.bebop.Component comp)
          Adds the specified component, with the specified tab name, to the tabbed pane only if it is not null.
protected  com.arsdigita.bebop.TabbedPane createTabbedPane()
          Created the TabbedPane to use for this page.
protected  BrowsePane getBrowsePane()
          Creates, and then caches, the browse pane.
protected  CategoryAdminPane getCategoryAdminPane()
          Creates, and then caches, the category administration pane.
 ContentSection getContentSection(javax.servlet.http.HttpServletRequest request)
          Fetch the request-local content section.
protected  ContentTypeAdminPane getContentTypeAdminPane()
          Creates, and then caches, the content type administration pane.
protected  FolderAdminPane getFolderAdminPane()
          Creates, and then caches, the browse pane.
protected  LifecycleAdminPane getLifecycleAdminPane()
          Creates, and then caches, the lifecycle administration pane.
protected  RoleAdminPane getRoleAdminPane()
           
protected  ItemSearch getSearchPane()
          Creates, and then caches, the search pane.
static String getSectionURL(ContentItem item, int tab)
          Construct a URL for displaying the tab
protected  UserAdminPane getUserAdminPane()
           
protected  WorkflowAdminPane getWorkflowAdminPane()
          Creates, and then caches, the workflow administration pane.
static com.arsdigita.globalization.GlobalizedMessage globalize(String key)
          Getting the GlobalizedMessage using a CMS Class targetBundle.
 
Methods inherited from class com.arsdigita.cms.dispatcher.CMSPage
buildPage, dispatch, generateXMLHelper, getContentItem, getContentItem, getContentSection, getCurrentUser, getXMLParameter, init, setXMLParameter
 
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

RESOURCE_BUNDLE

public static final String RESOURCE_BUNDLE
See Also:
Constant Field Values

SET_FOLDER

public static final String SET_FOLDER
The URL parameter that can be passed in in order to set the current folder. This is used in getting back to the correct level of folder expansion from content item page.

See Also:
Constant Field Values

SET_TEMPLATE

public static final String SET_TEMPLATE
The URL parameter that can be passed in in order to set the current template (for setting the content type)

See Also:
Constant Field Values

SET_TAB

public static final String SET_TAB
The URL parameter that can be passed in in order to set the current tab. This is a KLUDGE right now because the TabbedDialog's current tab is selected with a local state parameter.

See Also:
Constant Field Values

SEARCH_TAB

public static final int SEARCH_TAB
Index of the search tab

See Also:
Constant Field Values

BROWSE_TAB

public static final int BROWSE_TAB
Index of the browse tab

See Also:
Constant Field Values

ROLES_TAB

public static final int ROLES_TAB
Index of the roles tab

See Also:
Constant Field Values

WORKFLOW_TAB

public static final int WORKFLOW_TAB
Index of the workflows tab

See Also:
Constant Field Values

LIFECYCLES_TAB

public static final int LIFECYCLES_TAB
Index of the lifecycles tab

See Also:
Constant Field Values

CATEGORIES_TAB

public static final int CATEGORIES_TAB
Index of the categories tab

See Also:
Constant Field Values

CONTENTTYPES_TAB

public static final int CONTENTTYPES_TAB
Index of the content types tab

See Also:
Constant Field Values

USER_ADMIN_TAB

public static final int USER_ADMIN_TAB
See Also:
Constant Field Values
Constructor Detail

ContentSectionPage

public ContentSectionPage()
Contains the UI for administering a content section.

Method Detail

getFolderAdminPane

protected FolderAdminPane getFolderAdminPane()
Creates, and then caches, the browse pane. Overriding this method to return null will prevent this tab from appearing.


getBrowsePane

protected BrowsePane getBrowsePane()
Creates, and then caches, the browse pane. Overriding this method to return null will prevent this tab from appearing.


getSearchPane

protected ItemSearch getSearchPane()
Creates, and then caches, the search pane. Overriding this method to return null will prevent this tab from appearing.


getRoleAdminPane

protected RoleAdminPane getRoleAdminPane()

getWorkflowAdminPane

protected WorkflowAdminPane getWorkflowAdminPane()
Creates, and then caches, the workflow administration pane. Overriding this method to return null will prevent this tab from appearing.


getLifecycleAdminPane

protected LifecycleAdminPane getLifecycleAdminPane()
Creates, and then caches, the lifecycle administration pane. Overriding this method to return null will prevent this tab from appearing.


getCategoryAdminPane

protected CategoryAdminPane getCategoryAdminPane()
Creates, and then caches, the category administration pane. Overriding this method to return null will prevent this tab from appearing.


getContentTypeAdminPane

protected ContentTypeAdminPane getContentTypeAdminPane()
Creates, and then caches, the content type administration pane. Overriding this method to return null will prevent this tab from appearing.


getUserAdminPane

protected UserAdminPane getUserAdminPane()

addToPane

protected void addToPane(com.arsdigita.bebop.TabbedPane pane,
                         String tabName,
                         com.arsdigita.bebop.Component comp)
Adds the specified component, with the specified tab name, to the tabbed pane only if it is not null.

Parameters:
pane - The pane to which to add the tab
tabName - The name of the tab if it's added
comp - The component to add to the pane

createTabbedPane

protected com.arsdigita.bebop.TabbedPane createTabbedPane()

Created the TabbedPane to use for this page. Adds the tabs to the pane. The default implementation uses a TabbedPane. This implementation also adds browse, search, staff admin, viewers admin, workflow admin, category admin, and content type panes.

Developers can override this method to add only the tabs they want, or to add additional tabs after the default CMS tabs are added.


getContentSection

public ContentSection getContentSection(javax.servlet.http.HttpServletRequest request)
Fetch the request-local content section.

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

actionPerformed

public void actionPerformed(com.arsdigita.bebop.event.ActionEvent event)
When a new tab is selected, reset the state of the formerly-selected pane.

Specified by:
actionPerformed in interface com.arsdigita.bebop.event.ActionListener
Parameters:
event - The event fired by selecting a tab

getSectionURL

public static String getSectionURL(ContentItem item,
                                   int tab)
Construct a URL for displaying the tab

Parameters:
item - The item from which we get the corresponding content section
tab - The index of the tab to display

globalize

public static com.arsdigita.globalization.GlobalizedMessage globalize(String key)
Getting the GlobalizedMessage using a CMS Class targetBundle.

Parameters:
key - The resource key


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