@Entity public class ACLEntryImpl extends Object implements ACLEntry, Serializable
This class represents an entry in the Access Control List (ACL), and associates a permission to an identity. This
implementation only stores permissions of type BitMaskPermission
, and can also only check permissions of
that type.
Constructor and Description |
---|
ACLEntryImpl(BitMaskPermission permission,
Identity identity)
Builds an instance of
ACLEntryImpl with the specified permission and identity. |
ACLEntryImpl(BitMaskPermission permission,
String identityOrRole)
Builds an instance of
ACLEntryImpl with the specified permission and identity/role name. |
Modifier and Type | Method and Description |
---|---|
boolean |
checkPermission(ACLPermission permission)
Checks if the specified permission is part of the this entry's permission.
|
boolean |
equals(Object obj) |
ACLImpl |
getAcl() |
long |
getACLEntryId()
Obtains the persistent id of this
ACLEntryImpl . |
Identity |
getIdentity()
Obtains the
Identity for which a permission has been assigned in this entry. |
String |
getIdentityOrRole()
Obtains the identity or role for which a permission has been assigned in this entry.
|
ACLPermission |
getPermission()
Obtains the
Permission object held by this entry. |
int |
hashCode() |
void |
setAcl(ACLImpl acl) |
public ACLEntryImpl(BitMaskPermission permission, Identity identity)
Builds an instance of ACLEntryImpl
with the specified permission and identity.
permission
- the ACLPermission
granted to the associated identity.identity
- the Identity
for which the permission is being granted.public ACLEntryImpl(BitMaskPermission permission, String identityOrRole)
Builds an instance of ACLEntryImpl
with the specified permission and identity/role name.
permission
- the ACLPermission
granted to the associated identity.identityOrRole
- a String
representing the identity or role name.public long getACLEntryId()
Obtains the persistent id of this ACLEntryImpl
.
long
representing the persistent id this entry.public ACLImpl getAcl()
public void setAcl(ACLImpl acl)
public String getIdentityOrRole()
ACLEntry
Obtains the identity or role for which a permission has been assigned in this entry.
getIdentityOrRole
in interface ACLEntry
String
representing the identity or role name.public Identity getIdentity()
ACLEntry
Obtains the Identity
for which a permission has been assigned in this entry.
getIdentity
in interface ACLEntry
Identity
contained in this entry.public ACLPermission getPermission()
ACLEntry
Obtains the Permission
object held by this entry.
getPermission
in interface ACLEntry
Permission
contained in this entry.public boolean checkPermission(ACLPermission permission)
ACLEntry
Checks if the specified permission is part of the this entry's permission.
checkPermission
in interface ACLEntry
permission
- the ACLPermission
to be checked for.true
if the permission is part of this entry's permission; false
otherwise.Copyright © 2019 JBoss by Red Hat. All rights reserved.