Enum Class AccessType

java.lang.Object
java.lang.Enum<AccessType>
com.atlassian.crowd.annotation.AccessType
All Implemented Interfaces:
Serializable, Comparable<AccessType>, Constable

public enum AccessType extends Enum<AccessType>
An enum class to extract security defined access information.
Since:
6.0
  • Enum Constant Details

    • EMPTY

      public static final AccessType EMPTY
    • SYSTEM_ADMIN_ONLY

      public static final AccessType SYSTEM_ADMIN_ONLY
    • ADMIN_ONLY

      public static final AccessType ADMIN_ONLY
    • LICENSED_ONLY

      public static final AccessType LICENSED_ONLY
    • UNLICENSED_SITE_ACCESS

      public static final AccessType UNLICENSED_SITE_ACCESS
    • ANONYMOUS_SITE_ACCESS

      public static final AccessType ANONYMOUS_SITE_ACCESS
    • UNRESTRICTED_ACCESS

      public static final AccessType UNRESTRICTED_ACCESS
  • Method Details

    • values

      public static AccessType[] 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

      public static AccessType valueOf(String name)
      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 name
      NullPointerException - 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.