Class NoOpAuditLogContext

java.lang.Object
com.atlassian.crowd.audit.NoOpAuditLogContext
All Implemented Interfaces:
AuditLogContext

public class NoOpAuditLogContext extends Object implements 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 Details

    • NoOpAuditLogContext

      public NoOpAuditLogContext()
  • Method Details

    • 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 interface AuditLogContext
      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

      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 interface AuditLogContext
      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)