Interface AuditWriterApi

  • All Known Subinterfaces:
    AieSystemAuditApi
    All Known Implementing Classes:
    MockIngestAuditApi

    public interface AuditWriterApi
    The AuditWriterApi allows for the creation of audit information about the processing of documents. Clients can then access this information via the AuditReaderApi. These interfaces work with the same data but are separated to allow for differing security and implementation.

    This is an early-access version of the API. Interfaces and classes are subject to change. Change list:

    • Cleanup methods
    • Index zone details

    $Revision$

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long audit​(AuditDetail audit)
      Writes the audit information to the store.
      long audit​(java.util.List<AuditDetail> audit)
      Writes a batch of audit information to the store.
      void clientHeartbeat​(java.util.UUID clientId)
      Updates the audit information to show that the client is still active so that the client will continue to be returned by AuditReaderApi.getActiveClients().
      void clientName​(java.util.UUID clientId, java.lang.String name)
      Sets a name to be associated with the client.
      void makeInactive​(java.util.UUID clientId)
      Marks the clientId as inactive.
      void purge​(java.util.Date start, java.util.Date end)
      Purges all audit data within the time range.
      void purge​(java.util.UUID clientId)
      Purges all audit data associated with the client ID.
      int purgeInactiveClients​(long lastInactiveTimeToKeep)
      Purges the audit data for all clients that are inactive and went inactive before lastInactiveTimeToKeep
    • Method Detail

      • audit

        long audit​(AuditDetail audit)
            throws AttivioException
        Writes the audit information to the store. After this call completes, the client referenced by the audit record will be active and will be returned by AuditReaderApi.getActiveClients().
        Parameters:
        audit -
        Returns:
        the sequence id for the audit record
        Throws:
        AttivioException - if the audit information could not be stored
      • audit

        long audit​(java.util.List<AuditDetail> audit)
            throws AttivioException
        Writes a batch of audit information to the store. After this call completes, the client referenced by the audit record will be active and will be returned by AuditReaderApi.getActiveClients(). Note, that if an exception is encountered while storing the audit information, the rest of the list will still be attempted to be stored. All exceptions encountered while persisting the list are returned with any exception after the first added as suppressed exceptions of the first.
        Parameters:
        audit -
        Returns:
        the sequence id for the last audit record in the list.
        Throws:
        AttivioException - if the audit information could not be stored
      • clientName

        void clientName​(java.util.UUID clientId,
                        java.lang.String name)
                 throws AttivioException
        Sets a name to be associated with the client. After calling this method, AuditReaderApi.getSummary(UUID) is guaranteed to return a non-null value with clientName and lastActionTime having the value of the set time.
        Parameters:
        clientId -
        name -
        Throws:
        AttivioException
      • purge

        void purge​(java.util.UUID clientId)
            throws AttivioException
        Purges all audit data associated with the client ID.
        Parameters:
        clientId - restricts results to clientId, null not allowed.
        Throws:
        AttivioException
      • purgeInactiveClients

        int purgeInactiveClients​(long lastInactiveTimeToKeep)
                          throws AttivioException
        Purges the audit data for all clients that are inactive and went inactive before lastInactiveTimeToKeep
        Parameters:
        lastInactiveTimeToKeep -
        Returns:
        number of clients that were purged
        Throws:
        AttivioException
      • purge

        void purge​(java.util.Date start,
                   java.util.Date end)
            throws AttivioException
        Purges all audit data within the time range.
        If start and end are both null, deletes all records and summary records. Otherwise, summary records are retained. If deleting individual summary records is required, use purge(UUID) instead
        Parameters:
        start - the inclusive start date.
        end - the exclusive end date.
        Throws:
        AttivioException