public class FlowDefinitionRegistryFactoryBean
extends org.springframework.beans.factory.config.AbstractFactoryBean<org.springframework.webflow.definition.registry.FlowDefinitionRegistry>
FlowDefinitionRegistry instances, based on the programmatic
builder built into SWF.
Overrides the resource factory implementation, which they neglected to support, and that's where all the fancy derivation of flow IDs lives.
| Modifier and Type | Class and Description |
|---|---|
private static class |
FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry
Copied from SWF, a basic registry implementation.
|
| Modifier and Type | Field and Description |
|---|---|
private String |
basePath
Base path for registry.
|
private org.springframework.webflow.engine.builder.support.FlowBuilderServices |
flowBuilderServices
Required collaborator.
|
private Map<String,String> |
flowLocationPatterns
Pattern-based flow mappings from pattern to base location to apply.
|
private Map<String,String> |
flowLocations
Explicit flow mappings from flow ID to resource path.
|
private FlowDefinitionResourceFactory |
flowResourceFactory
Overriden resource factory, the whole reason for this class.
|
private org.slf4j.Logger |
log
Class logger.
|
private org.springframework.webflow.definition.registry.FlowDefinitionRegistry |
parent
Optional parent reference.
|
| Constructor and Description |
|---|
FlowDefinitionRegistryFactoryBean()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.webflow.definition.registry.FlowDefinitionRegistry |
createInstance() |
protected void |
destroyInstance(org.springframework.webflow.definition.registry.FlowDefinitionRegistry instance) |
Class<?> |
getObjectType() |
private void |
registerFlow(org.springframework.webflow.config.FlowDefinitionResource resource,
FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)
Register a flow resource into the registry.
|
private void |
registerFlowLocationPatterns(FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)
Register flows derived from resource patterns.
|
private void |
registerFlowLocations(FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)
Register explicit flow mappings.
|
void |
setBasePath(String path)
Configure the base path where flow definitions are found.
|
void |
setFlowBuilderServices(org.springframework.webflow.engine.builder.support.FlowBuilderServices builderServices)
Set the
FlowBuilderServices to use for defining custom services needed
to build the flows registered in this registry. |
void |
setFlowLocationPatterns(Map<String,String> patternMap)
Registers a set of flows resolved from a resource location pattern as the mapping key,
with an optional value containing a portion to strip when computing the flow IDs, with
the default base location applied if empty/null.
|
void |
setFlowLocations(Map<String,String> locationMap)
Set explicit flow ID to resource mappings.
|
void |
setParent(org.springframework.webflow.definition.registry.FlowDefinitionRegistry parentRegistry)
Set a parent registry.
|
private void |
updateFlowAttributes(org.springframework.webflow.core.collection.LocalAttributeMap<Object> attributes)
Update flow attributes with development bit.
|
@Nonnull private final org.slf4j.Logger log
@Nonnull @NonnullElements private Map<String,String> flowLocations
@Nonnull @NonnullElements private Map<String,String> flowLocationPatterns
@Nullable private org.springframework.webflow.engine.builder.support.FlowBuilderServices flowBuilderServices
@Nullable private org.springframework.webflow.definition.registry.FlowDefinitionRegistry parent
@Nullable private FlowDefinitionResourceFactory flowResourceFactory
public FlowDefinitionRegistryFactoryBean()
public Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.springframework.webflow.definition.registry.FlowDefinitionRegistry>getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<org.springframework.webflow.definition.registry.FlowDefinitionRegistry>public void setBasePath(@Nullable String path)
path - the base path to usepublic void setFlowLocations(@Nonnull@NonnullElements Map<String,String> locationMap)
locationMap - mappings from flow ID to resourcepublic void setFlowLocationPatterns(@Nonnull Map<String,String> patternMap)
patternMap - the mappings to usepublic void setFlowBuilderServices(@Nonnull org.springframework.webflow.engine.builder.support.FlowBuilderServices builderServices)
FlowBuilderServices to use for defining custom services needed
to build the flows registered in this registry.builderServices - the FlowBuilderServices instancepublic void setParent(@Nullable org.springframework.webflow.definition.registry.FlowDefinitionRegistry parentRegistry)
parentRegistry - the parent registryprotected org.springframework.webflow.definition.registry.FlowDefinitionRegistry createInstance()
throws Exception
createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<org.springframework.webflow.definition.registry.FlowDefinitionRegistry>Exceptionprotected void destroyInstance(org.springframework.webflow.definition.registry.FlowDefinitionRegistry instance)
throws Exception
destroyInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<org.springframework.webflow.definition.registry.FlowDefinitionRegistry>Exceptionprivate void registerFlowLocations(@Nonnull FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)
flowRegistry - the flow registryprivate void registerFlowLocationPatterns(@Nonnull FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)
flowRegistry - the flow registryprivate void registerFlow(@Nonnull org.springframework.webflow.config.FlowDefinitionResource resource, @Nonnull FlowDefinitionRegistryFactoryBean.DefaultFlowRegistry flowRegistry)
resource - the flow resourceflowRegistry - the registryCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.