Class AdminAuditEventDetail

java.lang.Object
com.broadleafcommerce.common.audit.domain.AdminAuditEventDetail
All Implemented Interfaces:
AuditEventDetail, Serializable

public class AdminAuditEventDetail extends Object implements Serializable, AuditEventDetail
Field-by-field detail information about changes to an entity. See AuditEventHeader. Generally only used when AuditEventHeader.getDetailType() is DetailType.CHANGE_DETAIL. Also supports the builder pattern by using AdminAuditEventDetail.builder().
See Also:
  • Constructor Details

    • AdminAuditEventDetail

      public AdminAuditEventDetail(@NonNull @NonNull String author, @NonNull @NonNull Instant timestamp, @Nullable String beforeRepresentation, @Nullable String afterRepresentation, @Nullable String repositoryField, @Nullable String projectionField, @Nullable String javaType, @Nullable String changeType, @Nullable String message, @Nullable Map<String,String> additionalAttributes)
  • Method Details

    • builder

    • getAuthor

      public String getAuthor()
      The author of the change. May be an admin user, or an identifier noting an automated system process.
      Specified by:
      getAuthor in interface AuditEventDetail
    • getTimestamp

      public Instant getTimestamp()
      The timestamp at which the field change took place
      Specified by:
      getTimestamp in interface AuditEventDetail
    • getBeforeRepresentation

      @Nullable public String getBeforeRepresentation()
      The value for the field before the change was made. Json representation. May be simple, or a more complex structure - like a list.
    • getAfterRepresentation

      @Nullable public String getAfterRepresentation()
      The value for the field after the change was made. Json representation. May be simple, or a more complex structure - like a list.
    • getRepositoryField

      @Nullable public String getRepositoryField()
      The name of the field on the repository domain. This is generally the name of a field in a JPA domain class.
    • getProjectionField

      @Nullable public String getProjectionField()
      The name of the field in a projection domain. This is generally the name of the field from domain serialized to and deserialized from JSON at the microservice endpoint API. Often this is the same as the repositoryField, but is not required to be.
    • getJavaType

      @Nullable public String getJavaType()
      The fully qualified classname of the Java type for this field.
    • getChangeType

      @Nullable public String getChangeType()
      The operation type that mutated this field value. Maps to OperationType.
    • getMessage

      @Nullable public String getMessage()
      Optional message included giving more information about the change. When included, usually noted by the admin user making the change.
    • getAdditionalAttributes

      @Nullable public Map<String,String> getAdditionalAttributes()
      Any additional information, possibly required in extension scenarios
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object