AnnotationIntrospector.IntrospectableAnnotationHandlerpublic class ServletSecurityAnnotationHandler extends AnnotationIntrospector.AbstractIntrospectableAnnotationHandler
@ServletSecurity annotation on it,
setting up the <security-constraint>s.
A servlet can be defined in:
| Constructor | Description |
|---|---|
ServletSecurityAnnotationHandler(WebAppContext wac) |
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
constraintsExist(java.util.List<ServletMapping> servletMappings,
java.util.List<ConstraintMapping> constraintMappings) |
Check if there are already
<security-constraint> elements defined that match the url-patterns for
the servlet. |
void |
doHandle(java.lang.Class clazz) |
|
protected java.util.List<ServletMapping> |
getServletMappings(java.lang.String className) |
Get the ServletMappings for the servlet's class.
|
protected Constraint |
makeConstraint(java.lang.Class servlet,
java.lang.String[] rolesAllowed,
javax.servlet.annotation.ServletSecurity.EmptyRoleSemantic permitOrDeny,
javax.servlet.annotation.ServletSecurity.TransportGuarantee transport) |
Make a jetty Constraint object, which represents the
<auth-constraint> and
<user-data-constraint> elements, based on the security annotation. |
handlepublic ServletSecurityAnnotationHandler(WebAppContext wac)
public void doHandle(java.lang.Class clazz)
protected Constraint makeConstraint(java.lang.Class servlet, java.lang.String[] rolesAllowed, javax.servlet.annotation.ServletSecurity.EmptyRoleSemantic permitOrDeny, javax.servlet.annotation.ServletSecurity.TransportGuarantee transport)
<auth-constraint> and
<user-data-constraint> elements, based on the security annotation.servlet - the servletrolesAllowed - the roles allowedpermitOrDeny - the role / permission semantictransport - the transport guaranteeprotected java.util.List<ServletMapping> getServletMappings(java.lang.String className)
className - the class nameprotected boolean constraintsExist(java.util.List<ServletMapping> servletMappings, java.util.List<ConstraintMapping> constraintMappings)
<security-constraint> elements defined that match the url-patterns for
the servlet.servletMappings - the servlet mappingsconstraintMappings - the constraint mappingsCopyright © 1995–2017 Webtide. All rights reserved.