com.atlassian.jira.security
Interface GlobalPermissionManager

All Known Implementing Classes:
DefaultGlobalPermissionManager

public interface GlobalPermissionManager


Method Summary
 boolean addPermission(int permissionType, java.lang.String group)
          Adds a global permission
 java.util.Collection getGroups(int permissionId)
          Retrieve all the groups with this permission
 java.util.Collection getPermissions(int permissionType)
          Retrieve all the global permissions of a particular type
 boolean hasPermission(int permissionType)
          Check if a global anonymous permission exists
 boolean hasPermission(int permissionType, com.opensymphony.user.User u)
          Check if a global permission for one of the users groups exists
 boolean removePermission(int permissionType, java.lang.String group)
          Removes a global permission
 boolean removePermissions(java.lang.String group)
          Remove a global permissions that the group passed in
 

Method Detail

addPermission

public boolean addPermission(int permissionType,
                             java.lang.String group)
                      throws CreateException
Adds a global permission

Parameters:
permissionType - must be a global permission type
group - can be null if it is anyone permission
Returns:
True if the permission was added
Throws:
CreateException

getPermissions

public java.util.Collection getPermissions(int permissionType)
Retrieve all the global permissions of a particular type

Parameters:
permissionType - must be a global permission
Returns:
Collection of JiraPermission

removePermission

public boolean removePermission(int permissionType,
                                java.lang.String group)
                         throws RemoveException
Removes a global permission

Parameters:
permissionType - must be a global permission type
group - can be null if it is anyone permission
Returns:
True if the permission was removed, false if not (usually it didn't exist)
Throws:
RemoveException

removePermissions

public boolean removePermissions(java.lang.String group)
                          throws RemoveException
Remove a global permissions that the group passed in

Parameters:
group - must NOT be null and the group must exist
Returns:
True all the permissions are removed
Throws:
RemoveException

hasPermission

public boolean hasPermission(int permissionType)
Check if a global anonymous permission exists

Parameters:
permissionType - must be global permission
Returns:

hasPermission

public boolean hasPermission(int permissionType,
                             com.opensymphony.user.User u)
Check if a global permission for one of the users groups exists

Parameters:
permissionType - must be a global permission
u - must not be null
Returns:

getGroups

public java.util.Collection getGroups(int permissionId)
Retrieve all the groups with this permission

Parameters:
permissionId - must be a global permission
Returns:


Copyright © 2002-2005 Atlassian. All Rights Reserved.