@Transactional public class PermissionManagerImpl extends Object implements PermissionManager
PermissionManager
.Constructor and Description |
---|
PermissionManagerImpl(ApplicationDAO applicationDao,
DirectoryDao directoryDao,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
void |
addPermission(Application application,
Directory directory,
OperationType operationType)
Adds a permission for the given
OperationType to an Application+Directory mapping. |
void |
addPermission(Directory directory,
OperationType operationType) |
boolean |
hasPermission(Application application,
Directory directory,
OperationType operationType)
Determine whether an application has permission to execute a particular
operation on a given directory.
|
boolean |
hasPermission(Directory directory,
OperationType operationType)
Determine whether a directory has the permission to
perform a certain operation.
|
void |
removePermission(Application application,
Directory directory,
OperationType operationType)
Removes a permission with the given
OperationType from the Application+Directory mapping |
void |
removePermission(Directory directory,
OperationType operationType) |
public PermissionManagerImpl(ApplicationDAO applicationDao, DirectoryDao directoryDao, com.atlassian.event.api.EventPublisher eventPublisher)
public boolean hasPermission(Directory directory, OperationType operationType)
PermissionManager
hasPermission
in interface PermissionManager
directory
- the directory to validate the permission against.operationType
- the OperationType to check against.public boolean hasPermission(Application application, Directory directory, OperationType operationType)
PermissionManager
hasPermission
in interface PermissionManager
application
- application that wants to perform the operation.directory
- directory to perform the operation on.operationType
- type of operation to perform.public void removePermission(Directory directory, OperationType operationType) throws DirectoryNotFoundException
removePermission
in interface PermissionManager
DirectoryNotFoundException
public void removePermission(Application application, Directory directory, OperationType operationType) throws ApplicationNotFoundException
PermissionManager
OperationType
from the Application+Directory mappingremovePermission
in interface PermissionManager
application
- application that wants to perform the operation.directory
- directory to forbid the operation on.operationType
- type of operation to forbid.ApplicationNotFoundException
- if the application could not be foundpublic void addPermission(Directory directory, OperationType operationType) throws DirectoryNotFoundException
addPermission
in interface PermissionManager
DirectoryNotFoundException
public void addPermission(Application application, Directory directory, OperationType operationType) throws ApplicationNotFoundException
PermissionManager
OperationType
to an Application+Directory mapping.addPermission
in interface PermissionManager
application
- application that wants to perform the operation.directory
- directory to allow the operation on.operationType
- type of operation to forbid.ApplicationNotFoundException
- if the application could not be foundCopyright © 2021 Atlassian. All rights reserved.