com.arsdigita.cms.ui.authoring
Class ApplyWorkflowFormSection

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.FormSection
              extended bycom.arsdigita.cms.ui.authoring.ApplyWorkflowFormSection
All Implemented Interfaces:
Cloneable, com.arsdigita.bebop.Component, com.arsdigita.bebop.Container, EventListener, com.arsdigita.bebop.event.FormInitListener, com.arsdigita.util.Lockable

public class ApplyWorkflowFormSection
extends com.arsdigita.bebop.FormSection
implements com.arsdigita.bebop.event.FormInitListener

A FormSection which will allow users with SecrityConstants.APPLY_ALTERNATE_WORFLOWS permission to choose a different workflow to apply to a new item.

Version:
$Revision: #4 $ $DateTime: 2004/04/07 16:07:11 $
Author:
Stanislav Freidin (stas@arsdigita.com)

Field Summary
 
Fields inherited from class com.arsdigita.bebop.FormSection
m_formModel, m_panel, versionId
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr
 
Fields inherited from interface com.arsdigita.bebop.event.FormInitListener
versionId
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
ApplyWorkflowFormSection()
          Construct a new ApplyWorkflowFormSection
ApplyWorkflowFormSection(ContentType type)
          Construct a new ApplyWorkflowFormSection
ApplyWorkflowFormSection(ContentType type, com.arsdigita.bebop.Container panel)
          Construct a new ApplyWorkflowFormSection
 
Method Summary
 void applyWorkflow(com.arsdigita.bebop.PageState state, ContentItem item)
          Apply the proper initial workflow to the item.
 void init(com.arsdigita.bebop.event.FormSectionEvent e)
          Initializes the workflow selection widget to the default workflow for the content type.
 boolean isVisible(com.arsdigita.bebop.PageState state)
          Whether or not this component is visible.
 void setContentType(ContentType contentType)
          Sets the ContentType for the creation component.
 void setCreationSelector(CreationSelector creationSelector)
          Sets the CreationSelector which should be the same as that of the creation component.
 
Methods inherited from class com.arsdigita.bebop.FormSection
add, add, addCancelListener, addInitListener, addProcessListener, addSubmissionListener, addValidationListener, children, contains, createInitListener, createProcessListener, createSubmissionListener, createValidationListener, fireCancel, fireInit, fireProcess, fireSubmitted, fireValidate, forwardInit, forwardProcess, forwardSubmission, forwardValidation, generateXML, get, getModel, getPanel, indexOf, isEmpty, lock, process, register, removeCancelListener, removeInitListener, removeProcessListener, removeSubmissionListener, removeValidationListener, respond, size
 
Methods inherited from class com.arsdigita.bebop.SimpleComponent
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, 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, register, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible
 
Methods inherited from interface com.arsdigita.util.Lockable
isLocked
 

Constructor Detail

ApplyWorkflowFormSection

public ApplyWorkflowFormSection()
Construct a new ApplyWorkflowFormSection


ApplyWorkflowFormSection

public ApplyWorkflowFormSection(ContentType type)
Construct a new ApplyWorkflowFormSection


ApplyWorkflowFormSection

public ApplyWorkflowFormSection(ContentType type,
                                com.arsdigita.bebop.Container panel)
Construct a new ApplyWorkflowFormSection

Parameters:
panel - Container to use for this FormSection
Method Detail

init

public void init(com.arsdigita.bebop.event.FormSectionEvent e)
          throws com.arsdigita.bebop.FormProcessException
Initializes the workflow selection widget to the default workflow for the content type.

Specified by:
init in interface com.arsdigita.bebop.event.FormInitListener
Throws:
com.arsdigita.bebop.FormProcessException

setCreationSelector

public void setCreationSelector(CreationSelector creationSelector)
Sets the CreationSelector which should be the same as that of the creation component. This cannot be set in the constructor since for most creation components, addWidgets() is called via the superclass constructor, so this member will not yet be set.

Parameters:
creationSelector - CreationSelector to use for this FormSection

setContentType

public void setContentType(ContentType contentType)
Sets the ContentType for the creation component.

Parameters:
contentType - ContentType to use for this FormSection

isVisible

public boolean isVisible(com.arsdigita.bebop.PageState state)
Whether or not this component is visible. The additional visibility requirement is that the user must have the SecurityConstants.APPLY_ALTERNATE_WORKFLOWS privilege on the parent folder.

Specified by:
isVisible in interface com.arsdigita.bebop.Component
Parameters:
state - The PageState

applyWorkflow

public void applyWorkflow(com.arsdigita.bebop.PageState state,
                          ContentItem item)
Apply the proper initial workflow to the item. If the user has SecurityConstants.APPLY_ALTERNATE_WORKFLOWS permission on the parent folder and a workflow has been chosen, use this workflow. Otherwise use the default workflow for the content type.

Parameters:
state - The PageState
item - The new ContentItem


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