com.taggercat.controller
Class ActionMapping

java.lang.Object
  extended by 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)
           
 
Method Summary
 void addLoginFollowUp(javax.servlet.http.HttpServletRequest request)
           
 int compareTo(ActionMapping other)
           
 java.lang.String getHandlerName()
           
 int getPriority()
           
 boolean isFirstMatchOnly()
           
 boolean isUserInPermittedActionRole(WebContext webContext)
          Checks if the current request's user has access permission to the handler.
 boolean isValidOnDeletes()
           
 boolean isValidOnGets()
           
 boolean isValidOnPosts()
           
 boolean isValidOnPuts()
           
 boolean isValidRequestMethod(javax.servlet.http.HttpServletRequest request)
          Request handlers can optionally specify that they are accepted on POST, and or GET request methods.
abstract  boolean matches(javax.servlet.http.HttpServletRequest request)
           
 boolean requiresValidSession()
           
 void setFirstMatchOnly(boolean firstMatchOnly)
           
 void setHandlerName(java.lang.String handlerName)
           
 void setPriority(int priority)
           
 void setRequiresValidSession(boolean requiresValidSession)
           
 void setValidOnDeletes(boolean validOnDeletes)
           
 void setValidOnGets(boolean validOnGets)
           
 void setValidOnPosts(boolean validOnPosts)
           
 void setValidOnPuts(boolean validOnPuts)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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)