org.jboss.security.acl
Class ACLEntryImpl

java.lang.Object
  extended by org.jboss.security.acl.ACLEntryImpl
All Implemented Interfaces:
Serializable, org.jboss.security.acl.ACLEntry

public class ACLEntryImpl
extends Object
implements org.jboss.security.acl.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
ACLEntryImpl(BitMaskPermission permission, org.jboss.security.identity.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.
 
Method Summary
 boolean checkPermission(org.jboss.security.acl.ACLPermission permission)
           
 boolean equals(Object obj)
           
 ACLImpl getAcl()
           
 long getACLEntryId()
           Obtains the persistent id of this ACLEntryImpl.
 org.jboss.security.identity.Identity getIdentity()
           
 String getIdentityOrRole()
           
 org.jboss.security.acl.ACLPermission getPermission()
           
 int hashCode()
           
 void setAcl(ACLImpl acl)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACLEntryImpl

public ACLEntryImpl(BitMaskPermission permission,
                    org.jboss.security.identity.Identity identity)

Builds an instance of ACLEntryImpl with the specified permission and identity.

Parameters:
permission - the ACLPermission granted to the associated identity.
identity - the Identity for which the permission is being granted.

ACLEntryImpl

public ACLEntryImpl(BitMaskPermission permission,
                    String identityOrRole)

Builds an instance of ACLEntryImpl with the specified permission and identity/role name.

Parameters:
permission - the ACLPermission granted to the associated identity.
identityOrRole - a String representing the identity or role name.
Method Detail

getACLEntryId

public long getACLEntryId()

Obtains the persistent id of this ACLEntryImpl.

Returns:
a long representing the persistent id this entry.

getAcl

public ACLImpl getAcl()

setAcl

public void setAcl(ACLImpl acl)

getIdentityOrRole

public String getIdentityOrRole()
Specified by:
getIdentityOrRole in interface org.jboss.security.acl.ACLEntry

getIdentity

public org.jboss.security.identity.Identity getIdentity()
Specified by:
getIdentity in interface org.jboss.security.acl.ACLEntry

getPermission

public org.jboss.security.acl.ACLPermission getPermission()
Specified by:
getPermission in interface org.jboss.security.acl.ACLEntry

checkPermission

public boolean checkPermission(org.jboss.security.acl.ACLPermission permission)
Specified by:
checkPermission in interface org.jboss.security.acl.ACLEntry

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009 JBoss Inc.. All Rights Reserved.