Class RestfulActionMapper

java.lang.Object
org.apache.struts2.dispatcher.mapper.RestfulActionMapper
All Implemented Interfaces:
ActionMapper

@Deprecated(forRemoval=true) public class RestfulActionMapper extends Object implements ActionMapper
Deprecated, for removal: This API element is subject to removal in a future version.
since 7.4.0, this legacy mapper predates the Struts REST plugin, which is the maintained way to build REST-style applications with Struts. Scheduled for removal in the next major release.
Simple Restfull Action Mapper to support REST application See docs for more information RestfulActionMapper
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.apache.logging.log4j.Logger
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    cleanupActionName(String rawActionName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Checks action name against the allowed pattern; if it does not match, returns the default action name.
    getMapping(jakarta.servlet.http.HttpServletRequest request, ConfigurationManager configManager)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Expose the ActionMapping for the current request
    Deprecated, for removal: This API element is subject to removal in a future version.
    Expose the ActionMapping for the specified action name
    Deprecated, for removal: This API element is subject to removal in a future version.
    Convert an ActionMapping into a URI string
    void
    setAllowedActionNames(String allowedActionNames)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setDefaultActionName(String defaultActionName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOG

      protected static final org.apache.logging.log4j.Logger LOG
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • RestfulActionMapper

      public RestfulActionMapper()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • setDecoder

      public void setDecoder(UrlDecoder decoder)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setAllowedActionNames

      public void setAllowedActionNames(String allowedActionNames)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setDefaultActionName

      public void setDefaultActionName(String defaultActionName)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getMapping

      public ActionMapping getMapping(jakarta.servlet.http.HttpServletRequest request, ConfigurationManager configManager)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ActionMapper
      Expose the ActionMapping for the current request
      Specified by:
      getMapping in interface ActionMapper
      Parameters:
      request - The servlet request
      configManager - The current configuration manager
      Returns:
      The appropriate action mapping or null if mapping cannot be determined
    • getMappingFromActionName

      public ActionMapping getMappingFromActionName(String actionName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ActionMapper
      Expose the ActionMapping for the specified action name
      Specified by:
      getMappingFromActionName in interface ActionMapper
      Parameters:
      actionName - The name of the action that may have other information embedded in it
      Returns:
      The appropriate action mapping
    • cleanupActionName

      protected String cleanupActionName(String rawActionName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks action name against the allowed pattern; if it does not match, returns the default action name. Mirrors DefaultActionMapper.cleanupActionName(String).
      Parameters:
      rawActionName - action name extracted from the URI
      Returns:
      safe action name
    • getUriFromActionMapping

      public String getUriFromActionMapping(ActionMapping mapping)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ActionMapper
      Convert an ActionMapping into a URI string
      Specified by:
      getUriFromActionMapping in interface ActionMapper
      Parameters:
      mapping - The action mapping
      Returns:
      The URI string that represents this mapping