public class CachingInheritedContentPermissionManager extends Object implements InheritedContentPermissionManager
InheritedContentPermissionManager implementation that delegates to another, and caches the lookups.
ContentPermissionSetCache| Constructor and Description |
|---|
CachingInheritedContentPermissionManager(InheritedContentPermissionManager delegate,
ContentPermissionSetDao contentPermissionSetDao,
PageDao pageDao,
TransactionAwareCacheFactory cacheFactory,
com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar) |
| Modifier and Type | Method and Description |
|---|---|
List<ContentPermissionSet> |
getInheritedContentPermissionSets(ContentEntityObject contentEntityObject) |
List<ContentPermissionSet> |
getInheritedContentPermissionSetsIncludeEdit(ContentEntityObject contentEntityObject) |
void |
onEvent(AncestorsUpdateEvent event) |
void |
onEvent(ContentPermissionEvent event)
On reception of any
ContentPermissionEvent we clear the cache of any permissions related to the event's
referenced ContentEntityObject and any of its descendents. |
void |
registerEventListener() |
void |
unregisterEventListener() |
public CachingInheritedContentPermissionManager(InheritedContentPermissionManager delegate, ContentPermissionSetDao contentPermissionSetDao, PageDao pageDao, TransactionAwareCacheFactory cacheFactory, com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar)
public List<ContentPermissionSet> getInheritedContentPermissionSets(ContentEntityObject contentEntityObject)
getInheritedContentPermissionSets in interface InheritedContentPermissionManagerContentPermissionSets of type
ContentPermission.VIEW_PERMISSION of all ancestors of contentEntityObjectpublic List<ContentPermissionSet> getInheritedContentPermissionSetsIncludeEdit(ContentEntityObject contentEntityObject)
getInheritedContentPermissionSetsIncludeEdit in interface InheritedContentPermissionManagercontentEntityObject - content to get inherited permissions forContentPermission.EDIT_PERMISSION@EventListener public void onEvent(ContentPermissionEvent event)
ContentPermissionEvent we clear the cache of any permissions related to the event's
referenced ContentEntityObject and any of its descendents. Its a bit draconian and could probably be
refined to be more selective in what it clears, but this is the safe approach.@EventListener public void onEvent(AncestorsUpdateEvent event)
@PostConstruct public void registerEventListener()
@PreDestroy public void unregisterEventListener()
Copyright © 2003–2022 Atlassian. All rights reserved.