class AuditTarget
extends java.lang.Object
Filtering is done by instance name and by access mode independently. These are the combinations and how they are interpreted. A combination is an instance name and a list of access modes. Either or both can be empty.
When a request comes to filter a record, two searches are done agains the Map:
null as the instance name, which means "any name";
null.
The latter means a match, otherwise the access mode is compared with the
list.| Modifier and Type | Field and Description |
|---|---|
private java.util.Map |
target
keeps the instance and list of access modes combinations
|
| Constructor and Description |
|---|
AuditTarget()
Package private constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addTarget(java.lang.String instance,
java.lang.Integer[] modes)
Adds another combination to the map of targets.
|
private static boolean |
checkMode(java.util.Set values,
int value)
Checks the given integer for a match in the given array.
|
(package private) boolean |
checkTarget(java.lang.String instance,
int mode)
Checks the given resource instance and access mode to see if they are
a valid audit target.
|
private java.util.Map target
private static boolean checkMode(java.util.Set values,
int value)
values - Set of integers to be checkedvalue - integer valuetrue if the specified value has the match in the
set or the latter is emptyvoid addTarget(java.lang.String instance,
java.lang.Integer[] modes)
instance - resource instance name or nullmodes - array of access modes or nullboolean checkTarget(java.lang.String instance,
int mode)
instance - resource instance namemode - access mode (requested rights)true if the specified combination is a valid
audit target