Spring Web Flow

org.springframework.webflow.definition.registry
Class FlowDefinitionRegistryImpl

java.lang.Object
  extended by org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl
All Implemented Interfaces:
FlowDefinitionLocator, FlowDefinitionRegistry

public class FlowDefinitionRegistryImpl
extends java.lang.Object
implements FlowDefinitionRegistry

A generic registry implementation for housing one or more flow definitions.

Author:
Keith Donald, Scott Andrews

Constructor Summary
FlowDefinitionRegistryImpl()
           
 
Method Summary
 boolean containsFlowDefinition(java.lang.String flowId)
          Does this registry contain a flow with the given id? More specifically, is FlowDefinitionLocator.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()
           
 FlowDefinition getFlowDefinition(java.lang.String id)
          Lookup the flow definition with the specified id.
 int getFlowDefinitionCount()
          Returns the number of flow definitions registered in this registry.
 java.lang.String[] getFlowDefinitionIds()
          Returns the ids of the flows registered in this registry.
 FlowDefinitionRegistry getParent()
          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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlowDefinitionRegistryImpl

public FlowDefinitionRegistryImpl()
Method Detail

getFlowDefinition

public FlowDefinition getFlowDefinition(java.lang.String id)
                                 throws NoSuchFlowDefinitionException,
                                        FlowDefinitionConstructionException
Description copied from interface: FlowDefinitionLocator
Lookup the flow definition with the specified id.

Specified by:
getFlowDefinition in interface FlowDefinitionLocator
Parameters:
id - the flow definition identifier
Returns:
the flow definition
Throws:
NoSuchFlowDefinitionException - when the flow definition with the specified id does not exist
FlowDefinitionConstructionException - if there is a problem constructing the identified flow definition

containsFlowDefinition

public boolean containsFlowDefinition(java.lang.String flowId)
Description copied from interface: FlowDefinitionRegistry
Does this registry contain a flow with the given id? More specifically, is FlowDefinitionLocator.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 interface FlowDefinitionRegistry
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 interface FlowDefinitionRegistry
Returns:
the flow definition count

getFlowDefinitionIds

public java.lang.String[] getFlowDefinitionIds()
Description copied from interface: FlowDefinitionRegistry
Returns the ids of the flows registered in this registry.

Specified by:
getFlowDefinitionIds in interface FlowDefinitionRegistry
Returns:
the flow definition ids

getParent

public FlowDefinitionRegistry getParent()
Description copied from interface: FlowDefinitionRegistry
Returns this registry's parent registry.

Specified by:
getParent in interface FlowDefinitionRegistry
Returns:
the parent flow definition registry, or null if no parent is set

setParent

public void setParent(FlowDefinitionRegistry parent)
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 interface FlowDefinitionRegistry
Parameters:
parent - the parent flow definition registry, may be null

registerFlowDefinition

public void registerFlowDefinition(FlowDefinitionHolder definitionHolder)
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 interface FlowDefinitionRegistry
Parameters:
definitionHolder - a holder holding the flow definition to register

registerFlowDefinition

public void registerFlowDefinition(FlowDefinition definition)
Description copied from interface: FlowDefinitionRegistry
Register a flow definition in this registry.

Specified by:
registerFlowDefinition in interface FlowDefinitionRegistry
Parameters:
definition - the actual flow definition

destroy

public void destroy()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Web Flow