org.springframework.webflow.engine.builder
Interface FlowServiceLocator

All Known Implementing Classes:
BaseFlowServiceLocator, DefaultFlowServiceLocator, MockFlowServiceLocator

public interface FlowServiceLocator

A support interface used by flow builders at configuration time. Acts as a "service locator" responsible for:

  1. Retrieving dependent (but externally managed) flow services needed to configure flow and state definitions. Such services are usually hosted in a backing registry and may be shared by multiple flows.
  2. Providing access to abstract factories to create core flow definitional artifacts such as Flow, State, Transition, and bean invoking actions. These artifacts are unique to each flow and are typically not shared.

In general, implementations of this interface act as facades to accessing and creating flow artifacts during flow assembly.

Finally, this interface also exposes access to generic infrastructure services also needed by flow assemblers such as a ConversionService and ExpressionParser.

Author:
Keith Donald, Erwin Vervaet
See Also:
FlowBuilder, BaseFlowBuilder, FlowAssembler

Method Summary
 Action getAction(java.lang.String id)
          Retrieve an action to be executed within a flow with the assigned id.
 FlowAttributeMapper getAttributeMapper(java.lang.String id)
          Returns the flow attribute mapper with the provided id.
 org.springframework.beans.factory.BeanFactory getBeanFactory()
          Returns a generic bean (service) registry for accessing arbitrary beans.
 BeanInvokingActionFactory getBeanInvokingActionFactory()
          Returns the factory for bean invoking actions.
 org.springframework.binding.convert.ConversionService getConversionService()
          Returns a generic type conversion service for converting between types, typically from string to a rich value object.
 FlowExecutionExceptionHandler getExceptionHandler(java.lang.String id)
          Returns the exception handler to handle flow execution exceptions with the provided id.
 org.springframework.binding.expression.ExpressionParser getExpressionParser()
          Returns the expression parser for parsing expression strings.
 FlowArtifactFactory getFlowArtifactFactory()
          Returns the factory for core flow artifacts such as Flow and State.
 org.springframework.core.io.ResourceLoader getResourceLoader()
          Returns a generic resource loader for accessing file-based resources.
 Flow getSubflow(java.lang.String id)
          Returns the Flow to be used as a subflow with the provided id.
 TargetStateResolver getTargetStateResolver(java.lang.String id)
          Returns the transition target state resolver with the specified id.
 TransitionCriteria getTransitionCriteria(java.lang.String id)
          Returns the transition criteria to drive state transitions with the provided id.
 ViewSelector getViewSelector(java.lang.String id)
          Returns the view selector to make view selections in view states with the provided id.
 

Method Detail

getSubflow

Flow getSubflow(java.lang.String id)
                throws FlowArtifactLookupException
Returns the Flow to be used as a subflow with the provided id.

Parameters:
id - the flow id
Returns:
the flow to be used as a subflow
Throws:
FlowArtifactLookupException - when no such flow is found

getAction

Action getAction(java.lang.String id)
                 throws FlowArtifactLookupException
Retrieve an action to be executed within a flow with the assigned id.

Parameters:
id - the id of the action
Throws:
FlowArtifactLookupException - when no such action is found

getAttributeMapper

FlowAttributeMapper getAttributeMapper(java.lang.String id)
                                       throws FlowArtifactLookupException
Returns the flow attribute mapper with the provided id. Flow attribute mappers are used from subflow states to map input and output attributes.

Parameters:
id - the attribute mapper id
Returns:
the attribute mapper
Throws:
FlowArtifactLookupException - when no such mapper is found

getTransitionCriteria

TransitionCriteria getTransitionCriteria(java.lang.String id)
                                         throws FlowArtifactLookupException
Returns the transition criteria to drive state transitions with the provided id.

Parameters:
id - the transition criteria id
Returns:
the transition criteria
Throws:
FlowArtifactLookupException - when no such criteria is found

getTargetStateResolver

TargetStateResolver getTargetStateResolver(java.lang.String id)
                                           throws FlowArtifactLookupException
Returns the transition target state resolver with the specified id.

Parameters:
id - the target state resolver id
Returns:
the target state resolver
Throws:
FlowArtifactLookupException - when no such resolver is found

getViewSelector

ViewSelector getViewSelector(java.lang.String id)
                             throws FlowArtifactLookupException
Returns the view selector to make view selections in view states with the provided id.

Parameters:
id - the view selector id
Returns:
the view selector
Throws:
FlowArtifactLookupException - when no such selector is found

getExceptionHandler

FlowExecutionExceptionHandler getExceptionHandler(java.lang.String id)
                                                  throws FlowArtifactLookupException
Returns the exception handler to handle flow execution exceptions with the provided id.

Parameters:
id - the exception handler id
Returns:
the exception handler
Throws:
FlowArtifactLookupException - when no such handler is found

getFlowArtifactFactory

FlowArtifactFactory getFlowArtifactFactory()
Returns the factory for core flow artifacts such as Flow and State.

Returns:
the flow artifact factory

getBeanInvokingActionFactory

BeanInvokingActionFactory getBeanInvokingActionFactory()
Returns the factory for bean invoking actions.

Returns:
the bean invoking action factory

getBeanFactory

org.springframework.beans.factory.BeanFactory getBeanFactory()
                                                             throws java.lang.UnsupportedOperationException
Returns a generic bean (service) registry for accessing arbitrary beans.

Returns:
the generic service registry
Throws:
java.lang.UnsupportedOperationException - when not supported by this locator

getResourceLoader

org.springframework.core.io.ResourceLoader getResourceLoader()
Returns a generic resource loader for accessing file-based resources.

Returns:
the generic resource loader

getExpressionParser

org.springframework.binding.expression.ExpressionParser getExpressionParser()
Returns the expression parser for parsing expression strings.

Returns:
the expression parser

getConversionService

org.springframework.binding.convert.ConversionService getConversionService()
Returns a generic type conversion service for converting between types, typically from string to a rich value object.

Returns:
the generic conversion service


Copyright © 2004-2007. All Rights Reserved.