Package alluxio.security.authorization
Class ExtendedACLEntries
- java.lang.Object
-
- alluxio.security.authorization.ExtendedACLEntries
-
@NotThreadSafe public class ExtendedACLEntries extends java.lang.Object
Stores the extended ACL entries.
-
-
Field Summary
Fields Modifier and Type Field Description protected AclActions
mMaskActions
protected java.util.Map<java.lang.String,AclActions>
mNamedGroupActions
protected java.util.Map<java.lang.String,AclActions>
mNamedUserActions
-
Constructor Summary
Constructors Constructor Description ExtendedACLEntries()
Creates an empty extended ACL.ExtendedACLEntries(ExtendedACLEntries other)
Creates a copy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.List<AclEntry>
getEntries()
Returns a list ofAclEntry
which represent this ACL instance.AclActions
getMask()
AclActions
getNamedGroup(java.lang.String group)
java.util.Map<java.lang.String,AclActions>
getNamedGroupActions()
AclActions
getNamedUser(java.lang.String user)
java.util.Map<java.lang.String,AclActions>
getNamedUserActions()
boolean
hasExtended()
int
hashCode()
void
removeEntry(AclEntry entry)
Removes the specified entry.void
setEntry(AclEntry entry)
Sets an entry into the access control list.void
updateMask(AclActions groupActions)
Update the mask to be the union of owning group entry, named user entry and named group entry.
-
-
-
Field Detail
-
mNamedUserActions
protected java.util.Map<java.lang.String,AclActions> mNamedUserActions
-
mNamedGroupActions
protected java.util.Map<java.lang.String,AclActions> mNamedGroupActions
-
mMaskActions
protected AclActions mMaskActions
-
-
Constructor Detail
-
ExtendedACLEntries
public ExtendedACLEntries()
Creates an empty extended ACL.
-
ExtendedACLEntries
public ExtendedACLEntries(ExtendedACLEntries other)
Creates a copy.- Parameters:
other
- the object to copy
-
-
Method Detail
-
getEntries
public java.util.List<AclEntry> getEntries()
Returns a list ofAclEntry
which represent this ACL instance. The mask will only be included if extended ACL entries exist.- Returns:
- an immutable list of ACL entries
-
getNamedUserActions
public java.util.Map<java.lang.String,AclActions> getNamedUserActions()
- Returns:
- named user actions
-
getNamedGroupActions
public java.util.Map<java.lang.String,AclActions> getNamedGroupActions()
- Returns:
- named group actions
-
hasExtended
public boolean hasExtended()
- Returns:
- true if has extended ACL (named users, named groups)
-
removeEntry
public void removeEntry(AclEntry entry)
Removes the specified entry. A base entry is not allowed to be removed.- Parameters:
entry
- the entry to be removed
-
setEntry
public void setEntry(AclEntry entry)
Sets an entry into the access control list. If an entry with the same type and subject already exists, overwrites the existing entry; Otherwise, adds this new entry.- Parameters:
entry
- the entry to be added or updated
-
getNamedUser
public AclActions getNamedUser(java.lang.String user)
- Parameters:
user
- the user to look up- Returns:
- the actions for the user, or null if the user is not found
-
getNamedGroup
public AclActions getNamedGroup(java.lang.String group)
- Parameters:
group
- the group to look up- Returns:
- the actions for the group, or null if the group is not found
-
getMask
public AclActions getMask()
- Returns:
- the mask actions
-
updateMask
public void updateMask(AclActions groupActions)
Update the mask to be the union of owning group entry, named user entry and named group entry.- Parameters:
groupActions
- the group entry to be integrated into the mask
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-