class Decision
extends java.lang.Object
Access decisions are cached in the maps held by the respective security contexts. The top level map contains second level maps and has the instance name as a key. Second level maps have access mode as a key and contain Boolean bearing the decisions.
Modifier and Type | Field and Description |
---|---|
private boolean |
decision
access decision
|
private java.lang.String |
instanceName
resource instance name
|
private int |
mode
access mode AKA requested rights
|
Constructor and Description |
---|
Decision(java.lang.String instance,
int mode,
boolean decision)
Package private constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) static void |
cacheDecision(java.util.Map cache,
java.lang.String instance,
int mode,
boolean decision)
Puts the access decision into the specified cache map.
|
(package private) static void |
clearDecisions(java.util.Map cache,
java.lang.String instance,
int mode)
Removes the access decision from the specified cache map.
|
(package private) static java.lang.Boolean |
searchDecisions(java.util.Map cache,
java.lang.String instance,
int mode)
Searches the specified map for {instance}, then searches the returned
map for {mode} and returns the associated decision or null.
|
private java.lang.String instanceName
private int mode
private boolean decision
Decision(java.lang.String instance, int mode, boolean decision)
instance
- resource instance namemode
- resource access modedecision
- access decisionstatic java.lang.Boolean searchDecisions(java.util.Map cache, java.lang.String instance, int mode)
cache
- map representing aspecific cache to searchinstance
- resource instance namemode
- resource access modeBoolean
bearing the decision or null
static void clearDecisions(java.util.Map cache, java.lang.String instance, int mode)
cache
- map representing aspecific cacheinstance
- resource instance namemode
- resource access modestatic void cacheDecision(java.util.Map cache, java.lang.String instance, int mode, boolean decision)
cache
- map representing aspecific cache to searchinstance
- resource instance namemode
- resource access modedecision
- value to cache