FileDocCategorySizeDatePackage
ActionMapping.javaAPI DocExample3671Mon Jul 23 13:26:36 BST 2007org.apache.struts2.dispatcher.mapper

ActionMapping

public class ActionMapping extends Object
Simple class that holds the action mapping information used to invoke a Struts action. The name and namespace are required, but the params map is optional, and as such may be null. If a params map is supplied, it must be a mutable map, such as a HashMap.

Fields Summary
private String
name
private String
namespace
private String
method
private Map
params
private com.opensymphony.xwork2.Result
result
Constructors Summary
public ActionMapping()
Constructs an ActionMapping

public ActionMapping(com.opensymphony.xwork2.Result result)
Constructs an ActionMapping with a default result

param
result The default result

        this.result = result;
    
public ActionMapping(String name, String namespace, String method, Map params)
Constructs an ActionMapping with its values

param
name The action name
param
namespace The action namespace
param
method The method
param
params The extra parameters

        this.name = name;
        this.namespace = namespace;
        this.method = method;
        this.params = params;
    
Methods Summary
public java.lang.StringgetMethod()

return
The method

        if (null != method && "".equals(method)) {
            return null;
        } else {
            return method;
        }
    
public java.lang.StringgetName()

return
The action name

        return name;
    
public java.lang.StringgetNamespace()

return
The action namespace

        return namespace;
    
public java.util.MapgetParams()

return
The extra parameters

        return params;
    
public com.opensymphony.xwork2.ResultgetResult()

return
The default result

        return result;
    
public voidsetMethod(java.lang.String method)

param
method The method name to call on the action

        this.method = method;
    
public voidsetName(java.lang.String name)

param
name The action name

        this.name = name;
    
public voidsetNamespace(java.lang.String namespace)

param
namespace The action namespace

        this.namespace = namespace;
    
public voidsetParams(java.util.Map params)

param
params The extra parameters for this mapping

        this.params = params;
    
public voidsetResult(com.opensymphony.xwork2.Result result)

param
result The result

        this.result = result;