com.atlassian.jira.security
Class GlobalPermissionsCache

java.lang.Object
  extended by com.atlassian.jira.security.GlobalPermissionsCache

public class GlobalPermissionsCache
extends java.lang.Object

This is a very basic singleton cache that stores permissions When constructed, or when you call refresh() - it will find and cache all permissions


Method Summary
static GlobalPermissionsCache getInstance()
           
 org.ofbiz.core.entity.GenericValue getPermission(JiraPermission jiraPermission)
           
 java.util.Set<JiraPermission> getPermissions()
           
 java.util.Collection<JiraPermission> getPermissions(int permissionType)
          Get a Collection of permission based on a permissionType
 boolean hasPermission(JiraPermission jiraPermission)
           
 void refresh()
          Refresh the permissions cache IMPACT: Should perform only one SQL select statement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static GlobalPermissionsCache getInstance()

refresh

public void refresh()
Refresh the permissions cache IMPACT: Should perform only one SQL select statement


hasPermission

public boolean hasPermission(JiraPermission jiraPermission)

getPermission

public org.ofbiz.core.entity.GenericValue getPermission(JiraPermission jiraPermission)

getPermissions

public java.util.Set<JiraPermission> getPermissions()

getPermissions

public java.util.Collection<JiraPermission> getPermissions(int permissionType)
Get a Collection of permission based on a permissionType

Parameters:
permissionType - must be global permission type
Returns:
Collction of Permission objects


Copyright © 2002-2010 Atlassian. All Rights Reserved.