| java.lang.Object com.opensymphony.xwork.ObjectFactory
All known Subclasses: com.opensymphony.xwork.spring.SpringObjectFactory, com.opensymphony.webwork.plexus.PlexusObjectFactory, com.opensymphony.webwork.pico.PicoObjectFactory,
ObjectFactory | public class ObjectFactory (Code) | | ObjectFactory is responsible for building the core framework objects. Users may register their own implementation of
the ObjectFactory to control instantiation of these Objects.
This default implementation uses the
ObjectFactory.buildBean(Class,java.util.Map) buildBean method to create all classes
(interceptors, actions, results, etc).
author: Jason Carreira |
Inner Class :static class ContinuationsClassLoader extends ClassLoader | |
ObjectFactory | protected ObjectFactory()(Code) | | |
buildAction | public Object buildAction(String actionName, String namespace, ActionConfig config, Map extraContext) throws Exception(Code) | | Build an instance of the action class to handle a web request
Parameters: actionName - the name the action configuration is set up with in the configuration Parameters: namespace - the namespace the action is configured in Parameters: config - the action configuration found in the config for the actionName / namespace Parameters: extraContext - a Map of extra context which uses the same keys as the com.opensymphony.xwork.ActionContext instance of the action class to handle a web request throws: Exception - |
buildInterceptor | public Interceptor buildInterceptor(InterceptorConfig interceptorConfig, Map interceptorRefParams) throws ConfigurationException(Code) | | Builds an Interceptor from the InterceptorConfig and the Map of
parameters from the interceptor reference. Implementations of this method
should ensure that the Interceptor is parameterized with both the
parameters from the Interceptor config and the interceptor ref Map (the
interceptor ref params take precedence), and that the Interceptor.init()
method is called on the Interceptor instance before it is returned.
Parameters: interceptorConfig - the InterceptorConfig from the configuration Parameters: interceptorRefParams - a Map of params provided in the Interceptor reference in theAction mapping or InterceptorStack definition |
buildResult | public Result buildResult(ResultConfig resultConfig, Map extraContext) throws Exception(Code) | | Build a Result using the type in the ResultConfig and set the parameters in the ResultConfig.
Parameters: resultConfig - the ResultConfig found for the action with the result code returned Parameters: extraContext - a Map of extra context which uses the same keys as the com.opensymphony.xwork.ActionContext |
buildValidator | public Validator buildValidator(String className, Map params, Map extraContext) throws Exception(Code) | | Build a Validator of the given type and set the parameters on it
Parameters: className - the type of Validator to build Parameters: params - property name -> value Map to set onto the Validator instance Parameters: extraContext - a Map of extra context which uses the same keys as the com.opensymphony.xwork.ActionContext |
getClassInstance | public Class getClassInstance(String className) throws ClassNotFoundException(Code) | | Utility method to obtain the class matched to className. Caches look ups so that subsequent
lookups will be faster.
Parameters: className - The fully qualified name of the class to return The class itself throws: ClassNotFoundException - |
getContinuationPackage | public static String getContinuationPackage()(Code) | | |
isNoArgConstructorRequired | public boolean isNoArgConstructorRequired()(Code) | | Allows for ObjectFactory implementations that support
Actions without no-arg constructors.
true if no-arg constructor is required, false otherwise |
setContinuationPackage | public static void setContinuationPackage(String continuationPackage)(Code) | | |
|
|