Class NoOpAuditService

java.lang.Object
com.atlassian.crowd.manager.audit.NoOpAuditService
All Implemented Interfaces:
AuditService

public class NoOpAuditService extends Object implements AuditService
No-op implementation of AuditService, to be used by products embedding Crowd.
  • Constructor Details

    • NoOpAuditService

      public NoOpAuditService()
  • Method Details

    • saveAudit

      public void saveAudit(AuditLogChangeset changeset)
      Description copied from interface: AuditService
      Persists an audit log changeset. The timestamp will be set to the current time. Will not do anything when audit log is disabled.
      Specified by:
      saveAudit in interface AuditService
      Parameters:
      changeset - the changeset that will be persisted
    • searchAuditLog

      public List<AuditLogChangeset> searchAuditLog(AuditLogQuery query)
      Description copied from interface: AuditService
      Queries the audit log. Returns a List of AuditLogChangesets, which match the criteria specified in the query. The results will be sorted by the timestamp, descending.
      Specified by:
      searchAuditLog in interface AuditService
      Parameters:
      query - the search query
      Returns:
      List of AuditLogEntry matching the query
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface AuditService
      Returns:
      true if the audit log is enabled, false otherwise. A disabled audit log will not persist any new entries.
    • saveConfiguration

      public void saveConfiguration(AuditLogConfiguration auditLogConfiguration)
      Description copied from interface: AuditService
      Sets the new configuration for auditing
      Specified by:
      saveConfiguration in interface AuditService
      Parameters:
      auditLogConfiguration - new configuration
    • getConfiguration

      public AuditLogConfiguration getConfiguration()
      Description copied from interface: AuditService
      Returns current auditing configuration
      Specified by:
      getConfiguration in interface AuditService
      Returns:
      current configuration
    • shouldAuditEvent

      public boolean shouldAuditEvent()
      Description copied from interface: AuditService
      Allows the caller to determine whether it should attempt to generate audit events. Auditing might be disabled globally, or it might be disabled during specific operations or states (for example during synchronizations).
      Specified by:
      shouldAuditEvent in interface AuditService
      Returns:
      true if calling saveAudit() will persist the event, false otherwise