| java.lang.Object org.apache.lenya.cms.workflow.WorkflowUtil
WorkflowUtil | public class WorkflowUtil (Code) | | Utility class for workflow tasks.
version: $Id:$ |
Method Summary | |
public static boolean | canInvoke(ServiceManager manager, Session session, Logger logger, Document document, String event) Checks if an event can be invoked on a document.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: document - The document. Parameters: event - The event. | public static boolean | canInvoke(ServiceManager manager, Session session, Logger logger, DocumentSet documents, String event) Checks if an event can be invoked on all documents in a set.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: documents - The documents. Parameters: event - The event. | public static Workflow | getWorkflowSchema(ServiceManager manager, Session session, Logger logger, Document document) Returns the workflow schema of a document.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: document - The document. | public static Workflowable | getWorkflowable(ServiceManager manager, Session session, Logger logger, Document document) Returns a workflowable for a document.
Parameters: manager - The service manager. Parameters: session - The session. Parameters: logger - The logger. Parameters: document - The document. | public static boolean | hasWorkflow(ServiceManager manager, Session session, Logger logger, Document document) Returns if a document has a workflow.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: document - The document. | public static void | invoke(ServiceManager manager, Session session, Logger logger, Document document, String event) Invokes a workflow event on a document. | public static void | invoke(ServiceManager manager, Session session, Logger logger, Document document, String event, boolean force) Invokes a workflow event on a document.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: document - The document. Parameters: event - The name of the event. Parameters: force - If this is set to true , the execution is forced, which means anexception is thrown if the workflowable in the set does not support the event. | public static void | invoke(ServiceManager manager, Session session, Logger logger, DocumentSet documentSet, String event, boolean force) Invokes a workflow event on a document set.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: documentSet - The document. Parameters: event - The event. Parameters: force - If this is set to true , the execution is forced, which means anexception is thrown if a document in the set does not support the event. |
canInvoke | public static boolean canInvoke(ServiceManager manager, Session session, Logger logger, Document document, String event) throws WorkflowException(Code) | | Checks if an event can be invoked on a document.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: document - The document. Parameters: event - The event. A boolean value. throws: WorkflowException - |
canInvoke | public static boolean canInvoke(ServiceManager manager, Session session, Logger logger, DocumentSet documents, String event) throws WorkflowException(Code) | | Checks if an event can be invoked on all documents in a set.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: documents - The documents. Parameters: event - The event. if an error occurs. throws: WorkflowException - |
getWorkflowSchema | public static Workflow getWorkflowSchema(ServiceManager manager, Session session, Logger logger, Document document) throws WorkflowException(Code) | | Returns the workflow schema of a document.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: document - The document. A workflow schema. throws: WorkflowException - if an error occurs. |
getWorkflowable | public static Workflowable getWorkflowable(ServiceManager manager, Session session, Logger logger, Document document)(Code) | | Returns a workflowable for a document.
Parameters: manager - The service manager. Parameters: session - The session. Parameters: logger - The logger. Parameters: document - The document. A workflowable. |
hasWorkflow | public static boolean hasWorkflow(ServiceManager manager, Session session, Logger logger, Document document) throws WorkflowException(Code) | | Returns if a document has a workflow.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: document - The document. A boolean value. throws: WorkflowException - if an error occurs. |
invoke | public static void invoke(ServiceManager manager, Session session, Logger logger, Document document, String event) throws WorkflowException(Code) | | Invokes a workflow event on a document. This is the same as
invoke(Document, String, true) .
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: document - The document. Parameters: event - The name of the event. throws: WorkflowException - if the event could not be invoked in the current situation. |
invoke | public static void invoke(ServiceManager manager, Session session, Logger logger, Document document, String event, boolean force) throws WorkflowException(Code) | | Invokes a workflow event on a document.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: document - The document. Parameters: event - The name of the event. Parameters: force - If this is set to true , the execution is forced, which means anexception is thrown if the workflowable in the set does not support the event. Ifset to false , non-supporting documents are ignored. throws: WorkflowException - if the event could not be invoked in the current situation. |
invoke | public static void invoke(ServiceManager manager, Session session, Logger logger, DocumentSet documentSet, String event, boolean force) throws WorkflowException(Code) | | Invokes a workflow event on a document set.
Parameters: manager - The service manager. Parameters: session - The repository session. Parameters: logger - The logger. Parameters: documentSet - The document. Parameters: event - The event. Parameters: force - If this is set to true , the execution is forced, which means anexception is thrown if a document in the set does not support the event. If set tofalse , non-supporting documents are ignored. throws: WorkflowException - if force is set to true and adocument does not support the workflow event. |
|
|