org.apache.lenya.cms.workflow.usecases
Class CheckWorkflow

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.cms.usecase.AbstractUsecase
          extended by org.apache.lenya.cms.usecase.DocumentUsecase
              extended by org.apache.lenya.cms.workflow.usecases.CheckWorkflow
All Implemented Interfaces:
org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.lenya.cms.usecase.Usecase
Direct Known Subclasses:
InvokeWorkflow

public class CheckWorkflow
extends org.apache.lenya.cms.usecase.DocumentUsecase
implements org.apache.avalon.framework.configuration.Configurable

Check if a workflow event can be invoked on the current document without actually invoking it. The event is obtained from the configuration in cocoon.xconf:

     <component-instance name="default/workflow.submit"
                            logger="lenya.usecases.workflow"
                            class="org.apache.lenya.cms.workflow.usecases.CheckWorkflow">
       <event id="submit"/>
     </component-instance>
 

Version:
$Id: InvokeWorkflow.java 426254 2006-07-27 21:27:04Z andreas $

Field Summary
protected static java.lang.String ATTRIBUTE_ID
           
protected static java.lang.String ELEMENT_EVENT
           
 
Fields inherited from class org.apache.lenya.cms.usecase.DocumentUsecase
DOCUMENT, TARGET_DOCUMENT
 
Fields inherited from class org.apache.lenya.cms.usecase.AbstractUsecase
ATTRIBUTE_NAME, ATTRIBUTE_POLICY, ATTRIBUTE_USECASE, ATTRIBUTE_VALUE, context, ELEMENT_EXIT, ELEMENT_PARAMETER, ELEMENT_TRANSACTION, ELEMENT_VIEW, ERROR_OBJECTS_CHECKED_OUT, EVENT_CHECK_EXECUTION_CONDITIONS, EVENT_CHECK_POSTCONDITIONS, EVENT_CHECK_PRECONDITIONS, EVENT_EXECUTE, manager, MODEL, PARAMETER_CHECKOUT_RESTRICTED_TO_SESSION, PARAMETER_FACTORY, PARAMETER_SESSION, PARAMETER_STATE_MACHINE, PARAMETERS_INITIALIZED, SOURCE_URL, TRANSITIONS, VALUE_OPTIMISTIC, VALUE_PESSIMISTIC
 
Fields inherited from interface org.apache.lenya.cms.usecase.Usecase
ROLE
 
Constructor Summary
CheckWorkflow()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration config)
           
protected  void doCheckPreconditions()
           
protected  java.lang.String getEvent()
           
 
Methods inherited from class org.apache.lenya.cms.usecase.DocumentUsecase
getSourceDocument, getSourceURL, getTargetDocument, getTargetURL, setDefaultTargetURL, setTargetDocument
 
Methods inherited from class org.apache.lenya.cms.usecase.AbstractUsecase
addErrorMessage, addErrorMessage, addErrorMessages, addInfoMessage, addInfoMessage, advance, advanceState, cancel, canCheckOut, checkEvent, checkExecutionConditions, checkoutRestrictedToSession, checkPostconditions, checkPreconditions, clearErrorMessages, clearInfoMessages, contextualize, deleteParameter, doCheckExecutionConditions, doCheckPostconditions, doExecute, doInitialize, dumpErrorMessages, execute, getBooleanCheckboxParameter, getContext, getDocumentFactory, getErrorMessages, getExitQueryString, getInfoMessages, getName, getNodesToLock, getParameter, getParameter, getParameterAsBoolean, getParameterAsInteger, getParameterAsString, getParameterAsString, getParameterNames, getParameters, getPart, getSession, getStateMachine, getView, hasErrors, hasInfoMessages, initialize, initializeParametersIfNotDone, initParameters, isOptimistic, lockInvolvedObjects, lockInvolvedObjects, prepareView, service, setExitParameter, setName, setParameter, setPart, setSession, setSourceURL, setTestSession, setView, startTransaction
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT_EVENT

protected static final java.lang.String ELEMENT_EVENT
See Also:
Constant Field Values

ATTRIBUTE_ID

protected static final java.lang.String ATTRIBUTE_ID
See Also:
Constant Field Values
Constructor Detail

CheckWorkflow

public CheckWorkflow()
Method Detail

getEvent

protected java.lang.String getEvent()
Returns:
The workflow event to use.

doCheckPreconditions

protected void doCheckPreconditions()
                             throws java.lang.Exception
Overrides:
doCheckPreconditions in class org.apache.lenya.cms.usecase.DocumentUsecase
Throws:
java.lang.Exception
See Also:
AbstractUsecase.doCheckPreconditions()

configure

public void configure(org.apache.avalon.framework.configuration.Configuration config)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Overrides:
configure in class org.apache.lenya.cms.usecase.AbstractUsecase
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)


Copyright $ Apache Software Foundation. All Rights Reserved.