com.atlassian.jira.security
Class DefaultPermissionManager

java.lang.Object
  |
  +--com.atlassian.jira.security.AbstractPermissionManager
        |
        +--com.atlassian.jira.security.DefaultPermissionManager
All Implemented Interfaces:
JiraManager, PermissionManager

public class DefaultPermissionManager
extends AbstractPermissionManager


Constructor Summary
DefaultPermissionManager()
          You shouldn't use this constructor.
 
Method Summary
 void addPermission(JiraPermission perm)
          Add a permission using a JiraPermission object
 java.util.Collection getGlobalPermissions(int permType)
           
 java.util.Collection getPermissions(int permType, org.ofbiz.core.entity.GenericValue entity)
           
 java.util.Collection getProjectGroups(int permType, org.ofbiz.core.entity.GenericValue entity)
          Get the groups that have a permission type for a particular entity
 java.util.Collection getUsersWithPermission(int permType, org.ofbiz.core.entity.GenericValue entity)
          Get all the users that have the permission for this entity
 boolean hasPermission(JiraPermission perm)
           
 void removeGroupPermissions(java.lang.String group)
           
 boolean removePermission(JiraPermission perm)
          Remove a permission
 void removeSchemePermissions(org.ofbiz.core.entity.GenericValue project)
           
 
Methods inherited from class com.atlassian.jira.security.AbstractPermissionManager
addPermission, addPermission, getAllGroups, getGroups, getProjects, getProjects, hasAnonymousPermission, hasGlobalAnonymousPermission, hasGlobalPermission, hasGroupsPermission, hasPermission, hasProjects, hasProjects, hasUserGroupPermission, hasUserPermission, removePermission
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPermissionManager

public DefaultPermissionManager()
You shouldn't use this constructor. Use ManagerFactory.getPermissionManager() instead.

Method Detail

addPermission

public void addPermission(JiraPermission perm)
                   throws CreateException
Description copied from interface: PermissionManager
Add a permission using a JiraPermission object

Specified by:
addPermission in interface PermissionManager
Specified by:
addPermission in class AbstractPermissionManager
CreateException

removePermission

public boolean removePermission(JiraPermission perm)
                         throws RemoveException
Description copied from interface: PermissionManager
Remove a permission

Specified by:
removePermission in interface PermissionManager
Specified by:
removePermission in class AbstractPermissionManager
Returns:
True if the permission was removed, false if not (usually it didn't exist)
RemoveException

hasPermission

public boolean hasPermission(JiraPermission perm)
Specified by:
hasPermission in interface PermissionManager
Specified by:
hasPermission in class AbstractPermissionManager

getGlobalPermissions

public java.util.Collection getGlobalPermissions(int permType)
Specified by:
getGlobalPermissions in interface PermissionManager
Specified by:
getGlobalPermissions in class AbstractPermissionManager

getPermissions

public java.util.Collection getPermissions(int permType,
                                           org.ofbiz.core.entity.GenericValue entity)
Specified by:
getPermissions in interface PermissionManager
Specified by:
getPermissions in class AbstractPermissionManager

removeSchemePermissions

public void removeSchemePermissions(org.ofbiz.core.entity.GenericValue project)
                             throws RemoveException
Specified by:
removeSchemePermissions in interface PermissionManager
Specified by:
removeSchemePermissions in class AbstractPermissionManager
RemoveException

removeGroupPermissions

public void removeGroupPermissions(java.lang.String group)
                            throws RemoveException
Specified by:
removeGroupPermissions in interface PermissionManager
Specified by:
removeGroupPermissions in class AbstractPermissionManager
RemoveException

getProjectGroups

public java.util.Collection getProjectGroups(int permType,
                                             org.ofbiz.core.entity.GenericValue entity)
                                      throws java.lang.Exception
Get the groups that have a permission type for a particular entity

Specified by:
getProjectGroups in interface PermissionManager
Specified by:
getProjectGroups in class AbstractPermissionManager
java.lang.Exception

getUsersWithPermission

public java.util.Collection getUsersWithPermission(int permType,
                                                   org.ofbiz.core.entity.GenericValue entity)
                                            throws java.lang.Exception
Get all the users that have the permission for this entity

Specified by:
getUsersWithPermission in interface PermissionManager
Specified by:
getUsersWithPermission in class AbstractPermissionManager
java.lang.Exception


Copyright © 2002-2003 Atlassian. All Rights Reserved.