|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.core.DefaultContentPermissionManager
public class DefaultContentPermissionManager
| Field Summary | |
|---|---|
protected ContentPermissionDao |
contentPermissionDao
|
| 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. |
AttachmentManager |
getAttachmentManager()
|
java.util.List<ContentPermissionSet> |
getContentPermissionSets(ContentEntityObject ceo,
java.lang.String type)
Get the ContentPermissionSets that affect this ceo, both inherited and directly. |
java.util.List<ContentPermission> |
getInheritedContentPermissions(ContentEntityObject contentEntityObject)
Deprecated. |
java.util.List<ContentPermissionSet> |
getInheritedContentPermissionSets(ContentEntityObject contentEntityObject)
|
java.util.List<ContentPermission> |
getInheritedContentUserPermissions(ContentEntityObject contentEntityObject)
Filters the inherited content permission sets of a page for a list of inherited user permissions (of type ContentPermission.VIEW_PERMISSION) |
java.util.List<Page> |
getPermittedChildren(Page page,
com.atlassian.user.User user)
Returns a list of Page objects that are direct children of the passed in page. |
java.util.Set<ContentPermission> |
getViewContentPermissions(Page page)
Get view permissions on this page and its ancestors. |
boolean |
hasContentLevelPermission(com.atlassian.user.User user,
java.lang.String permissionType,
ContentEntityObject contentEntityObject)
fetches the inherited and explicit content level permissions for this content object and determines whether the user has access. |
boolean |
hasPermittedChildrenIgnoreInheritedPermissions(Page page,
com.atlassian.user.User user)
Does the given page have children visible to the given user. |
boolean |
isPermissionInherited(Page childPage)
Does the child page get its permissions from any ancestor? |
void |
removeAllGroupPermissions(java.lang.String groupName)
Remove all content permission associated with a given group. |
void |
removeAllUserPermissions(ConfluenceUser user)
Remove all content permission associated with a given user. |
void |
removeAllUserPermissions(java.lang.String userName)
Deprecated. |
void |
removeContentPermission(ContentPermission contentPermission)
|
void |
setChangeIndexer(ChangeIndexer changeIndexer)
|
void |
setContentPermissionDao(ContentPermissionDao contentPermissionDao)
|
void |
setContentPermissions(java.util.Collection<ContentPermission> requiredPermissions,
ContentEntityObject content,
java.lang.String type)
Set the Content Permissions on the CEO to be the list of ContentPermissions passed. |
void |
setContentPermissionSetDao(ContentPermissionSetDao contentPermissionSetDao)
|
void |
setEventManager(com.atlassian.event.EventManager eventManager)
|
void |
setIndexer(ConfluenceIndexer indexer)
|
void |
setInheritedContentPermissionManager(InheritedContentPermissionManager inheritedContentPermissionManager)
|
void |
setPageDao(PageDao pageDao)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ContentPermissionDao contentPermissionDao
| Constructor Detail |
|---|
public DefaultContentPermissionManager()
| Method Detail |
|---|
@Deprecated public java.util.List<ContentPermission> getInheritedContentPermissions(ContentEntityObject contentEntityObject)
getInheritedContentPermissions in interface ContentPermissionManagerpublic java.util.List<ContentPermission> getInheritedContentUserPermissions(ContentEntityObject contentEntityObject)
ContentPermission.VIEW_PERMISSION)
getInheritedContentUserPermissions in interface ContentPermissionManagerpublic java.util.List<ContentPermissionSet> getInheritedContentPermissionSets(ContentEntityObject contentEntityObject)
getInheritedContentPermissionSets in interface ContentPermissionManagerContentPermissionSets of type
ContentPermission.VIEW_PERMISSION of all ancestors of contentEntityObject
public java.util.List<ContentPermissionSet> getContentPermissionSets(ContentEntityObject ceo,
java.lang.String type)
ContentPermissionManager
getContentPermissionSets in interface ContentPermissionManagerceo - whose permissions will be returned. Not null.type - one of ContentPermission.VIEW_PERMISSION or ContentPermission.EDIT_PERMISSION
ContentPermissionSets. Not null, but can be empty.
public boolean hasContentLevelPermission(com.atlassian.user.User user,
java.lang.String permissionType,
ContentEntityObject contentEntityObject)
ContentPermissionManager
hasContentLevelPermission in interface ContentPermissionManagerpermissionType - ContentPermission.VIEW_PERMISSION or ContentPermission.EDIT_PERMISSION
public void removeContentPermission(ContentPermission contentPermission)
removeContentPermission in interface ContentPermissionManagerpublic void removeAllGroupPermissions(java.lang.String groupName)
ContentPermissionManager
removeAllGroupPermissions in interface ContentPermissionManagerpublic void removeAllUserPermissions(ConfluenceUser user)
ContentPermissionManager
removeAllUserPermissions in interface ContentPermissionManager@Deprecated public void removeAllUserPermissions(java.lang.String userName)
ContentPermissionManager
removeAllUserPermissions in interface ContentPermissionManager
public void addContentPermission(ContentPermission permission,
ContentEntityObject content)
addContentPermission in interface ContentPermissionManagerjava.lang.IllegalArgumentException - if content object does not correspond to the
latest version of the content Permissions can only be added
to the latest version of a ContentEntityObject.
public void setContentPermissions(java.util.Collection<ContentPermission> requiredPermissions,
ContentEntityObject content,
java.lang.String type)
ContentPermissionManagerContentPermissions passed. Passing
an empty list removes all permissions. Passing a list containing just the existing permissions does nothing.
setContentPermissions in interface ContentPermissionManagerrequiredPermissions - set of ContentPermissions
public java.util.List<Page> getPermittedChildren(Page page,
com.atlassian.user.User user)
Page objects that are direct children of the passed in page.
This method will only return the children the passed in user has permission to view.
getPermittedChildren in interface ContentPermissionManager
public boolean hasPermittedChildrenIgnoreInheritedPermissions(Page page,
com.atlassian.user.User user)
ContentPermissionManager
hasPermittedChildrenIgnoreInheritedPermissions in interface ContentPermissionManagerpublic java.util.Set<ContentPermission> getViewContentPermissions(Page page)
ContentPermissionManager
getViewContentPermissions in interface ContentPermissionManagerpublic void setContentPermissionDao(ContentPermissionDao contentPermissionDao)
public void setPageDao(PageDao pageDao)
public void setContentPermissionSetDao(ContentPermissionSetDao contentPermissionSetDao)
public void setIndexer(ConfluenceIndexer indexer)
public void setEventManager(com.atlassian.event.EventManager eventManager)
public void setInheritedContentPermissionManager(InheritedContentPermissionManager inheritedContentPermissionManager)
public void setChangeIndexer(ChangeIndexer changeIndexer)
public AttachmentManager getAttachmentManager()
public boolean isPermissionInherited(Page childPage)
ContentPermissionManager
isPermissionInherited in interface ContentPermissionManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||