Interface IAuditManager

  • All Known Implementing Classes:
    AuditManager, DoNothingAuditManager

    public interface IAuditManager
    Interface for a manager that can handle audit items.
    Author:
    Philip Helger
    • Method Detail

      • isInMemory

        boolean isInMemory()
        Returns:
        true if this manager operates only in memory, false if it keeps persistent files.
        See Also:
        getBaseDir()
      • getBaseDir

        @Nullable
        String getBaseDir()
        Returns:
        The base directory used for audit entries. May be null to indicate in-memory only auditing. If the results is not null it must end with a path separator (slash).
        See Also:
        isInMemory()
      • getAuditor

        @Nonnull
        IAuditor getAuditor()
        Returns:
        The underlying auditor. Never null.
      • getLastAuditItems

        @Nonnull
        @ReturnsMutableCopy
        @CodingStyleguideUnaware
        List<IAuditItem> getLastAuditItems​(@Nonnegative
                                           int nMaxItems)
        Parameters:
        nMaxItems - The maximum number of items. Must be > 0.
        Returns:
        The n latest audit items. Never null.
      • stop

        void stop()
        Stop taking new audits. Call this upon shutdown for correct cleanup! Consecutive calls to this method have no further effect.
      • getEarliestAuditDate

        @Nullable
        LocalDate getEarliestAuditDate()
        Returns:
        The earliest date for which auditing information is present. If this is an in-memory audit manager, it must return the current date. May be null if a persistent storage is used and no entry is present yet.