com.atlassian.jira.permission
Class GlobalPermissionKey

java.lang.Object
  extended by com.atlassian.jira.permission.GlobalPermissionKey

public final class GlobalPermissionKey
extends Object

An identifier for a Global Permission. You can use the pre-defined constants for the well-known system global permissions eg:

GlobalPermissionKey.ADMINISTER
or create a new GlobalPermissionKey with the static initializer eg:
GlobalPermissionKey.of("foo")

Since:
6.2.5
See Also:
GlobalPermissionManager.hasPermission(GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser)

Field Summary
static GlobalPermissionKey ADMINISTER
           
static GlobalPermissionKey BULK_CHANGE
           
static GlobalPermissionKey CREATE_SHARED_OBJECTS
           
static com.google.common.collect.BiMap<Integer,GlobalPermissionKey> GLOBAL_PERMISSION_ID_TRANSLATION
          This map is used to map the old Integer/Long based ID to a String based key.
static GlobalPermissionKey MANAGE_GROUP_FILTER_SUBSCRIPTIONS
           
static GlobalPermissionKey SYSTEM_ADMIN
           
static GlobalPermissionKey USE
           
static GlobalPermissionKey USER_PICKER
           
 
Method Summary
 boolean equals(Object o)
           
 String getKey()
           
 int hashCode()
           
static GlobalPermissionKey of(String key)
          Static initializer to construct a GlobalPermissionKey from a given String key.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ADMINISTER

public static final GlobalPermissionKey ADMINISTER

SYSTEM_ADMIN

public static final GlobalPermissionKey SYSTEM_ADMIN

USE

public static final GlobalPermissionKey USE

USER_PICKER

public static final GlobalPermissionKey USER_PICKER

CREATE_SHARED_OBJECTS

public static final GlobalPermissionKey CREATE_SHARED_OBJECTS

MANAGE_GROUP_FILTER_SUBSCRIPTIONS

public static final GlobalPermissionKey MANAGE_GROUP_FILTER_SUBSCRIPTIONS

BULK_CHANGE

public static final GlobalPermissionKey BULK_CHANGE

GLOBAL_PERMISSION_ID_TRANSLATION

@Internal
public static com.google.common.collect.BiMap<Integer,GlobalPermissionKey> GLOBAL_PERMISSION_ID_TRANSLATION
This map is used to map the old Integer/Long based ID to a String based key. Once all existing code has been refactored to use the keys directly, this method won't be needed any more.

Method Detail

getKey

@Nonnull
public String getKey()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

of

@Nonnull
public static GlobalPermissionKey of(@Nonnull
                                             String key)
Static initializer to construct a GlobalPermissionKey from a given String key.



Copyright © 2002-2014 Atlassian. All Rights Reserved.