Class ActionMapping

java.lang.Object
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 Details

    • 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 Details

    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object