public interface AuditingContext
Modifier and Type | Method and Description |
---|---|
void |
executeWithoutAuditing(Runnable operation)
Executed operation with auditing being turned off for current thread
|
AutoCloseable |
noAuditing()
This method provides convenient
AutoCloseable , to use in try-with-resource expressions. |
AutoCloseable |
noAuditing(String summaryKey)
This method provides convenient
AutoCloseable , to use in try-with-resource expressions. |
void |
onlyAuditFor(String subjectKey,
Runnable operation)
Execute operation without auditing except for an event with given subjectKey
|
boolean |
skipAuditing()
Returns
true if auditing has to be skipped in current thread, false otherwise. |
boolean |
skipAuditing(@Nullable String summaryKey) |
void executeWithoutAuditing(Runnable operation)
operation
- operation which doesn't have to be auditedvoid onlyAuditFor(String subjectKey, Runnable operation)
subjectKey
- Class of event to NOT skip auditing for.operation
- operation which doesn't have to be auditedAutoCloseable noAuditing()
AutoCloseable
, to use in try-with-resource expressions. For example
try (AutoCloseable c = noAuditing()) {
// operation, for which auditing has to be silenced
copyPermissions(from, to);
}
AutoCloseable
, to use in try-with-resource expressionsAutoCloseable noAuditing(String summaryKey)
AutoCloseable
, to use in try-with-resource expressions. For example
try (AutoCloseable c = noAuditing(event)) {
// operation, for which auditing has to be silenced
copyPermissions(from, to);
}
summaryKey
- the summary key to NOT skip auditing forAutoCloseable
, to use in try-with-resource expressionsboolean skipAuditing()
true
if auditing has to be skipped in current thread, false
otherwise.true
if auditing has to be skipped in current thread, false
otherwise.boolean skipAuditing(@Nullable String summaryKey)
summaryKey
- if skipAuditing is true, but the this key matches the summary key, auditing will not be skipped.
Returns true
if auditing has to be skipped in current thread, false
otherwise.true
if auditing has to be skipped in current thread, false
otherwise.Copyright © 2003–2021 Atlassian. All rights reserved.