Class FlowDefinitionRegistryImpl
java.lang.Object
org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl
- All Implemented Interfaces:
FlowDefinitionLocator
,FlowDefinitionRegistry
A generic registry implementation for housing one or more flow definitions.
- Author:
- Keith Donald, Scott Andrews
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsFlowDefinition
(String flowId) Does this registry contain a flow with the given id? More specifically, isFlowDefinitionLocator.getFlowDefinition(String)
able to obtain a flow definition instance for the given id? Will ask the parent registry if the flow cannot be found in this instance.void
destroy()
Lookup the flow definition with the specified id.int
Returns the number of flow definitions registered in this registry.String[]
Returns the ids of the flows registered in this registry.Returns this registry's parent registry.void
registerFlowDefinition
(FlowDefinition definition) Register a flow definition in this registry.void
registerFlowDefinition
(FlowDefinitionHolder definitionHolder) Register a flow definition in this registry.void
setParent
(FlowDefinitionRegistry parent) Sets this registry's parent registry.toString()
-
Constructor Details
-
FlowDefinitionRegistryImpl
public FlowDefinitionRegistryImpl()
-
-
Method Details
-
getFlowDefinition
public FlowDefinition getFlowDefinition(String id) throws NoSuchFlowDefinitionException, FlowDefinitionConstructionException Description copied from interface:FlowDefinitionLocator
Lookup the flow definition with the specified id.- Specified by:
getFlowDefinition
in interfaceFlowDefinitionLocator
- Parameters:
id
- the flow definition identifier- Returns:
- the flow definition
- Throws:
NoSuchFlowDefinitionException
- when the flow definition with the specified id does not existFlowDefinitionConstructionException
- if there is a problem constructing the identified flow definition
-
containsFlowDefinition
Description copied from interface:FlowDefinitionRegistry
Does this registry contain a flow with the given id? More specifically, isFlowDefinitionLocator.getFlowDefinition(String)
able to obtain a flow definition instance for the given id? Will ask the parent registry if the flow cannot be found in this instance.- Specified by:
containsFlowDefinition
in interfaceFlowDefinitionRegistry
- Parameters:
flowId
- the id of the flow to query- Returns:
- whether a flow definition with the given id is registered
-
getFlowDefinitionCount
public int getFlowDefinitionCount()Description copied from interface:FlowDefinitionRegistry
Returns the number of flow definitions registered in this registry.- Specified by:
getFlowDefinitionCount
in interfaceFlowDefinitionRegistry
- Returns:
- the flow definition count
-
getFlowDefinitionIds
Description copied from interface:FlowDefinitionRegistry
Returns the ids of the flows registered in this registry.- Specified by:
getFlowDefinitionIds
in interfaceFlowDefinitionRegistry
- Returns:
- the flow definition ids
-
getParent
Description copied from interface:FlowDefinitionRegistry
Returns this registry's parent registry.- Specified by:
getParent
in interfaceFlowDefinitionRegistry
- Returns:
- the parent flow definition registry, or null if no parent is set
-
setParent
Description copied from interface:FlowDefinitionRegistry
Sets this registry's parent registry. When asked by a client to locate a flow definition this registry will query it's parent if it cannot fulfill the lookup request itself.- Specified by:
setParent
in interfaceFlowDefinitionRegistry
- Parameters:
parent
- the parent flow definition registry, may be null
-
registerFlowDefinition
Description copied from interface:FlowDefinitionRegistry
Register a flow definition in this registry. Registers a "holder", not the Flow definition itself. This allows the actual Flow definition to be loaded lazily only when needed, and also rebuilt at runtime when its underlying resource changes without re-deploy.- Specified by:
registerFlowDefinition
in interfaceFlowDefinitionRegistry
- Parameters:
definitionHolder
- a holder holding the flow definition to register
-
registerFlowDefinition
Description copied from interface:FlowDefinitionRegistry
Register a flow definition in this registry.- Specified by:
registerFlowDefinition
in interfaceFlowDefinitionRegistry
- Parameters:
definition
- the actual flow definition
-
destroy
public void destroy() -
toString
-