com.atlassian.confluence.core
Interface ContentPermissionManager

All Known Implementing Classes:
CachingContentPermissionManager, DefaultContentPermissionManager

public interface ContentPermissionManager


Method Summary
 void addContentPermission(ContentPermission permission, ContentEntityObject content)
          Add permissions to the content entity objecct through the manager.
 ContentPermission getContentUserPermission(ContentEntityObject contentEntityObject)
           
 List getInheritedContentPermissions(ContentEntityObject contentEntityObject)
           
 List getInheritedContentUserPermissions(ContentEntityObject contentEntityObject)
           
 List getInheritedViewContentPermissions(Page page)
          only get inherited permissions that are restrict the viewing of pages
 List getPermittedChildren(Page page, User user)
           
 Set getViewContentPermissions(Page page)
          Get view permissions on this page and its ancestors.
 boolean hasContentLevelPermission(User user, String permissionType, ContentEntityObject content)
          fetches the inherited and explicit content level permissions for this content object and determines whether the user has access.
 void onContentContextChanged(ContentEntityObject contentEntityObject)
          Method to notify the permission manager that the 'context' of the content has changed.
 void removeContentPermission(ContentPermission permission)
           
 void saveContentPermission(ContentPermission permission)
           
 

Method Detail

saveContentPermission

void saveContentPermission(ContentPermission permission)

addContentPermission

void addContentPermission(ContentPermission permission,
                          ContentEntityObject content)
Add permissions to the content entity objecct through the manager. This will ensure that already existing permissions are updated and that the content will be reindexed.

Parameters:
permission -
content -

removeContentPermission

void removeContentPermission(ContentPermission permission)

getInheritedContentPermissions

List getInheritedContentPermissions(ContentEntityObject contentEntityObject)

getInheritedContentUserPermissions

List getInheritedContentUserPermissions(ContentEntityObject contentEntityObject)

getContentUserPermission

ContentPermission getContentUserPermission(ContentEntityObject contentEntityObject)

hasContentLevelPermission

boolean hasContentLevelPermission(User user,
                                  String permissionType,
                                  ContentEntityObject content)
fetches the inherited and explicit content level permissions for this content object and determines whether the user has access.

Parameters:
user -
permissionType -
content -
Returns:

getPermittedChildren

List getPermittedChildren(Page page,
                          User user)

getInheritedViewContentPermissions

List getInheritedViewContentPermissions(Page page)
only get inherited permissions that are restrict the viewing of pages

Parameters:
page -
Returns:
a list of ContentPermission instances

getViewContentPermissions

Set getViewContentPermissions(Page page)
Get view permissions on this page and its ancestors.

Parameters:
page -
Returns:
a list of ContentPermission instances

onContentContextChanged

void onContentContextChanged(ContentEntityObject contentEntityObject)
Method to notify the permission manager that the 'context' of the content has changed. For example when a Page hierarchy is moved from a parent page to another.

Parameters:
contentEntityObject - the content for which the context changed.


Confluence is developed by Atlassian.