com.atlassian.crowd.manager.permission
Interface PermissionManager


public interface PermissionManager

Permission Manager for Crowd to validate Directory Permissions and Application-Directory permissions.


Method Summary
 void addPermission(Application application, com.atlassian.crowd.embedded.api.Directory directory, com.atlassian.crowd.embedded.api.OperationType operationType)
          Adds a permission for the given OperationType to an Application+Directory mapping.
 void addPermission(com.atlassian.crowd.embedded.api.Directory directory, com.atlassian.crowd.embedded.api.OperationType operationType)
           
 boolean hasPermission(Application application, com.atlassian.crowd.embedded.api.Directory directory, com.atlassian.crowd.embedded.api.OperationType operationType)
          Determine whether an application has permission to execute a particular operation on a given directory.
 boolean hasPermission(com.atlassian.crowd.embedded.api.Directory directory, com.atlassian.crowd.embedded.api.OperationType operationType)
          Determine whether a directory has the permission to perform a certain operation.
 void removePermission(Application application, com.atlassian.crowd.embedded.api.Directory directory, com.atlassian.crowd.embedded.api.OperationType operationType)
          Removes a permission with the given OperationType from the Application+Directory mapping
 void removePermission(com.atlassian.crowd.embedded.api.Directory directory, com.atlassian.crowd.embedded.api.OperationType operationType)
           
 

Method Detail

hasPermission

boolean hasPermission(com.atlassian.crowd.embedded.api.Directory directory,
                      com.atlassian.crowd.embedded.api.OperationType operationType)
Determine whether a directory has the permission to perform a certain operation.

Parameters:
directory - the directory to validate the permission against.
operationType - the OperationType to check against.
Returns:
true if and only if the directory is allowed to perform this operation.

hasPermission

boolean hasPermission(Application application,
                      com.atlassian.crowd.embedded.api.Directory directory,
                      com.atlassian.crowd.embedded.api.OperationType operationType)
Determine whether an application has permission to execute a particular operation on a given directory.

Parameters:
application - application that wants to perform the operation.
directory - directory to perform the operation on.
operationType - type of operation to perform.
Returns:
true if the application & directory has this permission, false otherwise.

removePermission

void removePermission(Application application,
                      com.atlassian.crowd.embedded.api.Directory directory,
                      com.atlassian.crowd.embedded.api.OperationType operationType)
                      throws ApplicationNotFoundException
Removes a permission with the given OperationType from the Application+Directory mapping

Parameters:
application - application that wants to perform the operation.
directory - directory to forbid the operation on.
operationType - type of operation to forbid.
Throws:
ApplicationNotFoundException - if the application could not be found

addPermission

void addPermission(Application application,
                   com.atlassian.crowd.embedded.api.Directory directory,
                   com.atlassian.crowd.embedded.api.OperationType operationType)
                   throws ApplicationNotFoundException
Adds a permission for the given OperationType to an Application+Directory mapping.

Parameters:
application - application that wants to perform the operation.
directory - directory to allow the operation on.
operationType - type of operation to forbid.
Throws:
ApplicationNotFoundException - if the application could not be found

removePermission

void removePermission(com.atlassian.crowd.embedded.api.Directory directory,
                      com.atlassian.crowd.embedded.api.OperationType operationType)
                      throws DirectoryNotFoundException
Throws:
DirectoryNotFoundException

addPermission

void addPermission(com.atlassian.crowd.embedded.api.Directory directory,
                   com.atlassian.crowd.embedded.api.OperationType operationType)
                   throws DirectoryNotFoundException
Throws:
DirectoryNotFoundException


Copyright © 2014 Atlassian. All Rights Reserved.