|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.workflow.spi.hibernate.SpringBeanNameWorkflowFactory
public class SpringBeanNameWorkflowFactory
Spring-compliant implementation of AbstractWorkflowFactory. This
workflow factory retrieves WorkflowDescriptors from the Spring's
ApplicationContext. The name of the WorkflowDescriptors is the name
of the bean in the applicationContext.
Motivation: reduce number of external configuration files leaving only
workflow definitions files.
<bean id="myworkflow" class="com.opensymphony.workflow.spi.hibernate.WorkflowDescriptorFactoryBean">
<property name="descriptorResource">
<value>classpath:/META-INF/workflow/myworkflow.xml</value>
</property>
</bean>
<bean id="workflowFactory" class="com.opensymphony.workflow.spi.hibernate.BeanNameWorkflowFactory"/>
| Constructor Summary | |
|---|---|
SpringBeanNameWorkflowFactory()
|
|
| Method Summary | |
|---|---|
void |
createWorkflow(String name)
|
Object |
getLayout(String workflowName)
|
String |
getName()
|
Properties |
getProperties()
|
WorkflowDescriptor |
getWorkflow(String inName)
|
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 inName)
|
void |
renameWorkflow(String oldName,
String newName)
|
void |
save()
|
boolean |
saveWorkflow(String inName,
WorkflowDescriptor inDescriptor,
boolean inReplace)
Save the workflow. |
void |
setApplicationContext(org.springframework.context.ApplicationContext inApplicationContext)
|
void |
setLayout(String workflowName,
Object layout)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringBeanNameWorkflowFactory()
| Method Detail |
|---|
public void setApplicationContext(org.springframework.context.ApplicationContext inApplicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAware
public void setLayout(String workflowName,
Object layout)
setLayout in interface WorkflowFactorypublic Object getLayout(String workflowName)
getLayout in interface WorkflowFactorypublic boolean isModifiable(String name)
isModifiable in interface WorkflowFactorypublic String getName()
getName in interface WorkflowFactorypublic Properties getProperties()
getProperties in interface WorkflowFactorypublic WorkflowDescriptor getWorkflow(String inName)
getWorkflow in interface WorkflowFactory
public WorkflowDescriptor getWorkflow(String name,
boolean validate)
throws FactoryException
WorkflowFactory
getWorkflow in interface WorkflowFactoryname - 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 WorkflowFactorypublic void createWorkflow(String name)
createWorkflow in interface WorkflowFactorypublic void init(Properties p)
init in interface WorkflowFactory
public void initDone()
throws FactoryException
initDone in interface WorkflowFactoryFactoryException
public boolean removeWorkflow(String inName)
throws FactoryException
removeWorkflow in interface WorkflowFactoryFactoryException
public void renameWorkflow(String oldName,
String newName)
renameWorkflow in interface WorkflowFactorypublic void save()
save in interface WorkflowFactory
public boolean saveWorkflow(String inName,
WorkflowDescriptor inDescriptor,
boolean inReplace)
throws FactoryException
WorkflowFactoryWorkflowDescriptor.validate() method. Invalid workflows will
be saved without being checked.
saveWorkflow in interface WorkflowFactoryinName - The name of the workflow to same.inDescriptor - The descriptor for the workflow.inReplace - true if an existing workflow with this name should be replaced.
FactoryException - if there was an error saving the workflow
InvalidWorkflowDescriptorException - if the descriptor specified is invalid
|
OpenSymphony Workflow Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||