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

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
                  extended by org.apache.lenya.cms.workflow.usecases.InvokeWorkflow
                      extended by org.apache.lenya.cms.workflow.usecases.Deactivate
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

public class Deactivate
extends InvokeWorkflow

Deactivate usecase handler.

Version:
$Id: Deactivate.java 589677 2007-10-29 15:33:17Z andreas $

Nested Class Summary
static class Deactivate.LinkList
          A list of links pointing to a document.
 
Field Summary
protected static java.lang.String LINKS_TO_DOCUMENT
           
 
Fields inherited from class org.apache.lenya.cms.workflow.usecases.CheckWorkflow
ATTRIBUTE_ID, 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
Deactivate()
           
 
Method Summary
protected  void deactivate(org.apache.lenya.cms.publication.Document authoringDocument)
          Deactivates a document.
protected  void doCheckPreconditions()
          Checks if the workflow event is supported and the parent of the document exists in the live area.
protected  void doExecute()
           
protected  java.lang.String getEvent()
           
protected  org.apache.lenya.cms.repository.Node[] getNodesToLock()
           
 
Methods inherited from class org.apache.lenya.cms.workflow.usecases.CheckWorkflow
configure
 
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, doInitialize, dumpErrorMessages, execute, getBooleanCheckboxParameter, getContext, getDocumentFactory, getErrorMessages, getExitQueryString, getInfoMessages, getName, 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

LINKS_TO_DOCUMENT

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

Deactivate

public Deactivate()
Method Detail

doCheckPreconditions

protected void doCheckPreconditions()
                             throws java.lang.Exception
Checks if the workflow event is supported and the parent of the document exists in the live area.

Overrides:
doCheckPreconditions in class CheckWorkflow
Throws:
java.lang.Exception
See Also:
AbstractUsecase.doCheckPreconditions()

getNodesToLock

protected org.apache.lenya.cms.repository.Node[] getNodesToLock()
                                                         throws org.apache.lenya.cms.usecase.UsecaseException
Overrides:
getNodesToLock in class InvokeWorkflow
Throws:
org.apache.lenya.cms.usecase.UsecaseException
See Also:
AbstractUsecase.getNodesToLock()

doExecute

protected void doExecute()
                  throws java.lang.Exception
Overrides:
doExecute in class InvokeWorkflow
Throws:
java.lang.Exception
See Also:
AbstractUsecase.doExecute()

deactivate

protected void deactivate(org.apache.lenya.cms.publication.Document authoringDocument)
Deactivates a document.

Parameters:
authoringDocument - The authoring document.

getEvent

protected java.lang.String getEvent()
Overrides:
getEvent in class CheckWorkflow
Returns:
The workflow event to use.


Copyright $ Apache Software Foundation. All Rights Reserved.