com.opensymphony.workflow.loader
Interface WorkflowFactory

All Known Implementing Classes:
AbstractWorkflowFactory, HTTPWorkflowFactory, JDBCWorkflowFactory, SpringBeanNameWorkflowFactory, SpringHibernateWorkflowFactory, SpringWorkflowFactory, URLWorkflowFactory, XMLWorkflowFactory

public interface WorkflowFactory

Author:
hani Date: Feb 15, 2005 Time: 11:18:48 PM

Method Summary
 void createWorkflow(String name)
           
 Object getLayout(String workflowName)
           
 String getName()
           
 Properties getProperties()
           
 WorkflowDescriptor getWorkflow(String name)
           
 WorkflowDescriptor getWorkflow(String name, boolean validate)
          Get a workflow descriptor given a workflow name.
 String[] getWorkflowNames()
          Get all workflow names in the current factory
 void init(Properties p)
           
 void initDone()
           
 boolean isModifiable(String name)
           
 boolean removeWorkflow(String name)
           
 void renameWorkflow(String oldName, String newName)
           
 void save()
           
 boolean saveWorkflow(String name, WorkflowDescriptor descriptor, boolean replace)
          Save the workflow.
 void setLayout(String workflowName, Object layout)
           
 

Method Detail

setLayout

void setLayout(String workflowName,
               Object layout)

getLayout

Object getLayout(String workflowName)

isModifiable

boolean isModifiable(String name)

getName

String getName()

getProperties

Properties getProperties()

getWorkflow

WorkflowDescriptor getWorkflow(String name)
                               throws FactoryException
Throws:
FactoryException

getWorkflow

WorkflowDescriptor getWorkflow(String name,
                               boolean validate)
                               throws FactoryException
Get a workflow descriptor given a workflow name.

Parameters:
name - The name of the workflow to get.
Returns:
The descriptor for the specified workflow.
Throws:
FactoryException - if the specified workflow name does not exist or cannot be located.

getWorkflowNames

String[] getWorkflowNames()
                          throws FactoryException
Get all workflow names in the current factory

Returns:
An array of all workflow names
Throws:
FactoryException - if the factory cannot determine the names of the workflows it has.

createWorkflow

void createWorkflow(String name)

init

void init(Properties p)

initDone

void initDone()
              throws FactoryException
Throws:
FactoryException

removeWorkflow

boolean removeWorkflow(String name)
                       throws FactoryException
Throws:
FactoryException

renameWorkflow

void renameWorkflow(String oldName,
                    String newName)

save

void save()

saveWorkflow

boolean saveWorkflow(String name,
                     WorkflowDescriptor descriptor,
                     boolean replace)
                     throws FactoryException
Save the workflow. Is it the responsibility of the caller to ensure that the workflow is valid, through the WorkflowDescriptor.validate() method. Invalid workflows will be saved without being checked.

Parameters:
name - The name of the workflow to same.
descriptor - The descriptor for the workflow.
replace - true if an existing workflow with this name should be replaced.
Returns:
true if the workflow was saved.
Throws:
FactoryException - if there was an error saving the workflow
InvalidWorkflowDescriptorException - if the descriptor specified is invalid

OpenSymphony Workflow Project Page