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 Type
    Method
    Description
    <T> T
    withAuditLogAuthor(com.atlassian.crowd.audit.AuditLogAuthor author, AuditLogContextCallback<T> callback)
    Executes the callback on behalf of the specified author
    <T> T
    withAuditLogSource(com.atlassian.crowd.audit.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(com.atlassian.crowd.audit.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 operations
      callback - 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(com.atlassian.crowd.audit.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 auditing
      callback - the actions to perform with the specified source
      Returns:
      result of callback
      Throws:
      Exception - the exception thrown from the callback (if any)