org.apache.struts2.dispatcher.mapper
Class ActionMapping

java.lang.Object
  extended by org.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.


Constructor Summary
ActionMapping()
          Constructs an ActionMapping
ActionMapping(Result result)
          Constructs an ActionMapping with a default result
ActionMapping(String name, String namespace, String method, Map<String,Object> params)
          Constructs an ActionMapping with its values
 
Method Summary
 String getExtension()
           
 String getMethod()
           
 String getName()
           
 String getNamespace()
           
 Map<String,Object> getParams()
           
 Result getResult()
           
 void setExtension(String extension)
           
 void setMethod(String method)
           
 void setName(String name)
           
 void setNamespace(String namespace)
           
 void setParams(Map<String,Object> params)
           
 void setResult(Result result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionMapping

public ActionMapping()
Constructs an ActionMapping


ActionMapping

public ActionMapping(Result result)
Constructs an ActionMapping with a default result

Parameters:
result - The default result

ActionMapping

public ActionMapping(String name,
                     String namespace,
                     String method,
                     Map<String,Object> params)
Constructs an ActionMapping with its values

Parameters:
name - The action name
namespace - The action namespace
method - The method
params - The extra parameters
Method Detail

getName

public String getName()
Returns:
The action name

getNamespace

public String getNamespace()
Returns:
The action namespace

getParams

public Map<String,Object> getParams()
Returns:
The extra parameters

getMethod

public String getMethod()
Returns:
The method

getResult

public Result getResult()
Returns:
The default result

getExtension

public String getExtension()
Returns:
The extension used during this request

setResult

public void setResult(Result result)
Parameters:
result - The result

setName

public void setName(String name)
Parameters:
name - The action name

setNamespace

public void setNamespace(String namespace)
Parameters:
namespace - The action namespace

setMethod

public void setMethod(String method)
Parameters:
method - The method name to call on the action

setParams

public void setParams(Map<String,Object> params)
Parameters:
params - The extra parameters for this mapping

setExtension

public void setExtension(String extension)
Parameters:
extension - The extension used in the request


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.