public class DefaultShareManager extends Object implements ShareManager
ShareManager
.Constructor and Description |
---|
DefaultShareManager(SharePermissionStore store,
ShareTypeFactory shareTypeFactory,
SharePermissionReindexer reindexer) |
Modifier and Type | Method and Description |
---|---|
void |
deletePermissions(SharedEntity entity)
Delete all permissions associated with an entity
|
void |
deleteSharePermissionsLike(SharePermission permission)
Deletes
SharePermission 's that have the same "shape" as the provided share permission. |
SharedEntity.SharePermissions |
getSharePermissions(SharedEntity entity)
Retrieve all
SharePermission instances associated with a passed in
SharedEntity |
boolean |
hasPermission(ApplicationUser user,
SharedEntity entity)
Deprecated.
|
boolean |
isSharedWith(ApplicationUser user,
SharedEntity sharedEntity)
Whether this entity has been shared with the specified user.
|
SharedEntity.SharePermissions |
updateSharePermissions(SharedEntity entity)
Updates the
SharePermission associated with an entity. |
public DefaultShareManager(SharePermissionStore store, ShareTypeFactory shareTypeFactory, SharePermissionReindexer reindexer)
public SharedEntity.SharePermissions getSharePermissions(SharedEntity entity)
ShareManager
SharePermission
instances associated with a passed in
SharedEntity
getSharePermissions
in interface ShareManager
entity
- The entity that has permissions associated with itSharePermission
instances associated with the entity.public void deletePermissions(SharedEntity entity)
ShareManager
deletePermissions
in interface ShareManager
entity
- The entity that will have all its permissions deletedpublic void deleteSharePermissionsLike(SharePermission permission)
ShareManager
SharePermission
's that have the same "shape" as the provided share permission. It uses the type,
param1, and param2 to as the basis for deleting SharePermission's.deleteSharePermissionsLike
in interface ShareManager
permission
- a 'template' of the type of SharePermission you want to deletepublic SharedEntity.SharePermissions updateSharePermissions(SharedEntity entity)
ShareManager
SharePermission
associated with an entity. Looks after creation and updating of permissions.updateSharePermissions
in interface ShareManager
entity
- The entity that has permissions associated with it@Deprecated public boolean hasPermission(ApplicationUser user, SharedEntity entity)
ShareManager
SharedEntity
hasPermission
in interface ShareManager
user
- The user to check permissions forentity
- The entity that has permissions associated with itpublic boolean isSharedWith(ApplicationUser user, SharedEntity sharedEntity)
ShareManager
isSharedWith
in interface ShareManager
user
- The user to check.sharedEntity
- The entity to check.Copyright © 2002-2016 Atlassian. All Rights Reserved.