com.opensymphony.xwork.config.entities
Class ActionConfig
java.lang.Object
com.opensymphony.xwork.config.entities.ActionConfig
- All Implemented Interfaces:
- InterceptorListHolder, Parameterizable, Serializable
- public class ActionConfig
- extends Object
- implements InterceptorListHolder, Parameterizable, Serializable
Contains everything needed to configure and execute an action:
- methodName - the method name to execute on the action. If this is null, the Action will be cast to the Action
Interface and the execute() method called
- clazz - the class name for the action
- params - the params to be set for this action just before execution
- results - the result map {String -> View class}
- resultParameters - params for results {String -> Map}
- typeConverter - the Ognl TypeConverter to use when getting/setting properties
- Version:
- $Revision: 1.11 $
- Author:
- $Author: jcarreira $
- See Also:
- Serialized Form
Constructor Summary |
ActionConfig()
|
ActionConfig(String methodName,
Class clazz,
Map parameters,
Map results,
List interceptors)
|
ActionConfig(String methodName,
String className,
Map parameters,
Map results,
List interceptors)
|
ActionConfig(String methodName,
String className,
Map parameters,
Map results,
List interceptors,
List externalRefs,
String packageName)
|
externalRefs
protected List externalRefs
interceptors
protected List interceptors
params
protected Map params
results
protected Map results
method
protected Method method
className
protected String className
methodName
protected String methodName
packageName
protected String packageName
cachedClass
protected Class cachedClass
ActionConfig
public ActionConfig()
ActionConfig
public ActionConfig(String methodName,
Class clazz,
Map parameters,
Map results,
List interceptors)
ActionConfig
public ActionConfig(String methodName,
String className,
Map parameters,
Map results,
List interceptors)
ActionConfig
public ActionConfig(String methodName,
String className,
Map parameters,
Map results,
List interceptors,
List externalRefs,
String packageName)
setClassName
public void setClassName(String className)
getClassName
public String getClassName()
getExternalRefs
public List getExternalRefs()
getInterceptors
public List getInterceptors()
getMethod
public Method getMethod(Class actionClass)
throws NoSuchMethodException
- Returns cached instance of the action method or null if method name was not specified
- Parameters:
actionClass
- - passed in to check that the Action class hasn't changed since last time.
This is really a hack to get around a problem with proxied Actions in Spring.
- Returns:
- cached instance of the action method or null if method name was not specified
- Throws:
NoSuchMethodException
setMethodName
public void setMethodName(String methodName)
getMethodName
public String getMethodName()
- Returns name of the action method
- Returns:
- name of the method to execute
setPackageName
public void setPackageName(String packageName)
- Parameters:
packageName
- The packageName to set.
getPackageName
public String getPackageName()
- Returns:
- Returns the packageName.
setParams
public void setParams(Map params)
- Specified by:
setParams
in interface Parameterizable
getParams
public Map getParams()
- Specified by:
getParams
in interface Parameterizable
setResults
public void setResults(Map results)
getResults
public Map getResults()
addExternalRef
public void addExternalRef(ExternalReference reference)
addExternalRefs
public void addExternalRefs(List externalRefs)
addInterceptor
public void addInterceptor(Interceptor interceptor)
- Specified by:
addInterceptor
in interface InterceptorListHolder
addInterceptors
public void addInterceptors(List interceptors)
- Specified by:
addInterceptors
in interface InterceptorListHolder
addParam
public void addParam(String name,
Object value)
- Specified by:
addParam
in interface Parameterizable
addResultConfig
public void addResultConfig(ResultConfig resultConfig)
equals
public boolean equals(Object o)
hashCode
public int hashCode()
toString
public String toString()