|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ShareManager
Interface for managing SharePermission
objects.
Method Summary | |
---|---|
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(com.atlassian.crowd.embedded.api.User user,
SharedEntity entity)
Deprecated. since 5.0 please use isSharedWith(com.atlassian.crowd.embedded.api.User, SharedEntity)
to get the same logic. Permission checks should be done in the service layer according to this information. |
boolean |
isSharedWith(com.atlassian.crowd.embedded.api.User 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. |
Method Detail |
---|
SharedEntity.SharePermissions getSharePermissions(SharedEntity entity)
SharePermission
instances associated with a passed in
SharedEntity
entity
- The entity that has permissions associated with it
SharePermission
instances associated with the entity.void deletePermissions(SharedEntity entity)
entity
- The entity that will have all its permissions deletedSharedEntity.SharePermissions updateSharePermissions(SharedEntity entity)
SharePermission
associated with an entity. Looks after creation and updating of permissions.
entity
- The entity that has permissions associated with it
@Deprecated boolean hasPermission(com.atlassian.crowd.embedded.api.User user, SharedEntity entity)
isSharedWith(com.atlassian.crowd.embedded.api.User, SharedEntity)
to get the same logic. Permission checks should be done in the service layer according to this information.
SharedEntity
user
- The user to check permissions forentity
- The entity that has permissions associated with it
boolean isSharedWith(com.atlassian.crowd.embedded.api.User user, SharedEntity sharedEntity)
user
- The user to check.sharedEntity
- The entity to check.
void deleteSharePermissionsLike(SharePermission permission)
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.
permission
- a 'template' of the type of SharePermission you want to delete
IllegalArgumentException
- if you provide a null SharePermission or one that does not have a type and (param1 or param2).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |