org.springframework.webflow.action
Class BeanInvokingActionFactory

java.lang.Object
  extended by org.springframework.webflow.action.BeanInvokingActionFactory

public class BeanInvokingActionFactory
extends java.lang.Object

A helper factory for Action instances that invoke methods on beans managed in a Spring bean factory.

This factory encapsulates the logic required to take an arbitrary java.lang.Object from a Spring bean factory and adapt a method on it to the Action interface. If the bean you want to use is not managed in a Spring bean factory, consider subclassing AbstractBeanInvokingAction and using it directly.

Author:
Keith Donald
See Also:
AbstractBeanInvokingAction

Constructor Summary
BeanInvokingActionFactory()
           
 
Method Summary
 Action createBeanInvokingAction(java.lang.String beanId, org.springframework.beans.factory.BeanFactory beanFactory, org.springframework.binding.method.MethodSignature methodSignature, ActionResultExposer resultExposer, org.springframework.binding.convert.ConversionService conversionService, AttributeMap attributes)
          Factory method that creates a bean invoking action, an adapter that adapts a method on an abitrary Object to the Action interface.
 ResultEventFactorySelector getResultEventFactorySelector()
          Returns the strategy for calculating the result event factory to configure for each bean invoking action created by this factory.
 void setResultEventFactorySelector(ResultEventFactorySelector resultEventFactorySelector)
          Sets the strategy to calculate the result event factory to configure for each bean invoking action created by this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanInvokingActionFactory

public BeanInvokingActionFactory()
Method Detail

getResultEventFactorySelector

public ResultEventFactorySelector getResultEventFactorySelector()
Returns the strategy for calculating the result event factory to configure for each bean invoking action created by this factory.


setResultEventFactorySelector

public void setResultEventFactorySelector(ResultEventFactorySelector resultEventFactorySelector)
Sets the strategy to calculate the result event factory to configure for each bean invoking action created by this factory.


createBeanInvokingAction

public Action createBeanInvokingAction(java.lang.String beanId,
                                       org.springframework.beans.factory.BeanFactory beanFactory,
                                       org.springframework.binding.method.MethodSignature methodSignature,
                                       ActionResultExposer resultExposer,
                                       org.springframework.binding.convert.ConversionService conversionService,
                                       AttributeMap attributes)
Factory method that creates a bean invoking action, an adapter that adapts a method on an abitrary Object to the Action interface. This method is an atomic operation that returns a fully initialized Action. It encapsulates the selection of the action implementation as well as the action assembly.

Parameters:
beanId - the id of the bean to be adapted to an Action instance
beanFactory - the bean factory where the bean is managed
methodSignature - the method to invoke on the bean when the action is executed (required)
resultExposer - the specification for what to do with the method return value (optional)
conversionService - the conversion service to be used to convert method parameters (optional)
attributes - attributes that may be used to affect the bean invoking action's construction
Returns:
the fully configured bean invoking action instance


Copyright © 2004-2007. All Rights Reserved.