Class CachingInheritedContentPermissionManager
- java.lang.Object
 - 
- com.atlassian.confluence.impl.security.CachingInheritedContentPermissionManager
 
 
- 
- All Implemented Interfaces:
 InheritedContentPermissionManager
public class CachingInheritedContentPermissionManager extends Object implements InheritedContentPermissionManager
AnInheritedContentPermissionManagerimplementation that delegates to another, and caches the lookups.Replaces
com.atlassian.confluence.core.CachingInheritedContentPermissionManager- Since:
 - 7.5
 - See Also:
 ContentPermissionSetCache
 
- 
- 
Constructor Summary
Constructors Constructor Description CachingInheritedContentPermissionManager(InheritedContentPermissionManager delegate, ContentPermissionSetDao contentPermissionSetDao, PageDaoInternal pageDao, TransactionAwareCacheFactory cacheFactory, com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ContentPermissionSet>getInheritedContentPermissionSets(ContentEntityObject contentEntityObject)List<ContentPermissionSet>getInheritedContentPermissionSetsIncludeEdit(ContentEntityObject contentEntityObject)voidonEvent(AncestorsUpdateEvent event)voidonEvent(ContentPermissionEvent event)On reception of anyContentPermissionEventwe clear the cache of any permissions related to the event's referencedContentEntityObjectand any of its descendents.voidregisterEventListener()voidunregisterEventListener() 
 - 
 
- 
- 
Constructor Detail
- 
CachingInheritedContentPermissionManager
public CachingInheritedContentPermissionManager(InheritedContentPermissionManager delegate, ContentPermissionSetDao contentPermissionSetDao, PageDaoInternal pageDao, TransactionAwareCacheFactory cacheFactory, com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar)
 
 - 
 
- 
Method Detail
- 
getInheritedContentPermissionSets
public List<ContentPermissionSet> getInheritedContentPermissionSets(ContentEntityObject contentEntityObject)
- Specified by:
 getInheritedContentPermissionSetsin interfaceInheritedContentPermissionManager- Returns:
 - a list of 
ContentPermissionSets of typeContentPermission.VIEW_PERMISSIONof all ancestors of contentEntityObject 
 
- 
getInheritedContentPermissionSetsIncludeEdit
public List<ContentPermissionSet> getInheritedContentPermissionSetsIncludeEdit(ContentEntityObject contentEntityObject)
- Specified by:
 getInheritedContentPermissionSetsIncludeEditin interfaceInheritedContentPermissionManager- Parameters:
 contentEntityObject- content to get inherited permissions for- Returns:
 - list of all permissions on the given content, including permissions of type 
ContentPermission.EDIT_PERMISSION 
 
- 
onEvent
@EventListener public void onEvent(ContentPermissionEvent event)
On reception of anyContentPermissionEventwe clear the cache of any permissions related to the event's referencedContentEntityObjectand 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. 
- 
onEvent
@EventListener public void onEvent(AncestorsUpdateEvent event)
 
- 
registerEventListener
@PostConstruct public void registerEventListener()
 
- 
unregisterEventListener
@PreDestroy public void unregisterEventListener()
 
 - 
 
 -