com.atlassian.jira.security
Class PermissionsCache

java.lang.Object
  |
  +--com.atlassian.jira.security.PermissionsCache

public class PermissionsCache
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 PermissionsCache getInstance()
           
 org.ofbiz.core.entity.GenericValue getPermission(JiraPermission jiraPermission)
           
 java.util.Collection getPermissionsByProject(int permType, org.ofbiz.core.entity.GenericValue project)
          Get a Collection of permissions based on a particular project.
 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 PermissionsCache 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)

getPermissionsByProject

public java.util.Collection getPermissionsByProject(int permType,
                                                    org.ofbiz.core.entity.GenericValue project)
Get a Collection of permissions based on a particular project. As permissions are done by scheme and not project the permissions are actually the permissions of the permission scheme attached to the project

Parameters:
permType - Id of the Permission
project - The project that is part of the permission scheme
Returns:
Collection of Permission objects


Copyright © 2002-2003 Atlassian. All Rights Reserved.