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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionMap<Class<? extends Annotation>, List<Annotation>> Deprecated, for removal: This API element is subject to removal in a future version.Returns all class level and method level annotations.builder()Create a new fluent API builder for this type.Annotations on the class.combineAnnotations(TypeName annotationType, EndpointConfig.AnnotationScope... scopes) Combines all the annotations of the specific type across all the requested scopes.<T extends Annotation>
List<T> combineAnnotations(Class<T> annotationType, EndpointConfig.AnnotationScope... scopes) Deprecated, for removal: This API element is subject to removal in a future version.create(SecurityLevel copyFrom) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.filterAnnotations(TypeName annotationType, EndpointConfig.AnnotationScope scope) Filters out all annotations of the specific type in the specific scope.<T extends Annotation>
List<T> filterAnnotations(Class<T> annotationType, EndpointConfig.AnnotationScope scope) Deprecated, for removal: This API element is subject to removal in a future version.Map<Class<? extends Annotation>, List<Annotation>> Deprecated, for removal: This API element is subject to removal in a future version.useclassAnnotations()insteadDeprecated, for removal: This API element is subject to removal in a future version.usetypeName()insteadMap<Class<? extends Annotation>, List<Annotation>> Deprecated, for removal: This API element is subject to removal in a future version.usemethodAnnotations()insteadDeprecated, for removal: This API element is subject to removal in a future version.usemethodName()insteadAnnotations on the method.Name of the method this level represents, orUnknownif this level does not represent a method.toString()typeName()Type of the class this level represents (such as a JAX-RS resource class, Rest endpoint).
-
Method Details
-
builder
Create a new fluent API builder for this type.- Returns:
- a new builder
-
create
@Deprecated(forRemoval=true, since="4.2.0") public static SecurityLevel.SecurityLevelBuilder create(String className) Deprecated, for removal: This API element is subject to removal in a future version.Creates builder for security levels based on class name.- Parameters:
className- class name- Returns:
- new builder
- See Also:
-
create
@Deprecated(forRemoval=true, since="4.2.0") public static SecurityLevel.SecurityLevelBuilder create(SecurityLevel copyFrom) Deprecated, for removal: This API element is subject to removal in a future version.Creates builder for security levels based on previously created security level.- Parameters:
copyFrom- existing security level- Returns:
- 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 annotationscope- desired scope- Returns:
- list of annotations
-
filterAnnotations
@Deprecated(forRemoval=true, since="4.2.0") public <T extends Annotation> List<T> filterAnnotations(Class<T> annotationType, EndpointConfig.AnnotationScope scope) Deprecated, for removal: This API element is subject to removal in a future version.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
- See Also:
-
combineAnnotations
@Deprecated(forRemoval=true, since="4.2.0") public <T extends Annotation> List<T> combineAnnotations(Class<T> annotationType, EndpointConfig.AnnotationScope... scopes) Deprecated, for removal: This API element is subject to removal in a future version.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
-
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 annotationscopes- desired scopes- Returns:
- list of annotations
-
allAnnotations
@Deprecated(forRemoval=true, since="4.2.0") public Map<Class<? extends Annotation>,List<Annotation>> allAnnotations()Deprecated, for removal: This API element is subject to removal in a future version.useannotations()insteadReturns class level and method level annotations together in oneMap.- Returns:
- map with class and method level annotations
-
annotations
Returns all class level and method level annotations.- Returns:
- list with class and method level annotations
-
getClassName
Deprecated, for removal: This API element is subject to removal in a future version.usetypeName()insteadReturns the name of the class which this level represents.- Returns:
- class name
- See Also:
-
typeName
Type of the class this level represents (such as a JAX-RS resource class, Rest endpoint).- Returns:
- the type name
-
getMethodName
Deprecated, for removal: This API element is subject to removal in a future version.usemethodName()insteadReturns the name of the method which this level represents.- Returns:
- method name
-
methodName
Name of the method this level represents, orUnknownif this level does not represent a method.- Returns:
- method name
-
getClassLevelAnnotations
@Deprecated(forRemoval=true, since="4.2.0") public Map<Class<? extends Annotation>,List<Annotation>> getClassLevelAnnotations()Deprecated, for removal: This API element is subject to removal in a future version.useclassAnnotations()insteadReturns class level annotations.- Returns:
- map of annotations
-
getMethodLevelAnnotations
@Deprecated(forRemoval=true, since="4.2.0") public Map<Class<? extends Annotation>,List<Annotation>> getMethodLevelAnnotations()Deprecated, for removal: This API element is subject to removal in a future version.usemethodAnnotations()insteadReturns method level annotations.- Returns:
- map of annotations
-
classAnnotations
Annotations on the class.- Returns:
- list of class annotations
-
methodAnnotations
Annotations on the method.- Returns:
- list of method annotations
-
toString
-
annotations()instead