|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.core.DefaultContentPermissionManager
Field Summary | |
protected ContentPermissionDao |
contentPermissionDao
|
protected PageManager |
pageManager
|
Constructor Summary | |
DefaultContentPermissionManager()
|
Method Summary | |
void |
addContentPermission(ContentPermission permission,
ContentEntityObject content)
Adds a new current content permission to the CEO if it doesn't have it already. |
protected boolean |
cannotHaveInheritedPermissions(ContentEntityObject contentEntityObject)
Check (for speed) whether we should even bother to query for possible inherited permissions. |
List |
getContentPermissionSets(ContentEntityObject ceo,
String type)
Get the ContentPermissionSets that affect this ceo, both inherited and directly. |
List |
getInheritedContentPermissions(ContentEntityObject contentEntityObject)
Returns all inherited content permission objects attached to the ancestors of this entity object, that is, all view permissions but *not* edit permissions. |
List |
getInheritedContentPermissionSets(ContentEntityObject contentEntityObject)
|
List |
getInheritedContentUserPermissions(ContentEntityObject contentEntityObject)
Filters the inherited content permission sets of a page for a list of inherited user permissions (of type ContentPermission.VIEW_PERMISSION ) |
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 |
removeContentPermission(ContentPermission contentPermission)
|
void |
setContentPermissionDao(ContentPermissionDao contentPermissionDao)
|
void |
setContentPermissions(Collection requiredPermissions,
ContentEntityObject content,
String type)
Set the Content Permissions on the CEO to be the list of ContentPermission s passed. |
void |
setContentPermissionSetDao(ContentPermissionSetDao contentPermissionSetDao)
|
void |
setEventManager(EventManager eventManager)
|
void |
setIndexer(ConfluenceIndexer indexer)
|
void |
setInheritedContentPermissionManager(InheritedContentPermissionManager inheritedContentPermissionManager)
|
void |
setPageManager(PageManager pageManager)
|
void |
setUserAccessor(UserAccessor userAccessor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PageManager pageManager
protected ContentPermissionDao contentPermissionDao
Constructor Detail |
public DefaultContentPermissionManager()
Method Detail |
public List getInheritedContentPermissions(ContentEntityObject contentEntityObject)
ContentPermissionManager
getInheritedContentPermissions
in interface ContentPermissionManager
protected boolean cannotHaveInheritedPermissions(ContentEntityObject contentEntityObject)
public List getInheritedContentUserPermissions(ContentEntityObject contentEntityObject)
ContentPermission.VIEW_PERMISSION
)
getInheritedContentUserPermissions
in interface ContentPermissionManager
public List getInheritedContentPermissionSets(ContentEntityObject contentEntityObject)
getInheritedContentPermissionSets
in interface ContentPermissionManager
ContentPermissionSet
s of type
ContentPermission.VIEW_PERMISSION
of all ancestors of contentEntityObjectpublic List getContentPermissionSets(ContentEntityObject ceo, String type)
ContentPermissionManager
getContentPermissionSets
in interface ContentPermissionManager
ceo
- whose permissions will be returned. Not null.type
- one of ContentPermission.VIEW_PERMISSION
or ContentPermission.EDIT_PERMISSION
ContentPermissionSet
s. Not null, but can be empty.public boolean hasContentLevelPermission(User user, String permissionType, ContentEntityObject content)
ContentPermissionManager
hasContentLevelPermission
in interface ContentPermissionManager
permissionType
- ContentPermission.VIEW_PERMISSION
or ContentPermission.EDIT_PERMISSION
public void removeContentPermission(ContentPermission contentPermission)
removeContentPermission
in interface ContentPermissionManager
public void addContentPermission(ContentPermission permission, ContentEntityObject content)
addContentPermission
in interface ContentPermissionManager
permission
- content
-
IllegalArgumentException
- if the permission's user or group is invalid.public void setContentPermissions(Collection requiredPermissions, ContentEntityObject content, String type)
ContentPermissionManager
ContentPermission
s passed. Passing
an empty list removes all permissions. Passing a list containing just the existing permissions does nothing.
setContentPermissions
in interface ContentPermissionManager
requiredPermissions
- set of ContentPermission
scontent
- type
- public List getPermittedChildren(Page page, User user)
getPermittedChildren
in interface ContentPermissionManager
public List getInheritedViewContentPermissions(Page page)
ContentPermissionManager.getInheritedContentPermissionSets(ContentEntityObject)
ContentPermissionManager
getInheritedViewContentPermissions
in interface ContentPermissionManager
page
-
public Set getViewContentPermissions(Page page)
ContentPermissionManager
getViewContentPermissions
in interface ContentPermissionManager
page
-
public void setContentPermissionDao(ContentPermissionDao contentPermissionDao)
public void setPageManager(PageManager pageManager)
public void setContentPermissionSetDao(ContentPermissionSetDao contentPermissionSetDao)
public void setIndexer(ConfluenceIndexer indexer)
public void setEventManager(EventManager eventManager)
public void setInheritedContentPermissionManager(InheritedContentPermissionManager inheritedContentPermissionManager)
public void setUserAccessor(UserAccessor userAccessor)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |