com.taggercat.controller
Class ActionMapping
java.lang.Object
com.taggercat.controller.ActionMapping
- All Implemented Interfaces:
- java.lang.Comparable<ActionMapping>
- Direct Known Subclasses:
- ELActionMapping, NamedActionActionMapping, QueryStringActionMapping, URIActionMapping, URIPatternActionMapping
public abstract class ActionMapping
- extends java.lang.Object
- implements java.lang.Comparable<ActionMapping>
The base class for mapping Actions to Request Handlers.
The term Actions here does not necessarily imply that the request handlers are mapped
on action names. There are a variety of mechanisms for mapping request to their appropriate
handlers. See the type hierarchy of this class for details.
-
|
Constructor Summary |
ActionMapping()
|
ActionMapping(java.lang.String handlerName,
java.lang.String premittedGroups,
boolean validOnGets,
boolean validOnPosts,
boolean validOnPuts,
boolean validOnDeletes,
int priority,
boolean firstMatchOnly,
boolean requiresValidSession)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActionMapping
public ActionMapping()
ActionMapping
public ActionMapping(java.lang.String handlerName,
java.lang.String premittedGroups,
boolean validOnGets,
boolean validOnPosts,
boolean validOnPuts,
boolean validOnDeletes,
int priority,
boolean firstMatchOnly,
boolean requiresValidSession)
compareTo
public int compareTo(ActionMapping other)
- Specified by:
compareTo in interface java.lang.Comparable<ActionMapping>
isUserInPermittedActionRole
public boolean isUserInPermittedActionRole(WebContext webContext)
- Checks if the current request's user has access permission to the handler.
The group names are assigned using the ActionPermission annotation.
If permission group names are not specified, then everyone has permission.
- Parameters:
webContext -
- Returns:
- true if the user has permission to the specific action
isValidRequestMethod
public boolean isValidRequestMethod(javax.servlet.http.HttpServletRequest request)
- Request handlers can optionally specify that they are accepted on POST, and or GET request methods.
This method returns true if the request handler applies to the current request method.
- Parameters:
request -
- Returns:
- true if the request handler applies to the current request method
matches
public abstract boolean matches(javax.servlet.http.HttpServletRequest request)
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
addLoginFollowUp
public void addLoginFollowUp(javax.servlet.http.HttpServletRequest request)
isValidOnGets
public boolean isValidOnGets()
setValidOnGets
public void setValidOnGets(boolean validOnGets)
isValidOnPosts
public boolean isValidOnPosts()
setValidOnPosts
public void setValidOnPosts(boolean validOnPosts)
getHandlerName
public java.lang.String getHandlerName()
setHandlerName
public void setHandlerName(java.lang.String handlerName)
getPriority
public int getPriority()
setPriority
public void setPriority(int priority)
isFirstMatchOnly
public boolean isFirstMatchOnly()
setFirstMatchOnly
public void setFirstMatchOnly(boolean firstMatchOnly)
requiresValidSession
public boolean requiresValidSession()
setRequiresValidSession
public void setRequiresValidSession(boolean requiresValidSession)
isValidOnPuts
public boolean isValidOnPuts()
setValidOnPuts
public void setValidOnPuts(boolean validOnPuts)
isValidOnDeletes
public boolean isValidOnDeletes()
setValidOnDeletes
public void setValidOnDeletes(boolean validOnDeletes)