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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsFlowDefinition(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.voiddestroy()Lookup the flow definition with the specified id.intReturns 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.voidregisterFlowDefinition(FlowDefinition definition) Register a flow definition in this registry.voidregisterFlowDefinition(FlowDefinitionHolder definitionHolder) Register a flow definition in this registry.voidsetParent(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:FlowDefinitionLocatorLookup the flow definition with the specified id.- Specified by:
getFlowDefinitionin 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:FlowDefinitionRegistryDoes 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:
containsFlowDefinitionin 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:FlowDefinitionRegistryReturns the number of flow definitions registered in this registry.- Specified by:
getFlowDefinitionCountin interfaceFlowDefinitionRegistry- Returns:
- the flow definition count
-
getFlowDefinitionIds
Description copied from interface:FlowDefinitionRegistryReturns the ids of the flows registered in this registry.- Specified by:
getFlowDefinitionIdsin interfaceFlowDefinitionRegistry- Returns:
- the flow definition ids
-
getParent
Description copied from interface:FlowDefinitionRegistryReturns this registry's parent registry.- Specified by:
getParentin interfaceFlowDefinitionRegistry- Returns:
- the parent flow definition registry, or null if no parent is set
-
setParent
Description copied from interface:FlowDefinitionRegistrySets 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:
setParentin interfaceFlowDefinitionRegistry- Parameters:
parent- the parent flow definition registry, may be null
-
registerFlowDefinition
Description copied from interface:FlowDefinitionRegistryRegister 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:
registerFlowDefinitionin interfaceFlowDefinitionRegistry- Parameters:
definitionHolder- a holder holding the flow definition to register
-
registerFlowDefinition
Description copied from interface:FlowDefinitionRegistryRegister a flow definition in this registry.- Specified by:
registerFlowDefinitionin interfaceFlowDefinitionRegistry- Parameters:
definition- the actual flow definition
-
destroy
public void destroy() -
toString
-