Class AssembledAuditLogChangeset

java.lang.Object
com.atlassian.crowd.dao.audit.AssembledAuditLogChangeset
All Implemented Interfaces:
AuditLogChangeset

public class AssembledAuditLogChangeset extends Object implements AuditLogChangeset
Helper to build the final audit log changesets, from separately retrieved changesets, entries and entities Should avoid doing any extra queries (usually via collection/relationship traversal), and be implemented using pre-fetched data instead.
  • Constructor Details

  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface AuditLogChangeset
      Returns:
      The changeset identifier
    • getTimestampInstant

      public Instant getTimestampInstant()
      Specified by:
      getTimestampInstant in interface AuditLogChangeset
      Returns:
      the creation date of the audit log entry
    • getAuthor

      public AuditLogAuthor getAuthor()
      Specified by:
      getAuthor in interface AuditLogChangeset
      Returns:
      the information about the author of the audit log entry (exact semantic depends on the author type)
    • getAuthorType

      @Deprecated public AuditLogAuthorType getAuthorType()
      Deprecated.
      Specified by:
      getAuthorType in interface AuditLogChangeset
      Returns:
      the type of the author of the audit log entry
    • getAuthorId

      @Deprecated @Nullable public Long getAuthorId()
      Deprecated.
      Specified by:
      getAuthorId in interface AuditLogChangeset
      Returns:
      the identifier of the author of the audit log entry (exact semantic depends on the author type)
    • getAuthorName

      @Deprecated @Nullable public String getAuthorName()
      Deprecated.
      Description copied from interface: AuditLogChangeset
      Returns the name of the author of the audit log entry. This is particularly useful when the author does not exist anymore
      Specified by:
      getAuthorName in interface AuditLogChangeset
      Returns:
      the name of the author of the audit log entry
    • getEventType

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

      public Optional<AuditLogEntity> getEntity()
      Specified by:
      getEntity in interface AuditLogChangeset
      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.
    • getAdditionalEntities

      public List<AuditLogEntity> getAdditionalEntities()
      Description copied from interface: AuditLogChangeset
      Will return additional objects affected by this audit event. Additional objects are all objects that are marked as non-primary.
      Specified by:
      getAdditionalEntities in interface AuditLogChangeset
      Returns:
      additional objects affected by this audit event
    • getEntityType

      @Nullable @Deprecated public AuditLogEntityType getEntityType()
      Deprecated.
      Specified by:
      getEntityType in interface AuditLogChangeset
      Returns:
      the type of the object that was modified in the event represented by this audit log entry
    • getEntityId

      @Nullable @Deprecated public Long getEntityId()
      Deprecated.
      Specified by:
      getEntityId in interface AuditLogChangeset
      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 public String getEntityName()
      Deprecated.
      Description copied from interface: AuditLogChangeset
      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
      Specified by:
      getEntityName in interface AuditLogChangeset
      Returns:
      the name of the affected object at the time the event occurred
    • getIpAddress

      @Nullable public String getIpAddress()
      Specified by:
      getIpAddress in interface AuditLogChangeset
      Returns:
      the IP address of the entity which performed the auditable action
    • getEventMessage

      @Nullable public String getEventMessage()
      Specified by:
      getEventMessage in interface AuditLogChangeset
      Returns:
      custom message providing additional detail about the auditable event
    • getSource

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

      public Collection<AuditLogEntryEntity> getEntries()
      Specified by:
      getEntries in interface AuditLogChangeset
      Returns:
      the entries contained in the changeset
    • getEntities

      public Collection<AuditLogEntityEntity> getEntities()
      Specified by:
      getEntities in interface AuditLogChangeset
      Returns:
      the objects that were affected by the event reflected by the changeset