Package com.atlassian.crowd.annotation
Enum Class AccessType
- All Implemented Interfaces:
Serializable
,Comparable<AccessType>
,Constable
An enum class to extract security defined access information.
- Since:
- 6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic AccessType
getAccessType
(Class<?> clazz, String methodName, Class<?>... parameterTypes) Calculates the access type of given method based on annotations found on package, class and method.static AccessType
Returns the enum constant of this class with the specified name.static AccessType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EMPTY
-
SYSTEM_ADMIN_ONLY
-
ADMIN_ONLY
-
LICENSED_ONLY
-
UNLICENSED_SITE_ACCESS
-
ANONYMOUS_SITE_ACCESS
-
UNRESTRICTED_ACCESS
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getAccessType
@Nonnull public static AccessType getAccessType(@Nonnull Class<?> clazz, String methodName, Class<?>... parameterTypes) Calculates the access type of given method based on annotations found on package, class and method. The method annotation takes precedence over package and class annotation. The class annotation takes precedence over package annotation.- Parameters:
clazz
- The class to gather the annotation from.methodName
- The method name to find a method to gather the annotation from.parameterTypes
- The parameter types to find a method to gather the annotation from.- Returns:
- The access type calculated for given method based on it's package, class and method.
-