Package com.atlassian.confluence.audit
Interface AuditingContext
-
- All Known Implementing Classes:
DefaultAuditingContext
public interface AuditingContextProvides a context to omit auditing for certain actions- Since:
- 7.8.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexecuteWithoutAuditing(Runnable operation)Executed operation with auditing being turned off for current threadAutoCloseablenoAuditing()This method provides convenientAutoCloseable, to use in try-with-resource expressions.AutoCloseablenoAuditing(String summaryKey)This method provides convenientAutoCloseable, to use in try-with-resource expressions.voidonlyAuditFor(String subjectKey, Runnable operation)Execute operation without auditing except for an event with given subjectKeybooleanskipAuditing()Returnstrueif auditing has to be skipped in current thread,falseotherwise.booleanskipAuditing(@Nullable String summaryKey)
-
-
-
Method Detail
-
executeWithoutAuditing
void executeWithoutAuditing(Runnable operation)
Executed operation with auditing being turned off for current thread- Parameters:
operation- operation which doesn't have to be audited
-
onlyAuditFor
void onlyAuditFor(String subjectKey, Runnable operation)
Execute operation without auditing except for an event with given subjectKey- Parameters:
subjectKey- Class of event to NOT skip auditing for.operation- operation which doesn't have to be audited
-
noAuditing
AutoCloseable noAuditing()
This method provides convenientAutoCloseable, to use in try-with-resource expressions. For exampletry (AutoCloseable c = noAuditing()) { // operation, for which auditing has to be silenced copyPermissions(from, to); }- Returns:
- convenient
AutoCloseable, to use in try-with-resource expressions
-
noAuditing
AutoCloseable noAuditing(String summaryKey)
This method provides convenientAutoCloseable, to use in try-with-resource expressions. For exampletry (AutoCloseable c = noAuditing(event)) { // operation, for which auditing has to be silenced copyPermissions(from, to); }- Parameters:
summaryKey- the summary key to NOT skip auditing for- Returns:
- convenient
AutoCloseable, to use in try-with-resource expressions
-
skipAuditing
boolean skipAuditing()
Returnstrueif auditing has to be skipped in current thread,falseotherwise.- Returns:
trueif auditing has to be skipped in current thread,falseotherwise.
-
skipAuditing
boolean skipAuditing(@Nullable String summaryKey)
- Parameters:
summaryKey- if skipAuditing is true, but the this key matches the summary key, auditing will not be skipped. Returnstrueif auditing has to be skipped in current thread,falseotherwise.- Returns:
trueif auditing has to be skipped in current thread,falseotherwise.
-
-