Class DefaultAuditingContext
java.lang.Object
com.atlassian.confluence.impl.audit.DefaultAuditingContext
- All Implemented Interfaces:
AuditingContext
- Since:
- 7.8.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeWithoutAuditing
(Runnable operation) Executed operation with auditing being turned off for current threadThis method provides convenientAutoCloseable
, to use in try-with-resource expressions.noAuditing
(String summaryKey) This method provides convenientAutoCloseable
, to use in try-with-resource expressions.void
onlyAuditFor
(String subjectKey, Runnable operation) Execute operation without auditing except for an event with given subjectKeyboolean
Returnstrue
if auditing has to be skipped in current thread,false
otherwise.boolean
skipAuditing
(@Nullable String summaryKey)
-
Constructor Details
-
DefaultAuditingContext
public DefaultAuditingContext()
-
-
Method Details
-
executeWithoutAuditing
Description copied from interface:AuditingContext
Executed operation with auditing being turned off for current thread- Specified by:
executeWithoutAuditing
in interfaceAuditingContext
- Parameters:
operation
- operation which doesn't have to be audited
-
onlyAuditFor
Description copied from interface:AuditingContext
Execute operation without auditing except for an event with given subjectKey- Specified by:
onlyAuditFor
in interfaceAuditingContext
- Parameters:
subjectKey
- Class of event to NOT skip auditing for.operation
- operation which doesn't have to be audited
-
noAuditing
Description copied from interface:AuditingContext
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); }
- Specified by:
noAuditing
in interfaceAuditingContext
- Returns:
- convenient
AutoCloseable
, to use in try-with-resource expressions
-
noAuditing
Description copied from interface:AuditingContext
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); }
- Specified by:
noAuditing
in interfaceAuditingContext
- Parameters:
summaryKey
- the summary key to NOT skip auditing for- Returns:
- convenient
AutoCloseable
, to use in try-with-resource expressions
-
skipAuditing
public boolean skipAuditing()Description copied from interface:AuditingContext
Returnstrue
if auditing has to be skipped in current thread,false
otherwise.- Specified by:
skipAuditing
in interfaceAuditingContext
- Returns:
true
if auditing has to be skipped in current thread,false
otherwise.
-
skipAuditing
- Specified by:
skipAuditing
in interfaceAuditingContext
- Parameters:
summaryKey
- if skipAuditing is true, but the this key matches the summary key, auditing will not be skipped. Returnstrue
if auditing has to be skipped in current thread,false
otherwise.- Returns:
true
if auditing has to be skipped in current thread,false
otherwise.
-