public class AclInMemoryDatabase extends 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(String user,
String action,
Object resource)
Adds a new permission.
|
AclEntry |
getEntry(String user,
Object resource)
Gets the
AclEntry (the permissions) concerning a given pair of user and resource. |
public void add(String user, String action, 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(String user, 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
.