public abstract class AbstractConstraint
extends java.lang.Object
Constructor and Description |
---|
AbstractConstraint() |
Modifier and Type | Method and Description |
---|---|
abstract AuthorizationResult |
isAuthorized(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
Returns true if the user is authorized for the resource.
|
boolean |
isPrivateCache()
Returns true if any cache needs to be private.
|
boolean |
needsAuthentication()
Returns true if the constraint requires authentication.
|
protected AbstractConstraint[] |
toArray()
converts the sub constraints to an array.
|
public boolean needsAuthentication()
public boolean isPrivateCache()
public abstract AuthorizationResult isAuthorized(HttpServletRequest request, HttpServletResponse response, ServletContext application) throws ServletException, java.io.IOException
isAuthorized must provide the response if the user is not authorized. Typically this will just call sendError.
isAuthorized will be called after all the other filters, but before the servlet.service().
request
- the servlet requestresponse
- the servlet responseServletException
java.io.IOException
protected AbstractConstraint[] toArray()