java.lang.Object
io.helidon.security.SecurityLevel
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.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionMap<Class<? extends Annotation>,
List<Annotation>> Returns class level and method level annotations together in oneMap
.<T extends Annotation>
List<T>combineAnnotations
(Class<T> annotationType, EndpointConfig.AnnotationScope... scopes) Combines all the annotations of the specific type across all the requested scopes.create
(SecurityLevel copyFrom) Creates builder for security levels based on previously created security level.Creates builder for security levels based on class name.<T extends Annotation>
List<T>filterAnnotations
(Class<T> annotationType, EndpointConfig.AnnotationScope scope) Filters out all annotations of the specific type in the specific scope.Map<Class<? extends Annotation>,
List<Annotation>> Returns class level annotations.Returns the name of the class which this level represents.Map<Class<? extends Annotation>,
List<Annotation>> Returns method level annotations.Returns the name of the method which this level represents.toString()
-
Method Details
-
create
Creates builder for security levels based on class name.- Parameters:
className
- class name- Returns:
- new builder
-
create
Creates builder for security levels based on previously created security level.- Parameters:
copyFrom
- existing security level- Returns:
- new builder
-
filterAnnotations
public <T extends Annotation> List<T> filterAnnotations(Class<T> annotationType, EndpointConfig.AnnotationScope scope) Filters out all annotations of the specific type in the specific scope.- Type Parameters:
T
- annotation type- Parameters:
annotationType
- type of the annotationscope
- desired scope- Returns:
- list of annotations
-
combineAnnotations
public <T extends Annotation> List<T> combineAnnotations(Class<T> annotationType, EndpointConfig.AnnotationScope... scopes) Combines all the annotations of the specific type across all the requested scopes.- Type Parameters:
T
- annotation type- Parameters:
annotationType
- type of the annotationscopes
- desired scopes- Returns:
- list of annotations
-
allAnnotations
Returns class level and method level annotations together in oneMap
.- Returns:
- map with class and method level annotations
-
getClassName
Returns the name of the class which this level represents.- Returns:
- class name
-
getMethodName
Returns the name of the method which this level represents.- Returns:
- method name
-
getClassLevelAnnotations
Returns class level annotations.- Returns:
- map of annotations
-
getMethodLevelAnnotations
Returns method level annotations.- Returns:
- map of annotations
-
toString
-