public class AccessControlList extends Object implements Externalizable
Constructor and Description |
---|
AccessControlList() |
AccessControlList(String owner,
List<AccessControlEntry> accessList)
Create ACL from owner name and collection of permission entries.
|
Modifier and Type | Method and Description |
---|---|
void |
addPermissions(String rawData)
Adds permissions
|
void |
addPermissions(String identity,
String[] perm)
Adds a set of permission types to a given identity
|
String |
dump()
Gives a String representation of the
AccessControlList with all the details |
boolean |
equals(Object obj) |
String |
getOwner()
Get owner.
|
List<AccessControlEntry> |
getPermissionEntries()
Gives all the permission entries
|
List<String> |
getPermissions(String identity) |
int |
getPermissionsSize()
Gives access to the size of existing permissions.
|
boolean |
hasOwner() |
boolean |
hasPermissions() |
void |
readExternal(ObjectInput in) |
void |
removePermissions(String identity)
Removes all the permissions of a given identity
|
void |
removePermissions(String identity,
String permission)
Removes the permission corresponding to the given identity and the given permission type
|
void |
setOwner(String owner)
Sets owner.
|
void |
writeExternal(ObjectOutput out) |
public static final String DELIMITER
public AccessControlList()
public AccessControlList(String owner, List<AccessControlEntry> accessList)
owner
- accessList
- - permission entriespublic boolean hasPermissions()
true
if the permission list has been set, false
otherwisepublic boolean hasOwner()
true
if the owner has been set, false
otherwisepublic void addPermissions(String rawData) throws javax.jcr.RepositoryException
rawData
- A semicolon separated string representing the list of permission entries to add,
knowing that the syntax of a permission entry is ${identity} [read|add_node|set_property|remove]javax.jcr.RepositoryException
public void addPermissions(String identity, String[] perm) throws javax.jcr.RepositoryException
identity
- the member identityperm
- an array of permission types to addjavax.jcr.RepositoryException
public void removePermissions(String identity)
identity
- the member identitypublic void removePermissions(String identity, String permission)
identity
- the member identitypermission
- the permission typepublic String getOwner()
public void setOwner(String owner)
owner
- the ownerpublic List<AccessControlEntry> getPermissionEntries()
public List<String> getPermissions(String identity)
identity
- the member identitypublic String dump()
AccessControlList
with all the detailspublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public int getPermissionsSize()
Copyright © 2003-2017 eXo Platform SAS. All Rights Reserved.