public class AclInMemoryDatabase extends java.lang.Object implements AclDataAccess
AclDataAccess
that stores all the permissions of the enforced policy in memory.
This class is thread-safe.
PackedMap
Constructor and Description |
---|
AclInMemoryDatabase()
Constructs an empty database.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String user,
java.lang.String action,
java.lang.Object resource)
Adds a new permission.
|
AclEntry |
getEntry(java.lang.String user,
java.lang.Object resource)
Gets the
AclEntry (the permissions) concerning a given pair of user and resource. |
public void add(java.lang.String user, java.lang.String action, java.lang.Object resource)
AclDataAccess
add
in interface AclDataAccess
user
- the subject of this permission.action
- the action authorized by this permission.resource
- the target of this permission.public AclEntry getEntry(java.lang.String user, java.lang.Object resource)
AclDataAccess
AclEntry
(the permissions) concerning a given pair of user and resource.getEntry
in interface AclDataAccess
user
- the subject of this request.resource
- the target of this request.user
and resource
.