public class

CachingSharePermissionStore

extends Object
implements Startable SharePermissionStore
java.lang.Object
   ↳ com.atlassian.jira.sharing.CachingSharePermissionStore

Class Overview

Cache is key on entityId:type.

Summary

Public Constructors
CachingSharePermissionStore(SharePermissionStore delegateStore, CacheManager cacheManager)
Public Methods
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
@EventListener void onClearCache(ClearCacheEvent event)
void start()
This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
SharedEntity.SharePermissions storeSharePermissions(SharedEntity entity)
Associate given entity with passed in Collection SharePermission.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.extension.Startable
From interface com.atlassian.jira.sharing.SharePermissionStore

Public Constructors

public CachingSharePermissionStore (SharePermissionStore delegateStore, CacheManager cacheManager)

Public Methods

public 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.

public 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

public 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

@EventListener public void onClearCache (ClearCacheEvent event)

public void start ()

This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Throws
Exception

public 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