org.jboss.security.acl
@Entity public class ACLImpl extends Object implements ACL, Serializable
Simple ACL implementation that keeps the entries in a Map whose keys are the identities of the entries, to provide fast access.
Constructor and Description |
---|
ACLImpl(Resource resource)
Builds an instance of
ACLImpl for the specified resource. |
ACLImpl(Resource resource,
Collection<ACLEntry> entries)
Builds an instance of
ACLImpl for the specified resource, and initialize it with the specified entries. |
ACLImpl(String resourceString,
Collection<ACLEntry> entries) |
Modifier and Type | Method and Description |
---|---|
boolean |
addEntry(ACLEntry entry) |
long |
getACLId()
Obtains the persistent id of this
ACLImpl . |
Collection<? extends ACLEntry> |
getEntries() |
ACLEntry |
getEntry(Identity identity) |
ACLEntry |
getEntry(String identityOrRole) |
Resource |
getResource() |
String |
getResourceAsString()
Obtains the stringfied representation of the resource associated with this
ACL . |
boolean |
isGranted(ACLPermission permission,
Identity identity) |
boolean |
removeEntry(ACLEntry entry) |
void |
setResource(Resource resource)
Sets the resource associated with this
ACL . |
public ACLImpl(Resource resource)
Builds an instance of ACLImpl
for the specified resource.
resource
- a reference to the Resource
associated with the ACL being constructed.public ACLImpl(Resource resource, Collection<ACLEntry> entries)
Builds an instance of ACLImpl
for the specified resource, and initialize it with the specified entries.
resource
- a reference to the Resource
associated with the ACL being constructed.entries
- a Collection
containing the ACL's initial entries.public ACLImpl(String resourceString, Collection<ACLEntry> entries)
public long getACLId()
Obtains the persistent id of this ACLImpl
.
long
representing the persistent id this ACL.public boolean removeEntry(ACLEntry entry)
removeEntry
in interface ACL
public Collection<? extends ACLEntry> getEntries()
getEntries
in interface ACL
public boolean isGranted(ACLPermission permission, Identity identity)
public String getResourceAsString()
Obtains the stringfied representation of the resource associated with this ACL
.
String
representation of the resource.public Resource getResource()
getResource
in interface ACL
public void setResource(Resource resource)
Sets the resource associated with this ACL
.
resource
- a reference to the Resource
associated with this ACL
.Copyright © 2015 JBoss Inc.. All Rights Reserved.