Interface AuditService

All Known Implementing Classes:
AuditServiceImpl

public interface AuditService
Service abstraction for persisting and querying AuditEntry objects.

Implementations are responsible for storing audit entries and retrieving them using optional search criteria such as type or timestamp range.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of the MongoDB collection used to store audit entries.
  • Method Summary

    Modifier and Type
    Method
    Description
    findEntries(String type, Instant from, Instant to, org.springframework.data.domain.Pageable pageable)
    Retrieve stored audit entries.
    void
    saveEntry(AuditEntry auditEntry)
    Persist the provided audit entry.
  • Field Details

    • AUDIT_COLLECTION_NAME

      static final String AUDIT_COLLECTION_NAME
      Name of the MongoDB collection used to store audit entries.
      See Also:
  • Method Details

    • saveEntry

      void saveEntry(AuditEntry auditEntry)
      Persist the provided audit entry.
      Parameters:
      auditEntry - the entry to store
    • findEntries

      List<AuditEntry> findEntries(String type, Instant from, Instant to, org.springframework.data.domain.Pageable pageable)
      Retrieve stored audit entries.
      Parameters:
      type - optional entry type to filter by
      from - lower bound of the timestamp range (inclusive)
      to - upper bound of the timestamp range (inclusive)
      pageable - pagination information such as page number and size
      Returns:
      list of matching audit entries ordered by timestamp descending