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

ActionMapper

public interface ActionMapper
Provide a mapping between HTTP requests and action invocation requests and vice-versa.

When given an HttpServletRequest, the ActionMapper may return null if no action invocation request matches, or it may return an {@link ActionMapping} that describes an action invocation for the framework to try.

The ActionMapper is not required to guarantee that the {@link ActionMapping} returned be a real action or otherwise ensure a valid request. Accordingly, most ActionMappers do not need to consult the Struts configuration just to determine if a request should be mapped.

Just as requests can be mapped from HTTP to an action invocation, the opposite is true as well. However, because HTTP requests (when shown in HTTP responses) must be in String form, a String is returned rather than an actual request object.

Fields Summary
Constructors Summary
Methods Summary
public ActionMappinggetMapping(javax.servlet.http.HttpServletRequest request, com.opensymphony.xwork2.config.ConfigurationManager configManager)
Expose the ActionMapping for the current request

param
request The servlet request
param
configManager The current configuration manager
return
The appropriate action mapping

public java.lang.StringgetUriFromActionMapping(ActionMapping mapping)
Convert an ActionMapping into a URI string

param
mapping The action mapping
return
The URI string that represents this mapping