public class ContentPermission extends ConfluenceEntityObject implements Comparable<ContentPermission>
com/atlassian/confluence/security/ContentPermission.hbm.xml
).
Directly corresponding equivalent for ServiceLayer would be ContentRestriction
Each Content has as many ContentPermissionSet
s linked as there are operations restricted for the content.
Each ContentPermissionSet
has as many ContentPermission
s as there are specific users and/or groups to whom corresponding operations are restricted.
Modifier and Type | Field and Description |
---|---|
static String |
EDIT_PERMISSION |
static String |
SHARED_PERMISSION |
static String |
VIEW_PERMISSION |
Modifier | Constructor and Description |
---|---|
|
ContentPermission()
This has to be public because the
ReflectiveObjectPersister requires
public default constructors. |
|
ContentPermission(ContentPermission other)
Copy constructor.
|
protected |
ContentPermission(String type,
String groupName,
ConfluenceUser user) |
protected |
ContentPermission(String type,
String groupName,
String userName)
Deprecated.
|
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierName
public static final String VIEW_PERMISSION
public static final String EDIT_PERMISSION
public static final String SHARED_PERMISSION
public ContentPermission()
ReflectiveObjectPersister
requires
public default constructors.public ContentPermission(ContentPermission other)
protected ContentPermission(String type, String groupName, String userName)
ContentPermission(String, String, com.atlassian.confluence.user.ConfluenceUser)
type
- groupName
- userName
- protected ContentPermission(String type, String groupName, ConfluenceUser user)
@Deprecated public static ContentPermission createUserPermission(String type, String userName)
createUserPermission(String, com.atlassian.confluence.user.ConfluenceUser)
public static ContentPermission createUserPermission(String type, ConfluenceUser user)
public static ContentPermission createGroupPermission(String type, String groupName)
public boolean isPermitted(com.atlassian.user.User user)
content level permissions cannot be granted to anonymous users
user
- the user to test againstpublic boolean isGroupPermission()
public boolean isUserPermission()
public String getType()
@Deprecated public String getUserName()
getUserSubject()
instead.public void setSubject(ConfluenceUser subject)
@Deprecated public void setUserAccessor(UserAccessor userAccessor)
public ConfluenceUser getUserSubject()
isUserPermission()
is true, returns the user who is explicitly permitted by this permission.public String getGroupName()
public ContentPermissionSet getOwningSet()
public void setOwningSet(ContentPermissionSet owningSet)
public int compareTo(ContentPermission that)
compareTo
in interface Comparable<ContentPermission>
public boolean equals(Object o)
equals
in class com.atlassian.core.bean.EntityObject
public int hashCode()
hashCode
in class com.atlassian.core.bean.EntityObject
Copyright © 2003–2017 Atlassian. All rights reserved.