public class XMLWorkflowFactory extends AbstractWorkflowFactory implements Serializable
Modifier and Type | Field and Description |
---|---|
protected boolean |
reload |
protected Map |
workflows |
properties
Constructor and Description |
---|
XMLWorkflowFactory() |
Modifier and Type | Method and Description |
---|---|
void |
createWorkflow(String name) |
protected String |
getBaseDir(Element root)
Get where to find workflow XML files.
|
protected InputStream |
getInputStream(String name)
Load the workflow config file from the current context classloader.
|
Object |
getLayout(String workflowName) |
String |
getName() |
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 |
initDone()
Invoked after the properties of the factory have been set.
|
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) |
protected void |
writeXML(WorkflowDescriptor descriptor,
Writer out) |
getProperties, getWorkflow, init
protected Map workflows
protected boolean reload
public void setLayout(String workflowName, Object layout)
setLayout
in interface WorkflowFactory
public Object getLayout(String workflowName)
getLayout
in interface WorkflowFactory
public boolean isModifiable(String name)
isModifiable
in interface WorkflowFactory
public String getName()
getName
in interface WorkflowFactory
public WorkflowDescriptor getWorkflow(String name, boolean validate) throws FactoryException
WorkflowFactory
getWorkflow
in interface WorkflowFactory
name
- The name of the workflow to get.FactoryException
- if the specified workflow name does not exist or cannot be located.public String[] getWorkflowNames()
WorkflowFactory
getWorkflowNames
in interface WorkflowFactory
public void createWorkflow(String name)
createWorkflow
in interface WorkflowFactory
public void initDone() throws FactoryException
AbstractWorkflowFactory
initDone
in interface WorkflowFactory
initDone
in class AbstractWorkflowFactory
FactoryException
- if there was an error during initialization.public boolean removeWorkflow(String name) throws FactoryException
removeWorkflow
in interface WorkflowFactory
FactoryException
public void renameWorkflow(String oldName, String newName)
renameWorkflow
in interface WorkflowFactory
public void save()
save
in interface WorkflowFactory
public boolean saveWorkflow(String name, WorkflowDescriptor descriptor, boolean replace) throws FactoryException
WorkflowFactory
WorkflowDescriptor.validate()
method. Invalid workflows will
be saved without being checked.saveWorkflow
in interface WorkflowFactory
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.FactoryException
- if there was an error saving the workflowInvalidWorkflowDescriptorException
- if the descriptor specified is invalidprotected String getBaseDir(Element root)
root
- The root element of the XML file.protected InputStream getInputStream(String name)
protected void writeXML(WorkflowDescriptor descriptor, Writer out)
Copyright © 2021 catworkx GmbH. All rights reserved.