com.arsdigita.cms.ui
Class ContentItemPage

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.ContentItemPage
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 ContentItemPage
extends CMSPage
implements com.arsdigita.bebop.event.ActionListener

Page for administering a content item.

Version:
$Id: //cms/dev/src/com/arsdigita/cms/ui/ContentItemPage.java#40 $
Author:
Michael Pih, Stanislav Freidin <sfreidin@redhat.com>, Jack Chung

Field Summary
static int AUTHORING_TAB
           
static String CONTENT_TYPE
          The name of the state parameter which indicates the content type of the item the user wishes to create.
static int HISTORY_TAB
           
static String ITEM_ID
          The name of the global state parameter that holds the item id
static int LANGUAGE_TAB
           
static int PUBLISHING_TAB
           
static String RETURN_URL
          The name of the global state parameter which holds the return URL
static String SET_TAB
          The URL parameter that must be passed in in order to set the current tab.
static String STREAMLINED_CREATION
          The name of the global state parameter that determines whether or not to use the streamlined authoring process (assuming the option is turned on).
static String STREAMLINED_CREATION_ACTIVE
           
static String STREAMLINED_CREATION_INACTIVE
           
static int SUMMARY_TAB
          Index of the summary tab
static int TEMPLATES_TAB
           
static String versionId
           
static int WORKFLOW_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
ContentItemPage()
          Constructs a new ContentItemPage.
 
Method Summary
 void actionPerformed(com.arsdigita.bebop.event.ActionEvent event)
          Set the current tab, if necessary
 ContentItem getContentItem(com.arsdigita.bebop.PageState state)
          Deprecated. Use the ItemSelectionModel
 ContentSection getContentSection(javax.servlet.http.HttpServletRequest request)
          Deprecated. use com.arsdigita.cms.CMS.getContext().getContentSection() instead
static String getItemURL(BigDecimal itemId, int tab)
          Constructs a URL for displaying a certain item.
static String getItemURL(ContentItem item, int tab)
          Constructs a URL for displaying a certain item.
static String getItemURL(String nodeURL, BigDecimal itemId, int tab)
          Construct a URL for displaying a certain item
static String getItemURL(String nodeURL, BigDecimal itemId, int tab, boolean streamlinedCreation)
          Construct a URL for displaying a certain item
static String getRelativeItemURL(BigDecimal itemId, int tab)
           
protected static com.arsdigita.globalization.GlobalizedMessage gz(String key)
           
static boolean isStreamlinedCreationActive(com.arsdigita.bebop.PageState state)
           
protected static String lz(String key)
           
 void redirectBack(com.arsdigita.bebop.PageState state)
          Redirect back to wherever the user came from, using the value of the return_url parameter.
protected  void validateItemID(com.arsdigita.bebop.PageState state)
          Ensures that the item_id parameter references a valid ContentItem.
 
Methods inherited from class com.arsdigita.cms.dispatcher.CMSPage
buildPage, dispatch, generateXMLHelper, 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

SET_TAB

public static final String SET_TAB
The URL parameter that must 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

ITEM_ID

public static final String ITEM_ID
The name of the global state parameter that holds the item id

See Also:
Constant Field Values

RETURN_URL

public static final String RETURN_URL
The name of the global state parameter which holds the return URL

See Also:
Constant Field Values

STREAMLINED_CREATION

public static final String STREAMLINED_CREATION
The name of the global state parameter that determines whether or not to use the streamlined authoring process (assuming the option is turned on).

See Also:
Constant Field Values

STREAMLINED_CREATION_ACTIVE

public static final String STREAMLINED_CREATION_ACTIVE
See Also:
Constant Field Values

STREAMLINED_CREATION_INACTIVE

public static final String STREAMLINED_CREATION_INACTIVE
See Also:
Constant Field Values

SUMMARY_TAB

public static final int SUMMARY_TAB
Index of the summary tab


CONTENT_TYPE

public static final String CONTENT_TYPE

The name of the state parameter which indicates the content type of the item the user wishes to create. or edit.

The parameter must be a BigDecimalParameter which encodes the id of the content type.

See Also:
Constant Field Values

AUTHORING_TAB

public static final int AUTHORING_TAB

LANGUAGE_TAB

public static final int LANGUAGE_TAB

WORKFLOW_TAB

public static final int WORKFLOW_TAB

PUBLISHING_TAB

public static final int PUBLISHING_TAB

HISTORY_TAB

public static final int HISTORY_TAB

TEMPLATES_TAB

public static final int TEMPLATES_TAB
Constructor Detail

ContentItemPage

public ContentItemPage()
Constructs a new ContentItemPage.

Method Detail

validateItemID

protected void validateItemID(com.arsdigita.bebop.PageState state)
                       throws com.arsdigita.bebop.FormProcessException
Ensures that the item_id parameter references a valid ContentItem.

Parameters:
state - The page state
Throws:
com.arsdigita.bebop.FormProcessException - if the item_id is not valid

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
Overrides:
getContentSection in class CMSPage
Parameters:
request - The HTTP request
Returns:
The current content section

getContentItem

public ContentItem getContentItem(com.arsdigita.bebop.PageState state)
Deprecated. Use the ItemSelectionModel

Overrides CMSPage.getContentItem(PageState state) to get the current content item from the page state.

Overrides:
getContentItem in class CMSPage
Parameters:
state - The page state
Returns:
The current content item, null if there is none

actionPerformed

public void actionPerformed(com.arsdigita.bebop.event.ActionEvent event)
Set the current tab, if necessary

Specified by:
actionPerformed in interface com.arsdigita.bebop.event.ActionListener

getItemURL

public static String getItemURL(String nodeURL,
                                BigDecimal itemId,
                                int tab)
Construct a URL for displaying a certain item

Parameters:
nodeURL - The URL where this page is mounted
itemId - The id of the item to display
tab - The index of the tab to display

getItemURL

public static String getItemURL(String nodeURL,
                                BigDecimal itemId,
                                int tab,
                                boolean streamlinedCreation)
Construct a URL for displaying a certain item

Parameters:
nodeURL - The URL where this page is mounted
itemId - The id of the item to display
tab - The index of the tab to display
streamlinedCreation - Whether to activate Streamlined item authoring

getRelativeItemURL

public static String getRelativeItemURL(BigDecimal itemId,
                                        int tab)

getItemURL

public static String getItemURL(ContentItem item,
                                int tab)
Constructs a URL for displaying a certain item.

Parameters:
item - the ContentItem object to display
tab - The index of the tab to display

getItemURL

public static String getItemURL(BigDecimal itemId,
                                int tab)
Constructs a URL for displaying a certain item.

Parameters:
itemId - the id of the ContentItem object to display
tab - The index of the tab to display

redirectBack

public void redirectBack(com.arsdigita.bebop.PageState state)
Redirect back to wherever the user came from, using the value of the return_url parameter.

Parameters:
state - The current page state

gz

protected static final com.arsdigita.globalization.GlobalizedMessage gz(String key)

lz

protected static final String lz(String key)

isStreamlinedCreationActive

public static boolean isStreamlinedCreationActive(com.arsdigita.bebop.PageState state)


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