Class DelegatingAuditEventRepository

java.lang.Object
se.swedenconnect.spring.saml.idp.audit.repository.DelegatingAuditEventRepository
All Implemented Interfaces:
org.springframework.boot.actuate.audit.AuditEventRepository

public class DelegatingAuditEventRepository extends Object implements org.springframework.boot.actuate.audit.AuditEventRepository
A delegating AuditEventRepository that can be used to support multiple AuditEventRepository instances.

Note that when invoking find(String, Instant, String), the first installed repository will be tried, and if that repository returns an empty list, the next repository will be tried.

Author:
Martin Lindström
  • Constructor Summary

    Constructors
    Constructor
    Description
    DelegatingAuditEventRepository(List<org.springframework.boot.actuate.audit.AuditEventRepository> repositories)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(org.springframework.boot.actuate.audit.AuditEvent event)
    Adds the event to all installed repositories.
    List<org.springframework.boot.actuate.audit.AuditEvent>
    find(String principal, Instant after, String type)
    The first installed repository will be tried, and if that repository returns an empty list, the next repository will be tried, and so on.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DelegatingAuditEventRepository

      public DelegatingAuditEventRepository(List<org.springframework.boot.actuate.audit.AuditEventRepository> repositories)
      Constructor.
      Parameters:
      repositories - the underlying AuditEventRepository instances.
  • Method Details

    • add

      public void add(org.springframework.boot.actuate.audit.AuditEvent event)
      Adds the event to all installed repositories.
      Specified by:
      add in interface org.springframework.boot.actuate.audit.AuditEventRepository
    • find

      public List<org.springframework.boot.actuate.audit.AuditEvent> find(String principal, Instant after, String type)
      The first installed repository will be tried, and if that repository returns an empty list, the next repository will be tried, and so on.
      Specified by:
      find in interface org.springframework.boot.actuate.audit.AuditEventRepository