Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`ServletSecurityAnnotationHandler(WebAppContext wac)`

Method Summary
`protected boolean` | `constraintsExist(java.util.List<ServletMapping> servletMappings, java.util.List<ConstraintMapping> constraintMappings)` Check if there are already 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, ServletSecurity.EmptyRoleSemantic permitOrDeny, ServletSecurity.TransportGuarantee transport)` Make a jetty Constraint object, which represents the and elements, based on the security annotation.
`protected ConstraintMapping` | `makeConstraintMapping(Constraint constraint, java.lang.String url, java.lang.String method, java.lang.String[] omissions)` Make a ConstraintMapping which captures the or elements for a particular url pattern, and relates it to a Constraint object ( and ).
`protected java.util.List<ConstraintMapping>` | `makeMethodMappings(java.lang.Class servlet, Constraint defaultConstraint, java.util.List<ServletMapping> servletMappings, HttpMethodConstraint[] annotations)` Make the Jetty Constraints and ConstraintMapping objects that correspond to the HttpMethodConstraint annotations for each url pattern for the servlet.

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(java.lang.Class clazz)

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

### makeConstraint

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

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

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

### makeConstraintMapping

    protected ConstraintMapping makeConstraintMapping(Constraint constraint,
                                                      java.lang.String url,
                                                      java.lang.String method,
                                                      java.lang.String[] omissions)

  Make a ConstraintMapping which captures the or elements for a particular url pattern, and relates it to a Constraint object ( and ).

  Parameters:
    `constraint` -
    `url` -
    `method` -
    `omissions` -
  Returns:

### makeMethodMappings

    protected java.util.List<ConstraintMapping> makeMethodMappings(java.lang.Class servlet,
                                                                   Constraint defaultConstraint,
                                                                   java.util.List<ServletMapping> servletMappings,
                                                                   HttpMethodConstraint[] annotations)

  Make the Jetty Constraints and ConstraintMapping objects that correspond to the HttpMethodConstraint annotations for each url pattern for the servlet.

  Parameters:
    `servlet` -
    `defaultConstraint` -
    `servletMappings` -
    `annotations` -
  Returns:

### getServletMappings

    protected java.util.List<ServletMapping> getServletMappings(java.lang.String className)

  Get the ServletMappings for the servlet's class.

  Parameters:
    `className` -
  Returns:

### constraintsExist

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

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

  Parameters:
    `servletMappings` -
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.