Interface AuditLogChangeset

All Known Implementing Classes:
AssembledAuditLogChangeset, AuditLogChangesetEntity, ImmutableAuditLogChangeset

public interface AuditLogChangeset
Represents a set of changes that was saved in an audit log. Contains a changeset id and at least one entry
  • Method Details

    • getId

      Long getId()
      Returns:
      The changeset identifier
    • getTimestampInstant

      Instant getTimestampInstant()
      Returns:
      the creation date of the audit log entry
    • getAuthor

      AuditLogAuthor getAuthor()
      Returns:
      the information about the author of the audit log entry (exact semantic depends on the author type)
      Since:
      3.2.0
    • getAuthorType

      Deprecated.
      Use getAuthor()#} instead. Since 3.2.0.
      Returns:
      the type of the author of the audit log entry
    • getAuthorId

      @Deprecated @Nullable Long getAuthorId()
      Deprecated.
      Use getAuthor()#} instead. Since 3.2.0.
      Returns:
      the identifier of the author of the audit log entry (exact semantic depends on the author type)
    • getAuthorName

      @Deprecated @Nullable String getAuthorName()
      Deprecated.
      Use getAuthor()#} instead. Since 3.2.0.
      Returns the name of the author of the audit log entry. This is particularly useful when the author does not exist anymore
      Returns:
      the name of the author of the audit log entry
    • getEventType

      AuditLogEventType getEventType()
      Returns:
      information about the type of the event represented by this audit log entry
    • getEntity

      default Optional<AuditLogEntity> getEntity()
      Returns:
      • If the event did not have affected entities an empty optional will be returned
      • If the event affected only one entity then the object will be returned
      • If the event affected multiple entities then the entity marked as primary will be returned. If there are multiple entities marked as primary, then there are no guarantees which one of them will be returned.
      Since:
      3.2.0
    • getAdditionalEntities

      default List<AuditLogEntity> getAdditionalEntities()
      Will return additional objects affected by this audit event. Additional objects are all objects that are marked as non-primary.
      Returns:
      additional objects affected by this audit event
    • getEntityType

      @Nullable @Deprecated default AuditLogEntityType getEntityType()
      Deprecated.
      use the getEntities() instead
      Returns:
      the type of the object that was modified in the event represented by this audit log entry
    • getEntityId

      @Nullable @Deprecated default Long getEntityId()
      Deprecated.
      use the getEntities() instead
      Returns:
      the identifier of the object that was modified in the event represented by this audit log entry (exact semantic depends on the entity type)
    • getEntityName

      @Nullable @Deprecated default String getEntityName()
      Deprecated.
      use the getEntities() instead
      Returns the name of the object that was modified in the event represented by this audit log entry. This is particularly useful when the object does not exist anymore
      Returns:
      the name of the affected object at the time the event occurred
    • getIpAddress

      @Nullable String getIpAddress()
      Returns:
      the IP address of the entity which performed the auditable action
    • getEventMessage

      @Nullable String getEventMessage()
      Returns:
      custom message providing additional detail about the auditable event
    • getSource

      AuditLogEventSource getSource()
      Returns:
      the source of the auditable event (whether it was manual or changed by an automated process for example)
    • getEntries

      Collection<? extends AuditLogEntry> getEntries()
      Returns:
      the entries contained in the changeset
    • getEntities

      Collection<? extends AuditLogEntity> getEntities()
      Returns:
      the objects that were affected by the event reflected by the changeset