01: package com.opensymphony.webwork.dispatcher.mapper;
02:
03: import javax.servlet.http.HttpServletRequest;
04:
05: /**
06: * <!-- START SNIPPET: javadoc -->
07: *
08: * The ActionMapper is responsible for providing a mapping between HTTP requests and action invocation requests and
09: * vice-versa. When given an HttpServletRequest, the ActionMapper may return null if no action invocation request maps,
10: * or it may return an {@link ActionMapping} that describes an action invocation that WebWork should attempt to try. The
11: * ActionMapper is not required to guarantee that the {@link ActionMapping} returned be a real action or otherwise
12: * ensure a valid request. This means that most ActionMappers do not need to consult WebWork's configuration to
13: * determine if a request should be mapped.
14: *
15: * <p/> Just as requests can be mapped from HTTP to an action invocation, the opposite is true as well. However, because
16: * HTTP requests (when shown in HTTP responses) must be in String form, a String is returned rather than an actual
17: * request object.
18: *
19: * <!-- END SNIPPET: javadoc -->
20: */
21: public interface ActionMapper {
22: ActionMapping getMapping(HttpServletRequest request);
23:
24: String getUriFromActionMapping(ActionMapping mapping);
25: }
|