Package com.opensymphony.workflow.loader
Class HTTPWorkflowFactory
java.lang.Object
com.opensymphony.workflow.loader.AbstractWorkflowFactory
com.opensymphony.workflow.loader.HTTPWorkflowFactory
- All Implemented Interfaces:
WorkflowFactory
- Author:
- Hani Suleiman Date: Dec 17, 2004 Time: 12:00:36 AM
-
Field Summary
FieldsFields inherited from class com.opensymphony.workflow.loader.AbstractWorkflowFactory
properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateWorkflow(String name) protected static StringgetName()getWorkflow(String name, boolean validate) Get a workflow descriptor given a workflow name.String[]Get all workflow names in the current factoryvoidinitDone()Invoked after the properties of the factory have been set.booleanisModifiable(String name) protected static Stringprotected StringreadLayoutBuffer(String url, String docId) protected StringreadWorkflowBuffer(String url, String docId) booleanremoveWorkflow(String name) voidrenameWorkflow(String oldName, String newName) voidsave()booleansaveWorkflow(String name, WorkflowDescriptor descriptor, boolean replace) Save the workflow.voidprotected StringwriteWorkflowDescriptor(String url, String docId, String name, String workflowXML) protected StringwriteWorkflowLayout(String url, String docId, String name, String layoutXML) protected voidwriteXML(WorkflowDescriptor descriptor, Writer out) Methods inherited from class com.opensymphony.workflow.loader.AbstractWorkflowFactory
getProperties, getWorkflow, init
-
Field Details
-
workflows
-
reload
protected boolean reload
-
-
Constructor Details
-
HTTPWorkflowFactory
public HTTPWorkflowFactory()
-
-
Method Details
-
setLayout
-
getLayout
-
isModifiable
-
getName
-
getWorkflow
Description copied from interface:WorkflowFactoryGet 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
Description copied from interface:WorkflowFactoryGet 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
-
initDone
Description copied from class:AbstractWorkflowFactoryInvoked after the properties of the factory have been set. Subclasses should override this method and add any specific setup code required. For example, connecting to an external resource or database.- Specified by:
initDonein interfaceWorkflowFactory- Overrides:
initDonein classAbstractWorkflowFactory- Throws:
FactoryException- if there was an error during initialization.
-
removeWorkflow
- Throws:
FactoryException
-
renameWorkflow
-
save
public void save() -
saveWorkflow
public boolean saveWorkflow(String name, WorkflowDescriptor descriptor, boolean replace) throws FactoryException Description copied from interface:WorkflowFactorySave the workflow. Is it the responsibility of the caller to ensure that the workflow is valid, through theWorkflowDescriptor.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
-
get
- Throws:
IOException
-
post
- Throws:
IOException
-
readLayoutBuffer
- Throws:
Exception
-
readWorkflowBuffer
- Throws:
Exception
-
writeWorkflowDescriptor
protected String writeWorkflowDescriptor(String url, String docId, String name, String workflowXML) throws Exception - Throws:
Exception
-
writeWorkflowLayout
protected String writeWorkflowLayout(String url, String docId, String name, String layoutXML) throws Exception - Throws:
Exception
-
writeXML
-