Interface AuditBackend

All Superinterfaces:
AuditAdmin, AuditBackend<LogEntry>, AuditLogger<LogEntry>, AuditReader<LogEntry>, Logs<LogEntry>
All Known Implementing Classes:
AbstractAuditBackend, MemAuditBackend, MongoDBAuditBackend, OpenSearchAuditBackend, SQLAuditBackend

public interface AuditBackend extends AuditBackend<LogEntry>
Since:
2025.0
  • Method Details

    • addLogEntries

      void addLogEntries(List<LogEntry> entries)
      Adds given log entries.
      Specified by:
      addLogEntries in interface AuditLogger<LogEntry>
      Parameters:
      entries - the list of log entries.
    • getEventsCount

      Long getEventsCount(String eventId)
      Specified by:
      getEventsCount in interface AuditAdmin
    • getLogEntryByID

      LogEntry getLogEntryByID(long id)
      Returns a given log entry given its id.
      Specified by:
      getLogEntryByID in interface AuditReader<LogEntry>
      Parameters:
      id - the log entry identifier
      Returns:
      a LogEntry instance
    • queryLogs

      LogEntryList queryLogs(QueryBuilder builder)
      Returns the logs given a collection of predicates and a default sort.
      Specified by:
      queryLogs in interface AuditReader<LogEntry>
      Parameters:
      builder - the query builder to fetch log entries
      Returns:
      a list of log entries
      Since:
      9.3
    • getLogEntriesFor

      default List<LogEntry> getLogEntriesFor(String uuid, String repositoryId)
      Returns the logs given a doc uuid and a repository id.
      Specified by:
      getLogEntriesFor in interface AuditReader<LogEntry>
      Parameters:
      uuid - the document uuid
      repositoryId - the repository id
      Returns:
      a list of log entries
      Since:
      8.4
    • getLatestLogId

      default long getLatestLogId(String repositoryId, String... eventIds)
      Returns the latest log id matching events and repository or 0 when no match found.
      Specified by:
      getLatestLogId in interface AuditReader<LogEntry>
      Since:
      9.3
    • hasCapability

      boolean hasCapability(AuditBackend.Capability capability)
      Checks whether the backend has the capability.