Class ACLEntryImpl
- java.lang.Object
-
- org.jboss.security.acl.ACLEntryImpl
-
- All Implemented Interfaces:
Serializable,ACLEntry
@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.- Author:
- Stefan Guilhen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ACLEntryImpl(BitMaskPermission permission, String identityOrRole)Builds an instance ofACLEntryImplwith the specified permission and identity/role name.ACLEntryImpl(BitMaskPermission permission, Identity identity)Builds an instance ofACLEntryImplwith the specified permission and identity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckPermission(ACLPermission permission)Checks if the specified permission is part of the this entry's permission.booleanequals(Object obj)ACLImplgetAcl()longgetACLEntryId()Obtains the persistent id of thisACLEntryImpl.IdentitygetIdentity()Obtains theIdentityfor which a permission has been assigned in this entry.StringgetIdentityOrRole()Obtains the identity or role for which a permission has been assigned in this entry.ACLPermissiongetPermission()Obtains thePermissionobject held by this entry.inthashCode()voidsetAcl(ACLImpl acl)
-
-
-
Constructor Detail
-
ACLEntryImpl
public ACLEntryImpl(BitMaskPermission permission, Identity identity)
Builds an instance of
ACLEntryImplwith the specified permission and identity.- Parameters:
permission- theACLPermissiongranted to the associated identity.identity- theIdentityfor which the permission is being granted.
-
ACLEntryImpl
public ACLEntryImpl(BitMaskPermission permission, String identityOrRole)
Builds an instance of
ACLEntryImplwith the specified permission and identity/role name.- Parameters:
permission- theACLPermissiongranted to the associated identity.identityOrRole- aStringrepresenting the identity or role name.
-
-
Method Detail
-
getACLEntryId
public long getACLEntryId()
Obtains the persistent id of this
ACLEntryImpl.- Returns:
- a
longrepresenting the persistent id this entry.
-
getAcl
public ACLImpl getAcl()
-
setAcl
public void setAcl(ACLImpl acl)
-
getIdentityOrRole
public String getIdentityOrRole()
Description copied from interface:ACLEntryObtains the identity or role for which a permission has been assigned in this entry.
- Specified by:
getIdentityOrRolein interfaceACLEntry- Returns:
- a
Stringrepresenting the identity or role name.
-
getIdentity
public Identity getIdentity()
Description copied from interface:ACLEntryObtains the
Identityfor which a permission has been assigned in this entry.- Specified by:
getIdentityin interfaceACLEntry- Returns:
- a reference to the
Identitycontained in this entry.
-
getPermission
public ACLPermission getPermission()
Description copied from interface:ACLEntryObtains the
Permissionobject held by this entry.- Specified by:
getPermissionin interfaceACLEntry- Returns:
- a reference to the
Permissioncontained in this entry.
-
checkPermission
public boolean checkPermission(ACLPermission permission)
Description copied from interface:ACLEntryChecks if the specified permission is part of the this entry's permission.
- Specified by:
checkPermissionin interfaceACLEntry- Parameters:
permission- theACLPermissionto be checked for.- Returns:
trueif the permission is part of this entry's permission;falseotherwise.
-
-