| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.workflow.WorkflowFactory
public class WorkflowFactory
Workflow factory.
| Field Summary | |
|---|---|
static java.lang.String | 
WORKFLOW_DIRECTORY
 | 
| Constructor Summary | |
|---|---|
protected  | 
WorkflowFactory()
Creates a new instance of WorkflowFactory  | 
| Method Summary | |
|---|---|
 WorkflowInstance | 
buildInstance(Document document)
Creates a new workflow instance.  | 
 Situation | 
buildSituation(Role[] roles,
               Identity identity)
Creates a situation for a set of roles and an identity.  | 
 Situation | 
buildSituation(java.lang.String[] roleIds,
               java.lang.String userId,
               java.lang.String machineIp)
Builds a situation from a role name set, a user ID and a machine IP address.  | 
 SynchronizedWorkflowInstances | 
buildSynchronizedInstance(Document document)
Creates a new synchronized workflow instances object..  | 
protected static Workflow | 
buildWorkflow(Publication publication,
              java.lang.String workflowFileName)
Builds a workflow for a given publication.  | 
static void | 
deleteHistory(Document document)
Deletes the history of a document.  | 
static History | 
getHistory(Document document)
Returns the workflow history of a document.  | 
 boolean | 
hasWorkflow(Document document)
Checks if a workflow is assigned to the document.  | 
static void | 
initHistory(Document sourceDocument,
            Document destinationDocument,
            Situation situation)
Initializes the workflow history of a document that is a copy of another document.  | 
static void | 
initHistory(Document document,
            java.lang.String workflowId,
            Situation situation)
Initializes the history of a document.  | 
static void | 
moveHistory(Document oldDocument,
            Document newDocument)
Moves the history of a document.  | 
static WorkflowFactory | 
newInstance()
Returns an instance of the workflow factory.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String WORKFLOW_DIRECTORY
| Constructor Detail | 
|---|
protected WorkflowFactory()
| Method Detail | 
|---|
public static WorkflowFactory newInstance()
public WorkflowInstance buildInstance(Document document)
                               throws WorkflowException
document - The document to create the instance for.
WorkflowException - when something went wrong.
public SynchronizedWorkflowInstances buildSynchronizedInstance(Document document)
                                                        throws WorkflowException
document - The document to create the instances for.
WorkflowException - when something went wrong.
public static void moveHistory(Document oldDocument,
                               Document newDocument)
                        throws WorkflowException
oldDocument - The document to move the instance for.newDocument - The new document.
WorkflowException - when something went wrong.
public static void deleteHistory(Document document)
                          throws WorkflowException
document - The document to delete the instance for.
WorkflowException - when something went wrong.public boolean hasWorkflow(Document document)
document - The document to check.
true if the document has a workflow, false otherwise.
protected static Workflow buildWorkflow(Publication publication,
                                        java.lang.String workflowFileName)
                                 throws WorkflowException
publication - The publication.workflowFileName - The workflow definition filename.
WorkflowException - when something went wrong.
public Situation buildSituation(Role[] roles,
                                Identity identity)
                         throws WorkflowException
roles - The roles.identity - The identity.
WorkflowException - when something went wrong.
public Situation buildSituation(java.lang.String[] roleIds,
                                java.lang.String userId,
                                java.lang.String machineIp)
roleIds - The role IDs.userId - The user ID.machineIp - The machine IP address.
public static void initHistory(Document document,
                               java.lang.String workflowId,
                               Situation situation)
                        throws WorkflowException
document - The document object.workflowId - The ID of the workflow.situation - The current situation.
WorkflowException - When something goes wrong.public static History getHistory(Document document)
document - A document.
public static void initHistory(Document sourceDocument,
                               Document destinationDocument,
                               Situation situation)
                        throws WorkflowException
sourceDocument - The original document.destinationDocument - The document to initialize the history for.
WorkflowException - When something goes wrong.
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||