Package com.atlassian.crowd.audit
Class AuditLogContextInternalImpl
java.lang.Object
com.atlassian.crowd.audit.AuditLogContextInternalImpl
- All Implemented Interfaces:
AuditLogContext
,AuditLogContextInternal
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
withAuditLogAuthor
(AuditLogAuthor author, AuditLogContextCallback<T> callback) Executes the callback on behalf of the specified author<T> T
withAuditLogSource
(AuditLogEventSource source, AuditLogContextCallback<T> callback) Executes the callback using the specified source for the events audited in the callback
-
Constructor Details
-
AuditLogContextInternalImpl
public AuditLogContextInternalImpl()
-
-
Method Details
-
getAuthor
- Specified by:
getAuthor
in interfaceAuditLogContextInternal
- Returns:
- the author currently stored in the context
-
getSource
- Specified by:
getSource
in interfaceAuditLogContextInternal
- Returns:
- the event source
-
withAuditLogAuthor
public <T> T withAuditLogAuthor(AuditLogAuthor author, AuditLogContextCallback<T> callback) throws Exception Description copied from interface:AuditLogContext
Executes the callback on behalf of the specified author- Specified by:
withAuditLogAuthor
in 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:AuditLogContext
Executes the callback using the specified source for the events audited in the callback- Specified by:
withAuditLogSource
in 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)
-