class Decision
extends java.lang.Object
Access decisions are cached in maps. The top level map contains second level maps and has the instance name for the key. Second level maps have access mode as the key and contain a boolean value bearing the decision. Instances of this cache are specific to a given resource type and are held by the respective security contexts.
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.lang.Boolean>> |
cache
Cache storage.
|
Constructor and Description |
---|
Decision() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
cache(java.lang.String instance,
int mode,
boolean decision)
Puts the access decision into the cache.
|
(package private) void |
remove(java.lang.String instance,
int mode)
Removes the access decision from the cache.
|
(package private) java.lang.Boolean |
search(java.lang.String instance,
int mode)
Searches the instance's cached decisions to find the decision for the requested access mode.
|
private java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.lang.Boolean>> cache
java.lang.Boolean search(java.lang.String instance, int mode)
instance
- The resource instance name.mode
- The requested access mode (rights level).null
if no matching decision exists.void remove(java.lang.String instance, int mode)
instance
- The resource instance name.mode
- The requested access mode (rights level).void cache(java.lang.String instance, int mode, boolean decision)
instance
- The resource instance name.mode
- The requested access mode (rights level).decision
- The value to cache.