public class ContainerConstraint extends AbstractConstraint
| Constructor and Description |
|---|
ContainerConstraint() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConstraint(AbstractConstraint constraint)
Adds a constraint.
|
void |
init() |
AuthorizationResult |
isAuthorized(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
Returns true if the user is authorized for the resource.
|
boolean |
needsAuthentication()
Returns true if the constraint requires authentication.
|
protected AbstractConstraint[] |
toArray()
converts the sub constraints to an array.
|
isPrivateCachepublic void init()
public void addConstraint(AbstractConstraint constraint)
public boolean needsAuthentication()
needsAuthentication in class AbstractConstraintpublic 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().
isAuthorized in class AbstractConstraintrequest - the servlet requestresponse - the servlet responseServletExceptionjava.io.IOExceptionprotected AbstractConstraint[] toArray()
toArray in class AbstractConstraint