|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.core.DefaultContentEntityManager
com.atlassian.confluence.core.DefaultContentPermissionManager
public class DefaultContentPermissionManager
| Field Summary | |
|---|---|
protected ContentPermissionDao |
contentPermissionDao
|
protected PageManager |
pageManager
|
| Fields inherited from class com.atlassian.confluence.core.DefaultContentEntityManager |
|---|
contentEntityObjectDao, eventManager, indexer, linkManager |
| Fields inherited from interface com.atlassian.confluence.core.ContentEntityManager |
|---|
ITERATE_ALL |
| Constructor Summary | |
|---|---|
DefaultContentPermissionManager()
|
|
| Method Summary | |
|---|---|
void |
addContentPermission(ContentPermission permission,
ContentEntityObject content)
Adds a new current content permission to the CEO. |
protected boolean |
cannotHaveInheritedPermissions(ContentEntityObject contentEntityObject)
Check (for speed) whether we should even both to query for possible inherited permissions. |
ContentPermission |
getContentUserPermission(ContentEntityObject contentEntityObject)
If a page has inherited _user_ permissions, the one that applies is the top most one else, just return the user permission currently attached to the page This is a convenience method to encapsulate this logic. |
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 |
getInheritedContentUserPermissions(ContentEntityObject contentEntityObject)
Filters the inherited permissions of a page for a list of inherited user permissions |
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)
|
void |
setContentPermissionDao(ContentPermissionDao contentPermissionDao)
|
void |
setPageManager(PageManager pageManager)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ContentPermissionDao contentPermissionDao
protected PageManager pageManager
| Constructor Detail |
|---|
public DefaultContentPermissionManager()
| Method Detail |
|---|
public void saveContentPermission(ContentPermission permission)
saveContentPermission in interface ContentPermissionManagerpublic List getInheritedContentPermissions(ContentEntityObject contentEntityObject)
getInheritedContentPermissions in interface ContentPermissionManagercontentEntityObject - protected boolean cannotHaveInheritedPermissions(ContentEntityObject contentEntityObject)
At the moment this simply checks if the CEO is hierarchical AND has a parent - could be optimised further in the future.
public List getInheritedContentUserPermissions(ContentEntityObject contentEntityObject)
getInheritedContentUserPermissions in interface ContentPermissionManagercontentEntityObject - public ContentPermission getContentUserPermission(ContentEntityObject contentEntityObject)
getContentUserPermission in interface ContentPermissionManagercontentEntityObject -
public boolean hasContentLevelPermission(User user,
String permissionType,
ContentEntityObject content)
ContentPermissionManager
hasContentLevelPermission in interface ContentPermissionManagerpublic void removeContentPermission(ContentPermission permission)
removeContentPermission in interface ContentPermissionManager
public void addContentPermission(ContentPermission permission,
ContentEntityObject content)
addContentPermission in interface ContentPermissionManagerpermission - content -
public List getPermittedChildren(Page page,
User user)
getPermittedChildren in interface ContentPermissionManagerpublic List getInheritedViewContentPermissions(Page page)
ContentPermissionManager
getInheritedViewContentPermissions in interface ContentPermissionManagerpublic Set getViewContentPermissions(Page page)
ContentPermissionManager
getViewContentPermissions in interface ContentPermissionManagerpublic void onContentContextChanged(ContentEntityObject contentEntityObject)
ContentPermissionManagerPage hierarchy is moved from a parent page to another.
onContentContextChanged in interface ContentPermissionManagercontentEntityObject - the content for which the context changed.public void setContentPermissionDao(ContentPermissionDao contentPermissionDao)
public void setPageManager(PageManager pageManager)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||