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)
ShareManagerSharePermission instances associated with a passed in
SharedEntitygetSharePermissions in interface ShareManagerentity - The entity that has permissions associated with itSharePermission instances associated with the entity.public void deletePermissions(SharedEntity entity)
ShareManagerdeletePermissions in interface ShareManagerentity - The entity that will have all its permissions deletedpublic void deleteSharePermissionsLike(SharePermission permission)
ShareManagerSharePermission'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 ShareManagerpermission - a 'template' of the type of SharePermission you want to deletepublic SharedEntity.SharePermissions updateSharePermissions(SharedEntity entity)
ShareManagerSharePermission associated with an entity. Looks after creation and updating of permissions.updateSharePermissions in interface ShareManagerentity - The entity that has permissions associated with it@Deprecated public boolean hasPermission(ApplicationUser user, SharedEntity entity)
ShareManagerSharedEntityhasPermission in interface ShareManageruser - The user to check permissions forentity - The entity that has permissions associated with itpublic boolean isSharedWith(ApplicationUser user, SharedEntity sharedEntity)
ShareManagerisSharedWith in interface ShareManageruser - The user to check.sharedEntity - The entity to check.Copyright © 2002-2017 Atlassian. All Rights Reserved.