org.codehaus.waffle.context.pico
Class PicoComponentRegistry
java.lang.Object
org.codehaus.waffle.context.pico.PicoComponentRegistry
- All Implemented Interfaces:
- ComponentRegistry
public class PicoComponentRegistry
- extends java.lang.Object
- implements ComponentRegistry
PicoContainer-based implementation of Waffle's ComponentRegistry
- Author:
- Michael Ward, Mauro Talevi
Constructor Summary |
PicoComponentRegistry(javax.servlet.ServletContext servletContext)
Register all waffle required components with the underlying container. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PicoComponentRegistry
public PicoComponentRegistry(javax.servlet.ServletContext servletContext)
- Register all waffle required components with the underlying container.
locateComponentClass
protected static java.lang.Class<?> locateComponentClass(java.lang.Object key,
java.lang.Class<?> defaultClass,
javax.servlet.ServletContext servletContext)
throws WaffleException
- This method will locate the component Class to use. Each of the components can be
overwritten by setting
context-param
in the applications web.xml
.
<context-param>
<param-name>org.codehaus.waffle.actions.ControllerDefinitionFactory</param-name>
<param-value>org.myurl.FooBarControllerFactory</param-value>
</context-param>
- Parameters:
key
- represents the component key which the implementation should be registered under.defaultClass
- represents the Class to use by default (when not over-written).servletContext
- required to obtain the InitParameter defined for the web application.
- Throws:
WaffleException
locateByKey
public <T> T locateByKey(java.lang.Object key)
- Convenience method for locating and automatically casting a Component from the container.
- Specified by:
locateByKey
in interface ComponentRegistry
locateByType
public <T> T locateByType(java.lang.Class<T> t)
- Specified by:
locateByType
in interface ComponentRegistry
getActionMethodExecutor
public ActionMethodExecutor getActionMethodExecutor()
- Specified by:
getActionMethodExecutor
in interface ComponentRegistry
getActionMethodResponseHandler
public ActionMethodResponseHandler getActionMethodResponseHandler()
- Specified by:
getActionMethodResponseHandler
in interface ComponentRegistry
getArgumentResolver
public ArgumentResolver getArgumentResolver()
- Specified by:
getArgumentResolver
in interface ComponentRegistry
getMethodDefinitionFinder
public MethodDefinitionFinder getMethodDefinitionFinder()
- Specified by:
getMethodDefinitionFinder
in interface ComponentRegistry
getMethodNameResolver
public MethodNameResolver getMethodNameResolver()
- Specified by:
getMethodNameResolver
in interface ComponentRegistry
getBindErrorMessageResolver
public BindErrorMessageResolver getBindErrorMessageResolver()
- Specified by:
getBindErrorMessageResolver
in interface ComponentRegistry
getDataBinder
public DataBinder getDataBinder()
- Specified by:
getDataBinder
in interface ComponentRegistry
getRequestAttributeBinder
public RequestAttributeBinder getRequestAttributeBinder()
- Specified by:
getRequestAttributeBinder
in interface ComponentRegistry
getStringTransmuter
public StringTransmuter getStringTransmuter()
- Specified by:
getStringTransmuter
in interface ComponentRegistry
getValueConverterFinder
public ValueConverterFinder getValueConverterFinder()
- Specified by:
getValueConverterFinder
in interface ComponentRegistry
getContextContainerFactory
public ContextContainerFactory getContextContainerFactory()
- Specified by:
getContextContainerFactory
in interface ComponentRegistry
getControllerNameResolver
public ControllerNameResolver getControllerNameResolver()
- Specified by:
getControllerNameResolver
in interface ComponentRegistry
getControllerDefinitionFactory
public ControllerDefinitionFactory getControllerDefinitionFactory()
- Specified by:
getControllerDefinitionFactory
in interface ComponentRegistry
getMessageResources
public MessageResources getMessageResources()
- Specified by:
getMessageResources
in interface ComponentRegistry
getActionMonitor
public ActionMonitor getActionMonitor()
- Specified by:
getActionMonitor
in interface ComponentRegistry
getBindMonitor
public BindMonitor getBindMonitor()
- Specified by:
getBindMonitor
in interface ComponentRegistry
getContextMonitor
public ContextMonitor getContextMonitor()
- Specified by:
getContextMonitor
in interface ComponentRegistry
getControllerMonitor
public ControllerMonitor getControllerMonitor()
- Specified by:
getControllerMonitor
in interface ComponentRegistry
getRegistrarMonitor
public RegistrarMonitor getRegistrarMonitor()
- Specified by:
getRegistrarMonitor
in interface ComponentRegistry
getServletMonitor
public ServletMonitor getServletMonitor()
- Specified by:
getServletMonitor
in interface ComponentRegistry
getValidator
public Validator getValidator()
- Specified by:
getValidator
in interface ComponentRegistry
getValidationMonitor
public ValidationMonitor getValidationMonitor()
- Specified by:
getValidationMonitor
in interface ComponentRegistry
getViewDispatcher
public ViewDispatcher getViewDispatcher()
- Specified by:
getViewDispatcher
in interface ComponentRegistry
getViewMonitor
public ViewMonitor getViewMonitor()
- Specified by:
getViewMonitor
in interface ComponentRegistry
getViewResolver
public ViewResolver getViewResolver()
- Specified by:
getViewResolver
in interface ComponentRegistry
Copyright © 2008. All Rights Reserved.