info.magnolia.module.workflow.flows
Class DefaultFlowDefinitionManager

java.lang.Object
  extended by info.magnolia.module.workflow.flows.DefaultFlowDefinitionManager
All Implemented Interfaces:
FlowDefinitionManager

public class DefaultFlowDefinitionManager
extends Object
implements FlowDefinitionManager

Read and store flows in the repositories.

Author:
philipp

Constructor Summary
DefaultFlowDefinitionManager()
           
 
Method Summary
 void configure(openwfe.org.engine.workitem.LaunchItem launchItem, String workflowName)
          Configure the launchItem, so that it will use the workflow.
protected  String extractWorkflowName(String definition)
           
 List getDefinitionNames()
          List all available workflow names.
 Content getDefinitionNode(String name)
          find one flow node by flow name.
 String getFlowDefinitionURLPattern()
           
 String readDefinition(String workflowName)
          Read the workflow definition stored with this name.
 void saveDefinition(String definition)
          The flow name gets extracted out of the workflow definition.
protected  void saveDefinition(String workflowName, String definition)
           
 void setFlowDefinitionURLPattern(String flowDefinitionURLPattern)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFlowDefinitionManager

public DefaultFlowDefinitionManager()
Method Detail

configure

public void configure(openwfe.org.engine.workitem.LaunchItem launchItem,
                      String workflowName)
               throws FlowDefinitionException
Description copied from interface: FlowDefinitionManager
Configure the launchItem, so that it will use the workflow.

Specified by:
configure in interface FlowDefinitionManager
Throws:
FlowDefinitionException

readDefinition

public String readDefinition(String workflowName)
                      throws FlowDefinitionException
Description copied from interface: FlowDefinitionManager
Read the workflow definition stored with this name.

Specified by:
readDefinition in interface FlowDefinitionManager
Throws:
FlowDefinitionException

getDefinitionNode

public Content getDefinitionNode(String name)
                          throws javax.jcr.RepositoryException
find one flow node by flow name.

Returns:
Content node in JCR store for specified flow definition
Throws:
javax.jcr.RepositoryException

saveDefinition

public void saveDefinition(String definition)
                    throws FlowDefinitionException
Description copied from interface: FlowDefinitionManager
The flow name gets extracted out of the workflow definition.

Specified by:
saveDefinition in interface FlowDefinitionManager
Parameters:
definition - the workflow definition xml
Throws:
FlowDefinitionException

saveDefinition

protected void saveDefinition(String workflowName,
                              String definition)
                       throws FlowDefinitionException
Throws:
FlowDefinitionException

extractWorkflowName

protected String extractWorkflowName(String definition)
                              throws FlowDefinitionException
Throws:
FlowDefinitionException

getDefinitionNames

public List getDefinitionNames()
Description copied from interface: FlowDefinitionManager
List all available workflow names.

Specified by:
getDefinitionNames in interface FlowDefinitionManager

getFlowDefinitionURLPattern

public String getFlowDefinitionURLPattern()

setFlowDefinitionURLPattern

public void setFlowDefinitionURLPattern(String flowDefinitionURLPattern)


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.