com.opensymphony.xwork.config.entities
Class ActionConfig

java.lang.Object
  extended bycom.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:

Version:
$Revision: 1.11 $
Author:
$Author: jcarreira $
See Also:
Serialized Form

Field Summary
protected  Class cachedClass
           
protected  String className
           
protected  List externalRefs
           
protected  List interceptors
           
protected  Method method
           
protected  String methodName
           
protected  String packageName
           
protected  Map params
           
protected  Map results
           
 
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)
           
 
Method Summary
 void addExternalRef(ExternalReference reference)
           
 void addExternalRefs(List externalRefs)
           
 void addInterceptor(Interceptor interceptor)
           
 void addInterceptors(List interceptors)
           
 void addParam(String name, Object value)
           
 void addResultConfig(ResultConfig resultConfig)
           
 boolean equals(Object o)
           
 String getClassName()
           
 List getExternalRefs()
           
 List getInterceptors()
           
 Method getMethod(Class actionClass)
          Returns cached instance of the action method or null if method name was not specified
 String getMethodName()
          Returns name of the action method
 String getPackageName()
           
 Map getParams()
           
 Map getResults()
           
 int hashCode()
           
 void setClassName(String className)
           
 void setMethodName(String methodName)
           
 void setPackageName(String packageName)
           
 void setParams(Map params)
           
 void setResults(Map results)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

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)
Method Detail

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()

XWork Project Page