Package com.atlassian.crowd.audit
Class NoOpAuditLogContext
java.lang.Object
com.atlassian.crowd.audit.NoOpAuditLogContext
- All Implemented Interfaces:
AuditLogContext
A no-op implementation of the audit log context that will execute the passed action. Applicable for products that
don't use Crowd's auditing capabilities.
- Since:
- 3.2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TwithAuditLogAuthor(AuditLogAuthor author, AuditLogContextCallback<T> callback) Executes the callback on behalf of the specified author<T> TwithAuditLogSource(AuditLogEventSource source, AuditLogContextCallback<T> callback) Executes the callback using the specified source for the events audited in the callback
-
Constructor Details
-
NoOpAuditLogContext
public NoOpAuditLogContext()
-
-
Method Details
-
withAuditLogAuthor
public <T> T withAuditLogAuthor(AuditLogAuthor author, AuditLogContextCallback<T> callback) throws Exception Description copied from interface:AuditLogContextExecutes the callback on behalf of the specified author- Specified by:
withAuditLogAuthorin interfaceAuditLogContext- Type Parameters:
T- Type of result of callback- Parameters:
author- author of operationscallback- the actions to perform with the specified author- Returns:
- result of callback
- Throws:
Exception- the exception thrown from the callback (if any)
-
withAuditLogSource
public <T> T withAuditLogSource(AuditLogEventSource source, AuditLogContextCallback<T> callback) throws Exception Description copied from interface:AuditLogContextExecutes the callback using the specified source for the events audited in the callback- Specified by:
withAuditLogSourcein interfaceAuditLogContext- Type Parameters:
T- Type of result of callback- Parameters:
source- the source to use when auditingcallback- the actions to perform with the specified source- Returns:
- result of callback
- Throws:
Exception- the exception thrown from the callback (if any)
-