org.jboss.security.acl
Class ACLImpl

java.lang.Object
  extended by org.jboss.security.acl.ACLImpl
All Implemented Interfaces:
org.jboss.security.acl.ACL

public class ACLImpl
extends Object
implements org.jboss.security.acl.ACL

Simple ACL implementation that keeps the entries in a Map whose keys are the identities of the entries, to provide fast access.

Author:
Stefan Guilhen

Constructor Summary
ACLImpl(org.jboss.security.authorization.Resource resource)
           Builds an instance of ACLImpl for the specified resource.
ACLImpl(org.jboss.security.authorization.Resource resource, Collection<org.jboss.security.acl.ACLEntry> entries)
           Builds an instance of ACLImpl for the specified resource, and initialize it with the specified entries.
 
Method Summary
 boolean addEntry(org.jboss.security.acl.ACLEntry entry)
           
 Collection<org.jboss.security.acl.ACLEntry> getEntries()
           
 org.jboss.security.authorization.Resource getResource()
           
 boolean isGranted(org.jboss.security.acl.ACLPermission permission, org.jboss.security.identity.Identity identity)
           
 boolean removeEntry(org.jboss.security.acl.ACLEntry entry)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACLImpl

public ACLImpl(org.jboss.security.authorization.Resource resource)

Builds an instance of ACLImpl for the specified resource.

Parameters:
resource - a reference to the Resource associated with the ACL being constructed.

ACLImpl

public ACLImpl(org.jboss.security.authorization.Resource resource,
               Collection<org.jboss.security.acl.ACLEntry> entries)

Builds an instance of ACLImpl for the specified resource, and initialize it with the specified entries.

Parameters:
resource - a reference to the Resource associated with the ACL being constructed.
entries - a Collection containing the ACL's initial entries.
Method Detail

addEntry

public boolean addEntry(org.jboss.security.acl.ACLEntry entry)
Specified by:
addEntry in interface org.jboss.security.acl.ACL

removeEntry

public boolean removeEntry(org.jboss.security.acl.ACLEntry entry)
Specified by:
removeEntry in interface org.jboss.security.acl.ACL

getEntries

public Collection<org.jboss.security.acl.ACLEntry> getEntries()
Specified by:
getEntries in interface org.jboss.security.acl.ACL

getResource

public org.jboss.security.authorization.Resource getResource()
Specified by:
getResource in interface org.jboss.security.acl.ACL

isGranted

public boolean isGranted(org.jboss.security.acl.ACLPermission permission,
                         org.jboss.security.identity.Identity identity)
Specified by:
isGranted in interface org.jboss.security.acl.ACL


Copyright © 2008 JBoss Inc.. All Rights Reserved.