public class ContentPermissionSet extends com.atlassian.core.bean.EntityObject implements Iterable<ContentPermission>, Serializable
ContentPermission
s linked to some ContentEntityObject
. Each ContentEntityObject
has a list of ContentPermissionSet
s. One per operation type.
E.g. one ContentPermissionSet
containing VIEW ContentPermission
s, another one for EDIT, etc...
Each ContentPermissionSet
has as many ContentPermission
s as there are specific users and/or groups to whom corresponding operations are restricted.Constructor and Description |
---|
ContentPermissionSet() |
ContentPermissionSet(String type,
ContentEntityObject owningContent) |
Modifier and Type | Method and Description |
---|---|
void |
addContentPermission(ContentPermission contentPermission) |
boolean |
contains(ContentPermission contentPermission) |
boolean |
containsAll(ContentPermissionSet permissionSet) |
Collection<ContentPermission> |
getAllExcept(Collection<ContentPermission> exclusions)
Retrieve all the
ContentPermission s in this set that do not exist in the given collection. |
com.google.common.collect.ImmutableCollection<ContentPermission> |
getContentPermissionsCopy()
Retrieve a copy of the content permissions.
|
List<String> |
getGroupNames()
Returns the names of all groups in this Content Permission Set as a list of
String s. |
ContentEntityObject |
getOwningContent() |
String |
getType() |
List<com.atlassian.sal.api.user.UserKey> |
getUserKeys()
Returns the names of all users in this Content Permission Set as a list of
String s. |
List<String> |
getUserNames()
Deprecated.
since 5.3 Use
#getUserKeys) |
boolean |
isEmpty() |
boolean |
isPermitted(com.atlassian.user.User user) |
Iterator<ContentPermission> |
iterator() |
void |
removeContentPermission(ContentPermission contentPermission)
Remove the given content permission from this set.
|
void |
setOwningContent(ContentEntityObject owningContent)
Hibernate setter.
|
void |
setType(String type) |
int |
size() |
String |
toString() |
clone, equals, getCreationDate, getCurrentDate, getId, getLastModificationDate, hashCode, setClock, setCreationDate, setId, setLastModificationDate
finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public ContentPermissionSet()
public ContentPermissionSet(String type, ContentEntityObject owningContent)
public void addContentPermission(ContentPermission contentPermission)
public void removeContentPermission(ContentPermission contentPermission)
public boolean isPermitted(com.atlassian.user.User user)
public String getType()
public void setType(String type)
public boolean isEmpty()
public int size()
public boolean contains(ContentPermission contentPermission)
public boolean containsAll(ContentPermissionSet permissionSet)
public ContentEntityObject getOwningContent()
public void setOwningContent(ContentEntityObject owningContent)
public Iterator<ContentPermission> iterator()
iterator
in interface Iterable<ContentPermission>
ContentPermission
s in the set.public List<String> getGroupNames()
String
s.String
s.@Deprecated public List<String> getUserNames()
#getUserKeys)
String
s.public List<com.atlassian.sal.api.user.UserKey> getUserKeys()
String
s.public Collection<ContentPermission> getAllExcept(Collection<ContentPermission> exclusions)
ContentPermission
s in this set that do not exist in the given collection. The
comparison is done according to Comparable.compareTo(Object)
.exclusions
- a collection of ContentPermission
sContentPermission
s that are in this object and not given collection.public com.google.common.collect.ImmutableCollection<ContentPermission> getContentPermissionsCopy()
Copyright © 2003–2017 Atlassian. All rights reserved.