public class FlowDefinitionRegistryBuilder
extends java.lang.Object
FlowDefinitionRegistry
instances designed for programmatic
use in @Bean
factory methods. For XML configuration consider using the
webflow-config
XML namespace.Constructor and Description |
---|
FlowDefinitionRegistryBuilder(org.springframework.context.ApplicationContext appContext)
Create a new instance with the given ApplicationContext.
|
FlowDefinitionRegistryBuilder(org.springframework.context.ApplicationContext appContext,
FlowBuilderServices builderServices)
Create a new instance with the given ApplicationContext and
FlowBuilderServices . |
Modifier and Type | Method and Description |
---|---|
FlowDefinitionRegistryBuilder |
addFlowBuilder(FlowBuilder builder)
Register a custom
FlowBuilder instance. |
FlowDefinitionRegistryBuilder |
addFlowBuilder(FlowBuilder builder,
java.lang.String id)
Register a custom
FlowBuilder instance with the given flow id. |
FlowDefinitionRegistryBuilder |
addFlowBuilder(FlowBuilder builder,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Register a custom
FlowBuilder instance with the given flow id. |
FlowDefinitionRegistryBuilder |
addFlowLocation(java.lang.String path)
Register a flow defined at the following location as an .xml file.
|
FlowDefinitionRegistryBuilder |
addFlowLocation(java.lang.String path,
java.lang.String id)
Register a flow defined at the following location as an .xml file.
|
FlowDefinitionRegistryBuilder |
addFlowLocation(java.lang.String path,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Register a flow defined at the following location as an .xml file.
|
FlowDefinitionRegistryBuilder |
addFlowLocationPattern(java.lang.String pattern)
Registers a set of flows resolved from a resource location pattern.
|
FlowDefinitionRegistry |
build()
Create and return a
FlowDefinitionRegistry instance. |
FlowDefinitionRegistryBuilder |
setBasePath(java.lang.String basePath)
Configure the base path where flow definitions are found.
|
FlowDefinitionRegistryBuilder |
setFlowBuilderServices(FlowBuilderServices flowBuilderServices)
Set the
FlowBuilderServices to use for defining custom services needed
to build the flows registered in this registry. |
FlowDefinitionRegistryBuilder |
setParent(FlowDefinitionRegistry parent)
Configure a parent registry.
|
public FlowDefinitionRegistryBuilder(org.springframework.context.ApplicationContext appContext)
appContext
- the ApplicationContext to use for initializing the
FlowDefinitionResourceFactory and FlowBuilderServices instances withpublic FlowDefinitionRegistryBuilder(org.springframework.context.ApplicationContext appContext, FlowBuilderServices builderServices)
FlowBuilderServices
.appContext
- the ApplicationContext to use for initializing the
FlowDefinitionResourceFactory and FlowBuilderServices instances withbuilderServices
- a FlowBuilderServices
instance to configure
on the FlowDefinitionRegistrypublic FlowDefinitionRegistryBuilder setBasePath(java.lang.String basePath)
For example, if a flow definition is located at '/WEB-INF/hotels/booking/booking-flow.xml' and the base path is '/WEB-INF', the remaining path to this flow is 'hotels/booking' which then becomes the flow id.
If a flow definition is found directly on the base path, the file name minus its extension is used as the flow id.
basePath
- the base path to usepublic FlowDefinitionRegistryBuilder addFlowLocation(java.lang.String path)
path
- the resource path to the externalized flow definition resource.public FlowDefinitionRegistryBuilder addFlowLocation(java.lang.String path, java.lang.String id)
path
- the resource path to the externalized flow definition resource.id
- the unique id to assign to the added flow definition in the registry
Specify only if you wish to provide a custom flow definition identifier.public FlowDefinitionRegistryBuilder addFlowLocation(java.lang.String path, java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> attributes)
path
- the resource path to the externalized flow definition resource.id
- the unique id to assign to the added flow definition in the registry
Specify only if you wish to provide a custom flow definition identifier.attributes
- meta-attributes to assign to the flow definitionpublic FlowDefinitionRegistryBuilder addFlowLocationPattern(java.lang.String pattern)
pattern
- the pattern to usepublic FlowDefinitionRegistryBuilder setFlowBuilderServices(FlowBuilderServices flowBuilderServices)
FlowBuilderServices
to use for defining custom services needed
to build the flows registered in this registry.flowBuilderServices
- the FlowBuilderServices
instancepublic FlowDefinitionRegistryBuilder addFlowBuilder(FlowBuilder builder)
FlowBuilder
instance.builder
- the FlowBuilder to configurepublic FlowDefinitionRegistryBuilder addFlowBuilder(FlowBuilder builder, java.lang.String id)
FlowBuilder
instance with the given flow id.builder
- the FlowBuilder to configureid
- the id assign to the flow definition in this registry.
Specify when you wish to provide a custom flow definition identifier.public FlowDefinitionRegistryBuilder addFlowBuilder(FlowBuilder builder, java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> attributes)
FlowBuilder
instance with the given flow id.builder
- the FlowBuilder to configureid
- the id assign to the flow definition in this registry.
Specify when you wish to provide a custom flow definition identifier.attributes
- attributes to assign to the flow definition.public FlowDefinitionRegistryBuilder setParent(FlowDefinitionRegistry parent)
parent
- the parent registrypublic FlowDefinitionRegistry build()
FlowDefinitionRegistry
instance.