Package com.atlassian.crowd.audit
Interface AuditLogContext
public interface AuditLogContext
Allows to run code with overridden default properties (such as the audit log author or source)
- Since:
- 3.2.0
-
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
-
Method Details
-
withAuditLogAuthor
<T> T withAuditLogAuthor(AuditLogAuthor author, AuditLogContextCallback<T> callback) throws Exception Executes the callback on behalf of the specified author- 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
<T> T withAuditLogSource(AuditLogEventSource source, AuditLogContextCallback<T> callback) throws Exception Executes the callback using the specified source for the events audited in the callback- 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)
-