com.atlassian.jira.sharing
Interface SharePermissionStore

All Known Implementing Classes:
CachingSharePermissionStore, OfBizSharePermissionStore

public interface SharePermissionStore

Store interface for the persistence of SharePermissions

Since:
v3.13

Method Summary
 int deleteSharePermissions(SharedEntity entity)
          Delete all SharePermission instances associate with given entity.
 int 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 given SharedEntity
 SharedEntity.SharePermissions storeSharePermissions(SharedEntity entity)
          Associate given entity with passed in Collection SharePermission.
 

Method Detail

getSharePermissions

SharedEntity.SharePermissions getSharePermissions(SharedEntity entity)
Retrieve all SharePermission instances associated with a given SharedEntity

Parameters:
entity - The entity that SharePermissions are associated with
Returns:
SharePermissions containing SharePermission instances that are associated with a given entity

storeSharePermissions

SharedEntity.SharePermissions storeSharePermissions(SharedEntity entity)
Associate given entity with passed in Collection SharePermission. Store is responsible for updating and creating current shares associated with entity.

Parameters:
entity - The entity to associate SharePermissions with
Returns:
SharePermissions containing the SharePermission instances that were persisted

deleteSharePermissions

int deleteSharePermissions(SharedEntity entity)
Delete all SharePermission instances associate with given entity.

Parameters:
entity - The entity that SharePermissions are associated with
Returns:
the number of permissions that were deleted.

deleteSharePermissionsLike

int deleteSharePermissionsLike(SharePermission permission)
Deletes SharePermission's that have the same "shape" as the provided share permission. It uses the type, param1, amd param2 to as the basis for deleting SharePermission

Parameters:
permission - a 'template' of the type of SharePermission you want to delete
Returns:
the number of rows affected by the delete
Throws:
IllegalArgumentException - if you provide a null SharePermission or one that does not have a type and (param1 or param2).


Copyright © 2002-2008 Atlassian. All Rights Reserved.