public class DefaultAccessControlList extends AccessControlList
AccessControlList.AccessControlListDeserializer, AccessControlList.AccessControlListSerializer
Modifier and Type | Field and Description |
---|---|
static DefaultAccessControlList |
EMPTY_DEFAULT_ACL |
EMPTY_ACL, mExtendedEntries, mMode, mOwningGroup, mOwningUser, OWNER_FIELD, OWNING_GROUP_FIELD, OWNING_GROUP_KEY, OWNING_USER_KEY, STRING_ENTRY_FIELD
Constructor and Description |
---|
DefaultAccessControlList()
Constructor to build a default ACL that is empty.
|
DefaultAccessControlList(AccessControlList acl)
Constructor to build a default ACL based on an access ACL.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Pair<AccessControlList,DefaultAccessControlList> |
generateChildDirACL(Short umask)
Creates a child directory's access ACL and default ACL based on the default ACL.
|
AccessControlList |
generateChildFileACL(Short umask)
create a child file 's accessACL based on the default ACL.
|
List<AclEntry> |
getEntries()
Returns a list of
AclEntry which represent this ACL instance. |
int |
hashCode() |
boolean |
isEmpty()
Returns true if the default ACL is empty.
|
void |
removeEntry(AclEntry entry)
Removes the specified entry.
|
void |
setEmpty(boolean empty) |
void |
setEntry(AclEntry entry)
Sets an entry into the access control list.
|
checkPermission, clearEntries, fromStringEntries, getExtendedEntries, getMode, getOtherActions, getOwningGroup, getOwningGroupActions, getOwningUser, getOwningUserActions, getPermission, hasExtended, removeExtendedEntries, setMode, setOwningGroup, setOwningUser, toString, toStringEntries, updateMask
public static final DefaultAccessControlList EMPTY_DEFAULT_ACL
public DefaultAccessControlList()
public DefaultAccessControlList(AccessControlList acl)
acl
- the access aclpublic AccessControlList generateChildFileACL(Short umask)
umask
- file's umaskpublic Pair<AccessControlList,DefaultAccessControlList> generateChildDirACL(Short umask)
umask
- child's umaskpublic void removeEntry(AclEntry entry)
removeEntry
in class AccessControlList
entry
- the entry to be removedpublic void setEntry(AclEntry entry)
AccessControlList
setEntry
in class AccessControlList
entry
- the entry to be added or updatedpublic boolean isEmpty()
public void setEmpty(boolean empty)
empty
- set the DefaultAccessControlList to empty or notpublic List<AclEntry> getEntries()
AclEntry
which represent this ACL instance. The mask will only be
included if extended ACL entries exist.getEntries
in class AccessControlList
public boolean equals(Object o)
equals
in class AccessControlList
public int hashCode()
hashCode
in class AccessControlList
Copyright © 2023. All Rights Reserved.