Package com.atlassian.bamboo.accesstoken
Enum AccessTokenPermission
- java.lang.Object
-
- java.lang.Enum<AccessTokenPermission>
-
- com.atlassian.bamboo.accesstoken.AccessTokenPermission
-
- All Implemented Interfaces:
Serializable
,Comparable<AccessTokenPermission>
public enum AccessTokenPermission extends Enum<AccessTokenPermission>
Permission that is granted to the access token.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @Nullable AccessTokenPermission
forName(@NotNull String name)
Return an access token permission type for the given name.List<AccessTokenPermission>
getDependencies()
A list of permissions which must also be granted to grant this permission.int
getMask()
Bits that represents this permission.static AccessTokenPermission
valueOf(String name)
Returns the enum constant of this type with the specified name.static AccessTokenPermission[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READ
public static final AccessTokenPermission READ
Grants read-only access to the token.
-
TRIGGER
public static final AccessTokenPermission TRIGGER
Grants permission to trigger builds and deployments in Bamboo.
-
USER
public static final AccessTokenPermission USER
Grants all the permissions that the granting user has.
-
-
Method Detail
-
values
public static AccessTokenPermission[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AccessTokenPermission c : AccessTokenPermission.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AccessTokenPermission valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
forName
@Nullable public static @Nullable AccessTokenPermission forName(@NotNull @NotNull String name)
Return an access token permission type for the given name. Does a case-insensitive check.- Parameters:
name
- name of the permission type- Returns:
- the given permission or null if not found
-
getMask
public int getMask()
Bits that represents this permission. Must be unique so that two permissions never have the same bits set.
-
getDependencies
public List<AccessTokenPermission> getDependencies()
A list of permissions which must also be granted to grant this permission.This is not an effective list - to obtain a full list of dependent permissions, the result must be traversed and subsequent dependencies must be recursively included.
-
-