Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.grails.webflow.engine.builder
[Groovy] Class FlowBuilder

    java.lang.Object
      org.springframework.webflow.engine.builder.support.AbstractFlowBuilder
          org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder

All Implemented Interfaces:
  groovy.lang.GroovyObject, org.springframework.context.ApplicationContextAware

    class FlowBuilder
    extends org.springframework.webflow.engine.builder.support.AbstractFlowBuilder

A builder implementation used to construct Spring Webflows. This is a DSL specifically designed to allow the construction of complex flows and is integrated into Grails' controller mechanism

An example flow can be seen below:

               displaySearchForm {
                   on("submit").to "executeSearch"
               }
               executeSearch {
                   action {
                       [results:searchService.executeSearch(params.q)]
                   }
                   on("success").to "displayResults"
                   on(Exception).to "displaySearchForm"
               }
               displayResults()

Authors:
  Graeme Rocher
  Ivo Houbrechts

Since:
  0.6

Field Summary
`protected org.springframework.webflow.definition.registry.FlowDefinitionLocator` | `definitionLocator`
`protected org.springframework.webflow.engine.builder.support.FlowBuilderServices` | `flowBuilderServices`

Property Summary
`static java.lang.Object` | `CLOSURE_METHODS`
`static java.lang.Object` | `DO_CALL_METHOD`
`static java.lang.Object` | `FLOW_INFO_METHODS`
`static java.lang.Object` | `FLOW_METHOD`
`static java.lang.Object` | `LOG`
`org.springframework.context.ApplicationContext` | `applicationContext`
`java.lang.String` | `flowId`
`java.lang.String` | `viewPath`

Constructor Summary
`FlowBuilder(java.lang.String flowId, org.springframework.webflow.engine.builder.support.FlowBuilderServices flowBuilderServices, org.springframework.webflow.definition.registry.FlowDefinitionLocator definitionLocator)`
`FlowBuilder(java.lang.String flowId, groovy.lang.Closure newFlowClosure, org.springframework.webflow.engine.builder.support.FlowBuilderServices flowBuilderServices, org.springframework.webflow.definition.registry.FlowDefinitionLocator definitionLocator)`

Method Summary
`void` | `buildStates()`
`protected org.springframework.webflow.engine.State` | `createEndState(java.lang.String stateId, java.lang.String viewId, org.springframework.webflow.engine.builder.FlowArtifactFactory flowFactory, org.springframework.binding.mapping.Mapper outputMapper = null, groovy.lang.Closure customEntryAction = null)`
`protected org.springframework.webflow.execution.ViewFactory` | `createViewFactory(java.lang.String viewId)`
`org.springframework.webflow.engine.Flow` | `flow(groovy.lang.Closure flow)`
`org.springframework.webflow.engine.builder.FlowBuilderContext` | `getFlowBuilderContext()`
`groovy.lang.MetaClass` | `getMetaClass()`
`java.lang.Object` | `getProperty(java.lang.String property)`
`java.lang.Object` | `invokeMethod(java.lang.String name, java.lang.Object args)`
`void` | `setMetaClass(groovy.lang.MetaClass metaClass)`
`void` | `setProperty(java.lang.String property, java.lang.Object newValue)`

Methods inherited from class org.springframework.webflow.engine.builder.support.AbstractFlowBuilder
org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#init(org.springframework.webflow.engine.builder.FlowBuilderContext), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#dispose(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#getFlow(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#buildVariables(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#buildInputMapper(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#buildStartActions(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#buildStates(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#buildGlobalTransitions(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#buildEndActions(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#buildOutputMapper(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#buildExceptionHandlers(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#hasFlowChanged(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#getFlowResourceString(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#wait(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#wait(long), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#wait(long, int), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#equals(java.lang.Object), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#toString(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#hashCode(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#getClass(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#notify(), org.springframework.webflow.engine.builder.support.AbstractFlowBuilder#notifyAll()

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### definitionLocator

    protected org.springframework.webflow.definition.registry.FlowDefinitionLocator definitionLocator

### flowBuilderServices

    protected org.springframework.webflow.engine.builder.support.FlowBuilderServices flowBuilderServices

Property Detail

### CLOSURE_METHODS

    static final java.lang.Object CLOSURE_METHODS

### DO_CALL_METHOD

    static final java.lang.Object DO_CALL_METHOD

### FLOW_INFO_METHODS

    static final java.lang.Object FLOW_INFO_METHODS

### FLOW_METHOD

    static final java.lang.Object FLOW_METHOD

### LOG

    static final java.lang.Object LOG

### applicationContext

    org.springframework.context.ApplicationContext applicationContext

### flowId

    final java.lang.String flowId

### viewPath

    java.lang.String viewPath

Constructor Detail

### FlowBuilder

    FlowBuilder(java.lang.String flowId, org.springframework.webflow.engine.builder.support.FlowBuilderServices flowBuilderServices, org.springframework.webflow.definition.registry.FlowDefinitionLocator definitionLocator)

### FlowBuilder

    FlowBuilder(java.lang.String flowId, groovy.lang.Closure newFlowClosure, org.springframework.webflow.engine.builder.support.FlowBuilderServices flowBuilderServices, org.springframework.webflow.definition.registry.FlowDefinitionLocator definitionLocator)

Method Detail

### buildStates

    void buildStates()

### createEndState

    protected org.springframework.webflow.engine.State createEndState(java.lang.String stateId, java.lang.String viewId, org.springframework.webflow.engine.builder.FlowArtifactFactory flowFactory, org.springframework.binding.mapping.Mapper outputMapper = null, groovy.lang.Closure customEntryAction = null)

### createViewFactory

    protected org.springframework.webflow.execution.ViewFactory createViewFactory(java.lang.String viewId)

### flow

    org.springframework.webflow.engine.Flow flow(groovy.lang.Closure flow)

### getFlowBuilderContext

    org.springframework.webflow.engine.builder.FlowBuilderContext getFlowBuilderContext()

### getMetaClass

    groovy.lang.MetaClass getMetaClass()

### getProperty

    java.lang.Object getProperty(java.lang.String property)

### invokeMethod

    java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)

### setMetaClass

    void setMetaClass(groovy.lang.MetaClass metaClass)

### setProperty

    void setProperty(java.lang.String property, java.lang.Object newValue)

Groovy Documentation