org.eclipse.jetty.annotations

## Class ServletSecurityAnnotationHandler

- java.lang.Object
- - org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler
  - - org.eclipse.jetty.annotations.ServletSecurityAnnotationHandler

All Implemented Interfaces:
  AnnotationIntrospector.IntrospectableAnnotationHandler

    public class ServletSecurityAnnotationHandler
    extends AnnotationIntrospector.AbstractIntrospectableAnnotationHandler

ServletSecurityAnnotationHandler Inspect a class to see if it has an @ServletSecurity annotation on it, setting up the s. A servlet can be defined in:

- web.xml
- web-fragment.xml
- @WebServlet annotation discovered
- ServletContext.createServlet

The ServletSecurity annotation for a servlet should only be processed iff metadata-complete == false.

### Constructor Summary

Constructors
Constructor and Description
`ServletSecurityAnnotationHandler(WebAppContext wac)`

### Method Summary

Methods
`protected boolean` `constraintsExist(List<ServletMapping> servletMappings, List<ConstraintMapping> constraintMappings)` Check if there are already elements defined that match the url-patterns for the servlet.
`void` `doHandle(Class clazz)`
`protected List<ServletMapping>` `getServletMappings(String className)` Get the ServletMappings for the servlet's class.
`protected Constraint` `makeConstraint(Class servlet, String[] rolesAllowed, javax.servlet.annotation.ServletSecurity.EmptyRoleSemantic permitOrDeny, javax.servlet.annotation.ServletSecurity.TransportGuarantee transport)` Make a jetty Constraint object, which represents the and elements, based on the security annotation.

### Methods inherited from class org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler

`handle`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ServletSecurityAnnotationHandler

    public ServletSecurityAnnotationHandler(WebAppContext wac)

### Method Detail

#### doHandle

    public void doHandle(Class clazz)

Specified by:
  `doHandle` in class `AnnotationIntrospector.AbstractIntrospectableAnnotationHandler`
See Also:
  `AnnotationIntrospector.IntrospectableAnnotationHandler.handle(java.lang.Class)`

#### makeConstraint

    protected Constraint makeConstraint(Class servlet,
                            String[] rolesAllowed,
                            javax.servlet.annotation.ServletSecurity.EmptyRoleSemantic permitOrDeny,
                            javax.servlet.annotation.ServletSecurity.TransportGuarantee transport)

Make a jetty Constraint object, which represents the and elements, based on the security annotation.

Parameters:
  `servlet` -
  `rolesAllowed` -
  `permitOrDeny` -
  `transport` -
Returns:

#### getServletMappings

    protected List<ServletMapping> getServletMappings(String className)

Get the ServletMappings for the servlet's class.

Parameters:
  `className` -
Returns:

#### constraintsExist

    protected boolean constraintsExist(List<ServletMapping> servletMappings,
                           List<ConstraintMapping> constraintMappings)

Check if there are already elements defined that match the url-patterns for the servlet.

Parameters:
  `servletMappings` -
Returns: