org.apache.lenya.workflow
Interface WorkflowManager


public interface WorkflowManager

Manager for workflow issues. This is the main entry point for workflow-related tasks. You can safely invoke all methods for non-workflow documents.

Version:
$Id: WorkflowManager.java 179751 2005-06-03 09:13:35Z andreas $

Field Summary
static java.lang.String ROLE
          The Avalon role.
 
Method Summary
 boolean canInvoke(Workflowable workflowable, java.lang.String event)
          Checks if an event can be invoked on a document.
 Workflow getWorkflowSchema(Workflowable workflowable)
          Resolves the workflow schema of a workflowable.
 boolean hasWorkflow(Workflowable workflowable)
          Checks if a workflowable has a workflow.
 void invoke(Workflowable workflowable, java.lang.String event)
          Invokes a workflow event on a document.
 void invoke(Workflowable workflowable, java.lang.String event, boolean force)
          Invokes a workflow event on a document.
 

Field Detail

ROLE

static final java.lang.String ROLE
The Avalon role.

Method Detail

invoke

void invoke(Workflowable workflowable,
            java.lang.String event)
            throws WorkflowException
Invokes a workflow event on a document. This is the same as invoke(Document, String, true).

Parameters:
workflowable - The workflowable.
event - The name of the event.
Throws:
WorkflowException - if the event could not be invoked in the current situation.

invoke

void invoke(Workflowable workflowable,
            java.lang.String event,
            boolean force)
            throws WorkflowException
Invokes a workflow event on a document.

Parameters:
workflowable - The document.
event - The name of the event.
force - If this is set to true, the execution is forced, which means an exception is thrown if the workflowable in the set does not support the event. If set to false, non-supporting documents are ignored.
Throws:
WorkflowException - if the event could not be invoked in the current situation.

canInvoke

boolean canInvoke(Workflowable workflowable,
                  java.lang.String event)
Checks if an event can be invoked on a document.

Parameters:
workflowable - The workflowable.
event - The event.
Returns:
A boolean value.

hasWorkflow

boolean hasWorkflow(Workflowable workflowable)
Checks if a workflowable has a workflow.

Parameters:
workflowable - The workflowable.
Returns:
A boolean value.

getWorkflowSchema

Workflow getWorkflowSchema(Workflowable workflowable)
                           throws WorkflowException
Resolves the workflow schema of a workflowable.

Parameters:
workflowable - The workflowable.
Returns:
A workflow schema.
Throws:
WorkflowException - if the document has no workflow.


Copyright © 1999-2006 Apache Software Foundation. All Rights Reserved.