Class SecurityLevel

java.lang.Object
io.helidon.security.SecurityLevel

public class SecurityLevel extends Object
Security level stores annotations bound to the specific class and method.

The first level represents EndpointConfig.AnnotationScope.APPLICATION level annotations. Other levels are representations of resource, sub-resource and method used on path to get to the target method.

  • Method Details

    • builder

      public static SecurityLevel.SecurityLevelBuilder builder()
      Create a new fluent API builder for this type.
      Returns:
      a new builder
    • filterAnnotations

      public List<Annotation> filterAnnotations(TypeName annotationType, EndpointConfig.AnnotationScope scope)
      Filters out all annotations of the specific type in the specific scope.
      Parameters:
      annotationType - type of the annotation
      scope - desired scope
      Returns:
      list of annotations
    • combineAnnotations

      public List<Annotation> combineAnnotations(TypeName annotationType, EndpointConfig.AnnotationScope... scopes)
      Combines all the annotations of the specific type across all the requested scopes.
      Parameters:
      annotationType - type of the annotation
      scopes - desired scopes
      Returns:
      list of annotations
    • annotations

      public List<Annotation> annotations()
      Returns all class level and method level annotations.
      Returns:
      list with class and method level annotations
    • typeName

      public TypeName typeName()
      Type of the class this level represents (such as an endpoint class).
      Returns:
      the type name
    • methodName

      public String methodName()
      Name of the method this level represents, or Unknown if this level does not represent a method.
      Returns:
      method name
    • classAnnotations

      public List<Annotation> classAnnotations()
      Annotations on the class.
      Returns:
      list of class annotations
    • methodAnnotations

      public List<Annotation> methodAnnotations()
      Annotations on the method.
      Returns:
      list of method annotations
    • toString

      public String toString()
      Overrides:
      toString in class Object