public class AccessControlEntry extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AccessControlEntry.Access
ACL entry permission; permit or deny
|
static class |
AccessControlEntry.Builder |
| Modifier and Type | Field and Description |
|---|---|
static String |
kAnyOperation
Special setting "any operation"
|
static String |
kAnyUser
Special user setting "any user"
|
static String |
kOwner
Special user setting "owner"
|
| Constructor and Description |
|---|
AccessControlEntry(AccessControlEntry that) |
AccessControlEntry(String userOrGroupId,
AccessControlEntry.Access p,
Collection<String> a) |
AccessControlEntry(String userOrGroupId,
AccessControlEntry.Access p,
String operation) |
AccessControlEntry(String userOrGroupId,
AccessControlEntry.Access p,
String[] operations) |
| Modifier and Type | Method and Description |
|---|---|
static AccessControlEntry.Builder |
builder()
Create a builder for an ACL entry
|
AccessControlEntry.Access |
check(String userId,
Set<String> groups,
boolean isOwner,
String op)
Get an access permission for a given user ID or group set on a given operation.
|
AccessControlEntry |
clone() |
static AccessControlEntry |
deserialize(org.json.JSONObject o)
Deserialize a JSON object created by serialize()
|
int |
getOperationCount()
Get the number of operations in this ACL entry
|
String[] |
getOperations()
Get the operation set in this ACL entry
|
Set<String> |
getOperationSet()
Get the operation set in this ACL entry
|
AccessControlEntry.Access |
getPermission()
Get the permission for this ACL entry
|
String |
getSubject()
Get the subject of this ACL entry
|
boolean |
removeOperation(String op)
Remove the operation.
|
org.json.JSONObject |
serialize()
Serialize this ACL entry to a JSON object
|
String |
toString() |
public static final String kAnyUser
public static final String kAnyOperation
public static final String kOwner
public AccessControlEntry(AccessControlEntry that)
public AccessControlEntry(String userOrGroupId, AccessControlEntry.Access p, String operation)
public AccessControlEntry(String userOrGroupId, AccessControlEntry.Access p, String[] operations)
public AccessControlEntry(String userOrGroupId, AccessControlEntry.Access p, Collection<String> a)
public static AccessControlEntry.Builder builder()
public AccessControlEntry clone()
public AccessControlEntry.Access check(String userId, Set<String> groups, boolean isOwner, String op)
userId - a user IDgroups - a group set, presumably associated with the userisOwner - true if the user Id is the ACL owner (which is not visible to entries)op - the operation, which is checked as a case-insensitive stringpublic String getSubject()
public AccessControlEntry.Access getPermission()
public Set<String> getOperationSet()
public String[] getOperations()
public int getOperationCount()
public boolean removeOperation(String op)
op - the operation to removepublic org.json.JSONObject serialize()
public static AccessControlEntry deserialize(org.json.JSONObject o)
o - a JSON objectCopyright © 2022 continual.io. All rights reserved.