Java Doc for AbstractFlowBuilder.java in  » Workflow-Engines » spring-webflow-1.0.4 » org » springframework » webflow » engine » builder » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » spring webflow 1.0.4 » org.springframework.webflow.engine.builder 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.webflow.engine.builder.BaseFlowBuilder
      org.springframework.webflow.engine.builder.AbstractFlowBuilder

AbstractFlowBuilder
abstract public class AbstractFlowBuilder extends BaseFlowBuilder (Code)
Base class for flow builders that programmatically build flows in Java configuration code.

To give you an example of what a simple Java-based web flow builder definition might look like, the following example defines the 'dynamic' web flow roughly equivalent to the work flow statically implemented in Spring MVC's simple form controller:

 public class CustomerDetailFlowBuilder extends AbstractFlowBuilder {
 public void buildStates() {
 // get customer information
 addActionState("getDetails", action("customerAction"), transition(on(success()), to("displayDetails")));
 // view customer information               
 addViewState("displayDetails", "customerDetails", transition(on(submit()), to("bindAndValidate")));
 // bind and validate customer information updates 
 addActionState("bindAndValidate", action("customerAction"), new Transition[] {
 transition(on(error()), to("displayDetails")), transition(on(success()), to("finish")) });
 // finish
 addEndState("finish");
 }
 }
 
What this Java-based FlowBuilder implementation does is add four states to a flow. These include a "get" ActionState (the start state), a ViewState state, a "bind and validate" ActionState, and an end marker state (EndState).

The first state, an action state, will be assigned the indentifier getDetails. This action state will automatically be configured with the following defaults:

  1. The action instance with id customerAction. This is the Action implementation that will execute when this state is entered. In this example, that Action will go out to the DB, load the Customer, and put it in the Flow's request context.
  2. A success transition to a default view state, called displayDetails. This means when the Action returns a success result event (aka outcome), the displayDetails state will be entered.
  3. It will act as the start state for this flow (by default, the first state added to a flow during the build process is treated as the start state).

The second state, a view state, will be identified as displayDetails. This view state will automatically be configured with the following defaults:

  1. A view name called customerDetails. This is the logical name of a view resource. This logical view name gets mapped to a physical view resource (jsp, etc.) by the calling front controller (via a Spring view resolver, or a Struts action forward, for example).
  2. A submit transition to a bind and validate action state, indentified by the default id bindAndValidate. This means when a submit event is signaled by the view (for example, on a submit button click), the bindAndValidate action state will be entered and the bindAndValidate method of the customerAction Action implementation will be executed.

The third state, an action state, will be indentified as bindAndValidate. This action state will automatically be configured with the following defaults:

  1. An action bean named customerAction -- this is the name of the Action implementation exported in the application context that will execute when this state is entered. In this example, the Action has a "bindAndValidate" method that will bind form input in the HTTP request to a backing Customer form object, validate it, and update the DB.
  2. A success transition to a default end state, called finish. This means if the Action returns a success result, the finish end state will be transitioned to and the flow will terminate.
  3. An error transition back to the form view. This means if the Action returns an error event, the displayDetails view state will be transitioned back to.

The fourth and last state, an end state, will be indentified with the default end state id finish. This end state is a marker that signals the end of the flow. When entered, the flow session terminates, and if this flow is acting as a root flow in the current flow execution, any flow-allocated resources will be cleaned up. An end state can optionally be configured with a logical view name to forward to when entered. It will also trigger a state transition in a resuming parent flow if this flow was participating as a spawned 'subflow' within a suspended parent flow.
author:
   Keith Donald
author:
   Erwin Vervaet




Constructor Summary
protected  AbstractFlowBuilder()
     Default constructor for subclassing.
protected  AbstractFlowBuilder(FlowServiceLocator flowServiceLocator)
     Create an instance of an abstract flow builder, using the specified locator to obtain needed flow services at build time.

Method Summary
protected  Actionaction(String id)
     Resolves the action with the specified id.
protected  Actionaction(String beanId, MethodSignature methodSignature)
     Creates a bean invoking action that invokes the method identified by the signature on the bean associated with the action identifier.
protected  Actionaction(String beanId, MethodSignature methodSignature, ActionResultExposer resultExposer)
     Creates a bean invoking action that invokes the method identified by the signature on the bean associated with the action identifier.
protected  Actionaction(Expression expression)
     Creates an evaluate action that evaluates the expression when executed.
protected  Actionaction(Expression expression, ActionResultExposer resultExposer)
     Creates an evaluate action that evaluates the expression when executed.
protected  Stringadd()
     Creates the add event id.
protected  StateaddActionState(String stateId, Action action, Transition transition)
     Adds an action state to the flow built by this builder.
protected  StateaddActionState(String stateId, Action action, Transition[] transitions)
     Adds an action state to the flow built by this builder.
protected  StateaddActionState(String stateId, Action action, Transition transition, FlowExecutionExceptionHandler exceptionHandler)
     Adds an action state to the flow built by this builder.
protected  StateaddActionState(String stateId, Action[] entryActions, Action[] actions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes)
     Adds an action state to the flow built by this builder.
protected  StateaddDecisionState(String stateId, Transition[] transitions)
     Adds a decision state to the flow built by this builder.
protected  StateaddDecisionState(String stateId, TransitionCriteria decisionCriteria, String trueStateId, String falseStateId)
     Adds a decision state to the flow built by this builder.
protected  StateaddDecisionState(String stateId, Action[] entryActions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes)
     Adds a decision state to the flow built by this builder.
protected  StateaddEndState(String stateId)
     Adds an end state to the flow built by this builder.
protected  StateaddEndState(String stateId, String viewName)
     Adds an end state to the flow built by this builder.
protected  StateaddEndState(String stateId, String viewName, AttributeMapper outputMapper)
     Adds an end state to the flow built by this builder.
protected  StateaddEndState(String stateId, Action[] entryActions, ViewSelector viewSelector, AttributeMapper outputMapper, FlowExecutionExceptionHandler[] exceptionHandlers, AttributeMap attributes)
     Adds an end state to the flow built by this builder.
protected  StateaddSubflowState(String stateId, Flow subflow, FlowAttributeMapper attributeMapper, Transition transition)
     Adds a subflow state to the flow built by this builder.
protected  StateaddSubflowState(String stateId, Flow subflow, FlowAttributeMapper attributeMapper, Transition[] transitions)
     Adds a subflow state to the flow built by this builder.
protected  StateaddSubflowState(String stateId, Action[] entryActions, Flow subflow, FlowAttributeMapper attributeMapper, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes)
     Adds a subflow state to the flow built by this builder.
protected  StateaddViewState(String stateId, String viewName, Transition transition)
     Adds a view state to the flow built by this builder.
protected  StateaddViewState(String stateId, String viewName, Transition[] transitions)
     Adds a view state to the flow built by this builder.
protected  StateaddViewState(String stateId, String viewName, Action renderAction, Transition transition)
     Adds a view state to the flow built by this builder.
protected  StateaddViewState(String stateId, String viewName, Action renderAction, Transition[] transitions)
     Adds a view state to the flow built by this builder.
protected  StateaddViewState(String stateId, Action[] entryActions, ViewSelector viewSelector, Action[] renderActions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes)
     Adds a view state to the flow built by this builder.
protected  AnnotatedActionannotate(Action action)
     Wrap given action in an AnnotatedAction } to be able to annotate it with attributes.
protected  FlowAttributeMapperattributeMapper(String id)
     Request that the attribute mapper with the specified name be used to map attributes between a parent flow and a spawning subflow when the subflow state being constructed is entered.
protected  Stringback()
     Creates the back event id.
protected  Stringcancel()
     Creates the cancel event id.
protected  Stringdelete()
     Creates the delete event id.
protected  Stringedit()
     Creates the edit event id.
protected  Stringerror()
     Creates the error event id.
protected  Expressionexpression(String expressionString)
     Parses the expression string into an evaluatable Expression object.
Parameters:
  expressionString - the expression string, e.g.
protected  Stringfinish()
     Creates the finish event id.
protected  Flowflow(String id)
     Request that the Flow with the specified flowId be spawned as a subflow when the subflow state being built is entered.
protected  AttributeMapflowAttributes()
     Hook subclasses may override to provide additional properties for the flow built by this builder.
public  EventFactorySupportgetEventFactorySupport()
     Returns the configured event factory support helper for creating commonly used event identifiers that drive transitions created by this builder.
protected  TransitionCriteriaifReturnedSuccess(Action action)
     Creates a TransitionCriteria that will execute the specified action when the Transition is executed but before the transition's target state is entered.
public  voidinit(String flowId, AttributeMap attributes)
    
protected  voidinitBuilder()
     Hook method subclasses can override to initialize the flow builder. Will be called by AbstractFlowBuilder.init(String,AttributeMap) after creating the initial Flow object.
protected  AnnotatedActioninvoke(String methodName, Action multiAction)
     Creates an annotated action decorator that instructs the specified method be invoked on the multi action when it is executed.
protected  AnnotatedActioninvoke(String methodName, MultiAction multiAction)
     Creates an annotated action decorator that instructs the specified method be invoked on the multi action when it is executed.
protected  MappingBuildermapping()
     Factory method that returns a new, fully configured mapping builder to assist with building Mapping objects used by a FlowAttributeMapper to map attributes.
protected  MethodSignaturemethod(String method)
     Convert the encoded method signature string to a MethodSignature object.
protected  AnnotatedActionname(String name, Action action)
     Creates an annotated action decorator that makes the given action an named action.
protected  Stringno()
     Creates the no event id.
protected  TransitionCriteriaon(String transitionCriteriaExpression)
     Creates a transition criteria that is used to match a Transition.
protected  ActionResultExposerresult(String resultName)
     Factory method for a ActionResultExposer result exposer .
protected  ActionResultExposerresult(String resultName, ScopeType resultScope)
     Factory method for a ActionResultExposer result exposer .
protected  Stringselect()
     Creates the select event id.
public  voidsetEventFactorySupport(EventFactorySupport eventFactorySupport)
     Sets the event factory support helper to use to create commonly used event identifiers that drive transitions created by this builder.
protected  SettableExpressionsettableExpression(String expressionString)
     Parses the expression string into a settable Expression object.
Parameters:
  expressionString - the expression string, e.g.
protected  Stringsubmit()
     Creates the submit event id.
protected  Stringsuccess()
     Creates the success event id.
protected  TargetStateResolverto(String targetStateIdExpression)
     Creates a target state resolver for the given state id expression.
public  StringtoString()
    
protected  Transitiontransition(TransitionCriteria matchingCriteria, TargetStateResolver targetStateResolver)
     Creates a new transition.
protected  Transitiontransition(TransitionCriteria matchingCriteria, TargetStateResolver targetStateResolver, TransitionCriteria executionCriteria)
     Creates a new transition.
protected  Transitiontransition(TransitionCriteria matchingCriteria, TargetStateResolver targetStateResolver, TransitionCriteria executionCriteria, AttributeMap attributes)
     Creates a new transition.
public  ViewSelectorviewSelector(String viewName)
     Factory method that creates a view selector from an encoded view name.
protected  Stringyes()
     Creates the yes event id.


Constructor Detail
AbstractFlowBuilder
protected AbstractFlowBuilder()(Code)
Default constructor for subclassing.



AbstractFlowBuilder
protected AbstractFlowBuilder(FlowServiceLocator flowServiceLocator)(Code)
Create an instance of an abstract flow builder, using the specified locator to obtain needed flow services at build time.
Parameters:
  flowServiceLocator - the locator for services needed by this builderto build its Flow




Method Detail
action
protected Action action(String id) throws FlowArtifactLookupException(Code)
Resolves the action with the specified id. Simply looks the action up by id and returns it.
Parameters:
  id - the action id the action
throws:
  FlowArtifactLookupException - the action could not be resolved



action
protected Action action(String beanId, MethodSignature methodSignature) throws FlowArtifactLookupException(Code)
Creates a bean invoking action that invokes the method identified by the signature on the bean associated with the action identifier.
Parameters:
  beanId - the id identifying an arbitraryjava.lang.Object to be used as an action
Parameters:
  methodSignature - the signature of the method to invoke on the POJO the adapted bean invoking action
throws:
  FlowArtifactLookupException - the action could not be resolved



action
protected Action action(String beanId, MethodSignature methodSignature, ActionResultExposer resultExposer) throws FlowArtifactLookupException(Code)
Creates a bean invoking action that invokes the method identified by the signature on the bean associated with the action identifier.
Parameters:
  beanId - the id identifying an arbitraryjava.lang.Object to be used as an action
Parameters:
  methodSignature - the signature of the method to invoke on the POJO the adapted bean invoking action
throws:
  FlowArtifactLookupException - the action could not be resolved



action
protected Action action(Expression expression)(Code)
Creates an evaluate action that evaluates the expression when executed.
Parameters:
  expression - the expression to evaluate



action
protected Action action(Expression expression, ActionResultExposer resultExposer)(Code)
Creates an evaluate action that evaluates the expression when executed.
Parameters:
  expression - the expression to evaluate
Parameters:
  resultExposer - the evaluation result exposer



add
protected String add()(Code)
Creates the add event id. "Add" indicates a child object is being added to a parent collection. the event id



addActionState
protected State addActionState(String stateId, Action action, Transition transition)(Code)
Adds an action state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  action - the single action to execute when the state is entered
Parameters:
  transition - the single transition (path) out of this state the fully constructed action state instance



addActionState
protected State addActionState(String stateId, Action action, Transition[] transitions)(Code)
Adds an action state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  action - the single action to execute when the state is entered
Parameters:
  transitions - the transitions (paths) out of this state the fully constructed action state instance



addActionState
protected State addActionState(String stateId, Action action, Transition transition, FlowExecutionExceptionHandler exceptionHandler)(Code)
Adds an action state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  action - the single action to execute when the state is entered
Parameters:
  transition - the single transition (path) out of this state
Parameters:
  exceptionHandler - the exception handler to handle exceptions thrownby the action the fully constructed action state instance



addActionState
protected State addActionState(String stateId, Action[] entryActions, Action[] actions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes)(Code)
Adds an action state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  entryActions - any generic entry actions to add to the state
Parameters:
  actions - the actions to execute in a chain when the state isentered
Parameters:
  transitions - the transitions (paths) out of this state
Parameters:
  exceptionHandlers - the exception handlers to handle exceptionsthrown by the actions
Parameters:
  exitActions - the exit actions to execute when the state exits
Parameters:
  attributes - attributes to assign to the state that may be used toaffect state construction and execution the fully constructed action state instance



addDecisionState
protected State addDecisionState(String stateId, Transition[] transitions)(Code)
Adds a decision state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  transitions - the transitions (paths) out of this state the fully constructed decision state instance



addDecisionState
protected State addDecisionState(String stateId, TransitionCriteria decisionCriteria, String trueStateId, String falseStateId)(Code)
Adds a decision state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  decisionCriteria - the criteria that defines the decision
Parameters:
  trueStateId - the target state on a "true" decision
Parameters:
  falseStateId - the target state on a "false" decision the fully constructed decision state instance



addDecisionState
protected State addDecisionState(String stateId, Action[] entryActions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes)(Code)
Adds a decision state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  entryActions - the entry actions to execute when the state enters
Parameters:
  transitions - the transitions (paths) out of this state
Parameters:
  exceptionHandlers - the exception handlers to handle exceptionsthrown by the state
Parameters:
  exitActions - the exit actions to execute when the state exits
Parameters:
  attributes - attributes to assign to the state that may be used toaffect state construction and execution the fully constructed decision state instance



addEndState
protected State addEndState(String stateId)(Code)
Adds an end state to the flow built by this builder.
Parameters:
  stateId - the state identifier the fully constructed end state instance



addEndState
protected State addEndState(String stateId, String viewName)(Code)
Adds an end state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  viewName - the string-encoded view selector the fully constructed end state instance



addEndState
protected State addEndState(String stateId, String viewName, AttributeMapper outputMapper)(Code)
Adds an end state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  viewName - the string-encoded view selector
Parameters:
  outputMapper - the output mapper to map output attributes for theend state (a flow outcome) the fully constructed end state instance



addEndState
protected State addEndState(String stateId, Action[] entryActions, ViewSelector viewSelector, AttributeMapper outputMapper, FlowExecutionExceptionHandler[] exceptionHandlers, AttributeMap attributes)(Code)
Adds an end state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  entryActions - the actions to execute when the state is entered
Parameters:
  viewSelector - the view selector that will make the view selectionwhen the state is entered
Parameters:
  outputMapper - the output mapper to map output attributes for theend state (a flow outcome)
Parameters:
  exceptionHandlers - any exception handlers to attach to the state
Parameters:
  attributes - attributes to assign to the state that may be used toaffect state construction and execution the fully constructed end state instance



addSubflowState
protected State addSubflowState(String stateId, Flow subflow, FlowAttributeMapper attributeMapper, Transition transition)(Code)
Adds a subflow state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  subflow - the flow that will act as the subflow
Parameters:
  attributeMapper - the mapper to map subflow input and outputattributes
Parameters:
  transition - the single transition (path) out of the state the fully constructed subflow state instance



addSubflowState
protected State addSubflowState(String stateId, Flow subflow, FlowAttributeMapper attributeMapper, Transition[] transitions)(Code)
Adds a subflow state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  subflow - the flow that will act as the subflow
Parameters:
  attributeMapper - the mapper to map subflow input and outputattributes
Parameters:
  transitions - the transitions (paths) out of the state the fully constructed subflow state instance



addSubflowState
protected State addSubflowState(String stateId, Action[] entryActions, Flow subflow, FlowAttributeMapper attributeMapper, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes)(Code)
Adds a subflow state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  entryActions - the entry actions to execute when the state enters
Parameters:
  subflow - the flow that will act as the subflow
Parameters:
  attributeMapper - the mapper to map subflow input and outputattributes
Parameters:
  transitions - the transitions (paths) out of this state
Parameters:
  exceptionHandlers - the exception handlers to handle exceptionsthrown by the state
Parameters:
  exitActions - the exit actions to execute when the state exits
Parameters:
  attributes - attributes to assign to the state that may be used toaffect state construction and execution the fully constructed subflow state instance



addViewState
protected State addViewState(String stateId, String viewName, Transition transition)(Code)
Adds a view state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  viewName - the string-encoded view selector
Parameters:
  transition - the sole transition (path) out of this state the fully constructed view state instance



addViewState
protected State addViewState(String stateId, String viewName, Transition[] transitions)(Code)
Adds a view state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  viewName - the string-encoded view selector
Parameters:
  transitions - the transitions (paths) out of this state the fully constructed view state instance



addViewState
protected State addViewState(String stateId, String viewName, Action renderAction, Transition transition)(Code)
Adds a view state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  viewName - the string-encoded view selector
Parameters:
  renderAction - the action to execute on state entry and refresh; maybe null
Parameters:
  transition - the sole transition (path) out of this state the fully constructed view state instance



addViewState
protected State addViewState(String stateId, String viewName, Action renderAction, Transition[] transitions)(Code)
Adds a view state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  viewName - the string-encoded view selector
Parameters:
  renderAction - the action to execute on state entry and refresh; maybe null
Parameters:
  transitions - the transitions (paths) out of this state the fully constructed view state instance



addViewState
protected State addViewState(String stateId, Action[] entryActions, ViewSelector viewSelector, Action[] renderActions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes)(Code)
Adds a view state to the flow built by this builder.
Parameters:
  stateId - the state identifier
Parameters:
  entryActions - the actions to execute when the state is entered
Parameters:
  viewSelector - the view selector that will make the view selectionwhen the state is entered
Parameters:
  renderActions - any 'render actions' to execute on state entry andrefresh; may be null
Parameters:
  transitions - the transitions (path) out of this state
Parameters:
  exceptionHandlers - any exception handlers to attach to the state
Parameters:
  exitActions - the actions to execute when the state exits
Parameters:
  attributes - attributes to assign to the state that may be used toaffect state construction and execution the fully constructed view state instance



annotate
protected AnnotatedAction annotate(Action action)(Code)
Wrap given action in an AnnotatedAction } to be able to annotate it with attributes.
Parameters:
  action - the action to annotate the wrapped action
since:
   1.0.4



attributeMapper
protected FlowAttributeMapper attributeMapper(String id) throws FlowArtifactLookupException(Code)
Request that the attribute mapper with the specified name be used to map attributes between a parent flow and a spawning subflow when the subflow state being constructed is entered.
Parameters:
  id - the id of the attribute mapper that will map attributes betweenthe flow built by this builder and the subflow the attribute mapper
throws:
  FlowArtifactLookupException - no FlowAttributeMapper implementationwas exported with the specified id



back
protected String back()(Code)
Creates the back event id. "Back" indicates the user wants to go to the previous step in the flow. the event id



cancel
protected String cancel()(Code)
Creates the cancel event id. "Cancel" indicates the flow was aborted because the user changed their mind. the event id



delete
protected String delete()(Code)
Creates the delete event id. "Delete" indicates a object is being removed. the event id



edit
protected String edit()(Code)
Creates the edit event id. "Edit" indicates an object was selected for creation or updating. the event id



error
protected String error()(Code)
Creates the error event id. "Error" indicates that an action completed with an error status. the event id



expression
protected Expression expression(String expressionString)(Code)
Parses the expression string into an evaluatable Expression object.
Parameters:
  expressionString - the expression string, e.g. flowScope.order.number the evaluatable expression



finish
protected String finish()(Code)
Creates the finish event id. "Finish" indicates the flow has finished processing. the event id



flow
protected Flow flow(String id) throws FlowArtifactLookupException(Code)
Request that the Flow with the specified flowId be spawned as a subflow when the subflow state being built is entered. Simply resolves the subflow definition by id and returns it; throwing a fail-fast exception if it does not exist.
Parameters:
  id - the flow definition id the flow to be used as a subflow, this should be passed to aaddSubflowState call
throws:
  FlowArtifactLookupException - when the flow cannot be resolved



flowAttributes
protected AttributeMap flowAttributes()(Code)
Hook subclasses may override to provide additional properties for the flow built by this builder. Returns a empty collection by default. additional properties describing the flow being built, should notreturn null



getEventFactorySupport
public EventFactorySupport getEventFactorySupport()(Code)
Returns the configured event factory support helper for creating commonly used event identifiers that drive transitions created by this builder.



ifReturnedSuccess
protected TransitionCriteria ifReturnedSuccess(Action action)(Code)
Creates a TransitionCriteria that will execute the specified action when the Transition is executed but before the transition's target state is entered.

This criteria will only allow the Transition to complete execution if the Action completes successfully.
Parameters:
  action - the action to execute after a transition is matched butbefore it transitions to its target state the transition execution criteria




init
public void init(String flowId, AttributeMap attributes) throws FlowBuilderException(Code)



initBuilder
protected void initBuilder()(Code)
Hook method subclasses can override to initialize the flow builder. Will be called by AbstractFlowBuilder.init(String,AttributeMap) after creating the initial Flow object. As a consequence, AbstractFlowBuilder.getFlow() can be called to retrieve the Flow object under construction.



invoke
protected AnnotatedAction invoke(String methodName, Action multiAction)(Code)
Creates an annotated action decorator that instructs the specified method be invoked on the multi action when it is executed. Use this when working with MultiActions to specify the method on the MultiAction to invoke for a particular usage scenario. Use the AbstractFlowBuilder.method(String) factory method when working with AbstractBeanInvokingAction bean invoking actions .
Parameters:
  methodName - the name of the method on the multi action instance
Parameters:
  multiAction - the multi action the annotated action that when invoked sets up a context propertyused by the multi action to instruct it with what method to invoke
since:
   1.0.4



invoke
protected AnnotatedAction invoke(String methodName, MultiAction multiAction) throws FlowArtifactLookupException(Code)
Creates an annotated action decorator that instructs the specified method be invoked on the multi action when it is executed. Use this when working with MultiActions to specify the method on the MultiAction to invoke for a particular usage scenario. Use the AbstractFlowBuilder.method(String) factory method when working with AbstractBeanInvokingAction bean invoking actions .
Parameters:
  methodName - the name of the method on the multi action instance
Parameters:
  multiAction - the multi action the annotated action that when invoked sets up a context propertyused by the multi action to instruct it with what method to invoke



mapping
protected MappingBuilder mapping()(Code)
Factory method that returns a new, fully configured mapping builder to assist with building Mapping objects used by a FlowAttributeMapper to map attributes. the mapping builder



method
protected MethodSignature method(String method)(Code)
Convert the encoded method signature string to a MethodSignature object. Method signatures are used to match methods on POJO services to invoke on a AbstractBeanInvokingAction bean invoking action .

Encoded method signature format: Method without arguments:

 ${methodName}
 
Method with arguments:
 ${methodName}(${arg1}, ${arg2}, ${arg n})
 

Parameters:
  method - the encoded method signature the method signature
See Also:   AbstractFlowBuilder.action(String,MethodSignature,ActionResultExposer)



name
protected AnnotatedAction name(String name, Action action)(Code)
Creates an annotated action decorator that makes the given action an named action.
Parameters:
  name - the action name
Parameters:
  action - the action to name the annotated named action



no
protected String no()(Code)
Creates the no event id. "False" indicates a false result was returned. the event id



on
protected TransitionCriteria on(String transitionCriteriaExpression)(Code)
Creates a transition criteria that is used to match a Transition. The criteria is based on the provided expression string.
Parameters:
  transitionCriteriaExpression - the transition criteria expression,typically simply a static event identifier (e.g. "submit") the transition criteria
See Also:   TextToTransitionCriteria



result
protected ActionResultExposer result(String resultName)(Code)
Factory method for a ActionResultExposer result exposer . A result exposer is used to expose an action result such as a method return value or expression evaluation result to the calling flow.
Parameters:
  resultName - the result name the result exposer
See Also:   AbstractFlowBuilder.action(String,MethodSignature,ActionResultExposer)



result
protected ActionResultExposer result(String resultName, ScopeType resultScope)(Code)
Factory method for a ActionResultExposer result exposer . A result exposer is used to expose an action result such as a method return value or expression evaluation result to the calling flow.
Parameters:
  resultName - the result name
Parameters:
  resultScope - the scope of the result the result exposer
See Also:   AbstractFlowBuilder.action(String,MethodSignature,ActionResultExposer)



select
protected String select()(Code)
Creates the select event id. "Select" indicates an object was selected for processing or display. the event id



setEventFactorySupport
public void setEventFactorySupport(EventFactorySupport eventFactorySupport)(Code)
Sets the event factory support helper to use to create commonly used event identifiers that drive transitions created by this builder.



settableExpression
protected SettableExpression settableExpression(String expressionString)(Code)
Parses the expression string into a settable Expression object.
Parameters:
  expressionString - the expression string, e.g. flowScope.order.number the evaluatable expression
since:
   1.0.2



submit
protected String submit()(Code)
Creates the submit event id. "Submit" indicates the user submitted a request (form) for processing. the event id



success
protected String success()(Code)
Creates the success event id. "Success" indicates that an action completed successfuly. the event id



to
protected TargetStateResolver to(String targetStateIdExpression)(Code)
Creates a target state resolver for the given state id expression.
Parameters:
  targetStateIdExpression - the target state id expression the target state resolver
See Also:   TextToTargetStateResolver



toString
public String toString()(Code)



transition
protected Transition transition(TransitionCriteria matchingCriteria, TargetStateResolver targetStateResolver)(Code)
Creates a new transition.
Parameters:
  matchingCriteria - the criteria that determines when the transitionmatches
Parameters:
  targetStateResolver - the resolver of the transition's target state the transition



transition
protected Transition transition(TransitionCriteria matchingCriteria, TargetStateResolver targetStateResolver, TransitionCriteria executionCriteria)(Code)
Creates a new transition.
Parameters:
  matchingCriteria - the criteria that determines when the transitionmatches
Parameters:
  targetStateResolver - the resolver of the transition's target state
Parameters:
  executionCriteria - the criteria that determines if a matchedtransition is allowed to execute the transition



transition
protected Transition transition(TransitionCriteria matchingCriteria, TargetStateResolver targetStateResolver, TransitionCriteria executionCriteria, AttributeMap attributes)(Code)
Creates a new transition.
Parameters:
  matchingCriteria - the criteria that determines when the transitionmatches
Parameters:
  targetStateResolver - the resolver of the transition's target state
Parameters:
  executionCriteria - the criteria that determines if a matchedtransition is allowed to execute
Parameters:
  attributes - transition attributes the transition



viewSelector
public ViewSelector viewSelector(String viewName)(Code)
Factory method that creates a view selector from an encoded view name. See TextToViewSelector for information on the conversion rules.
Parameters:
  viewName - the encoded view selector the view selector



yes
protected String yes()(Code)
Creates the yes event id. "Yes" indicates a true result was returned. the event id



Methods inherited from org.springframework.webflow.engine.builder.BaseFlowBuilder
public void buildEndActions() throws FlowBuilderException(Code)(Java Doc)
public void buildExceptionHandlers() throws FlowBuilderException(Code)(Java Doc)
public void buildGlobalTransitions() throws FlowBuilderException(Code)(Java Doc)
public void buildInlineFlows() throws FlowBuilderException(Code)(Java Doc)
public void buildInputMapper() throws FlowBuilderException(Code)(Java Doc)
public void buildOutputMapper() throws FlowBuilderException(Code)(Java Doc)
public void buildStartActions() throws FlowBuilderException(Code)(Java Doc)
abstract public void buildStates() throws FlowBuilderException(Code)(Java Doc)
public void buildVariables() throws FlowBuilderException(Code)(Java Doc)
public void dispose()(Code)(Java Doc)
protected ConversionExecutor fromStringTo(String targetAlias)(Code)(Java Doc)
protected ConversionExecutor fromStringTo(Class targetType) throws ConversionException(Code)(Java Doc)
public Flow getFlow()(Code)(Java Doc)
public FlowServiceLocator getFlowServiceLocator()(Code)(Java Doc)
abstract public void init(String flowId, AttributeMap attributes) throws FlowBuilderException(Code)(Java Doc)
protected void setFlow(Flow flow)(Code)(Java Doc)
public void setFlowServiceLocator(FlowServiceLocator flowServiceLocator)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.