Class AuditEventHeader.AuditEventHeaderBuilder

java.lang.Object
com.broadleafcommerce.common.audit.domain.AuditEventHeader.AuditEventHeaderBuilder
Enclosing class:
AuditEventHeader

public static class AuditEventHeader.AuditEventHeaderBuilder extends Object
  • Method Details

    • timestamp

      public AuditEventHeader.AuditEventHeaderBuilder timestamp(Instant timestamp)
      The time at which the change was reported to the system. Required.
      Returns:
      this.
    • entityType

      public AuditEventHeader.AuditEventHeaderBuilder entityType(@Nullable String entityType)
      Fully qualified class name of the top-level entity being changed. Optional. For audit changes to a particular entity.
      Returns:
      this.
    • entityRef

      public AuditEventHeader.AuditEventHeaderBuilder entityRef(@Nullable String entityRef)
      Identifying reference to the entity. Usually a contextId for Trackable domain. Optional. For audit changes to a particular entity.
      Returns:
      this.
    • customerid

      public AuditEventHeader.AuditEventHeaderBuilder customerid(@Nullable String customerid)
      Identifier for a customer entity. Useful for identifying a customer related to the change. Optional. For audit events related to a customer.
      Returns:
      this.
    • accountid

      public AuditEventHeader.AuditEventHeaderBuilder accountid(@Nullable String accountid)
      Identifier for an account entity. Useful for identifying an account related to the change. Optional. For audit events related to an account.
      Returns:
      this.
    • tenantId

      The tenant to whom this audit record belongs. Required.
      Returns:
      this.
    • catalogId

      public AuditEventHeader.AuditEventHeaderBuilder catalogId(@Nullable String catalogId)
      The catalog to which this audit record belongs. Optional. For audit events related to a catalog discriminated entity.
      Returns:
      this.
    • applicationId

      public AuditEventHeader.AuditEventHeaderBuilder applicationId(@Nullable String applicationId)
      The application to which this audit record belongs. Optional. For audit events related to an application discriminated entity.
      Returns:
      this.
    • detailType

      public AuditEventHeader.AuditEventHeaderBuilder detailType(String detailType)
      The type of detail information associated with this audit event. See DetailType.
      Returns:
      this.
    • additionalAttributes

      public AuditEventHeader.AuditEventHeaderBuilder additionalAttributes(@Nullable Map<String,String> additionalAttributes)
      Any additional information, possibly required in extension scenarios. Optional.
      Returns:
      this.
    • retentionPeriod

      public AuditEventHeader.AuditEventHeaderBuilder retentionPeriod(@Nullable Duration retentionPeriod)
      Optional. The amount of time to keep this record in hot storage (i.e. searchable in AuditServices). If set, will override the default retention period defined in AuditServices. See com.broadleafcommerce.audit.env.AuditPruneProperties#retentionPeriod in AuditServices for the system default.
      Returns:
      this.
    • eventType

      public AuditEventHeader.AuditEventHeaderBuilder eventType(String eventType)
      In the case of Trackable entity change, The name of the top-level entity that changed, which is typically snake-cased and capitalized, i.e., "PRODUCT". Arbitrary audit events may use this field to represent the type of event. Required.
      Returns:
      this.
    • containerEventType

      public AuditEventHeader.AuditEventHeaderBuilder containerEventType(@Nullable String containerEventType)
      In the case of Trackable entity change, The name of the containing entity, which is typically snake-cased and capitalized, i.e., "PRODUCT". This is a grouping concept for correlating multiple related changes to a singular concept. For example, a marketing message change, which from the admin perspective looks like a change to an offer. Optional.
      Returns:
      this.
    • containerRef

      public AuditEventHeader.AuditEventHeaderBuilder containerRef(@Nullable String containerRef)
      Identifying reference to the containing entity. Usually a contextId for Trackable domain. Optional. See containerEventType.
      Returns:
      this.
    • primaryAuthor

      public AuditEventHeader.AuditEventHeaderBuilder primaryAuthor(@Nullable String primaryAuthor)
      The primary author of the change. Optional. For DetailType.CHANGE_DETAIL events, this field generally represents the approver of the overall entity change. See AuditEventDetail.getAuthor() for more specific ownership of field-level changes. For non-CHANGE_DETAIL events, this field represents the user driving the event.
      Returns:
      this.
    • secondaryAuthor

      public AuditEventHeader.AuditEventHeaderBuilder secondaryAuthor(@Nullable String secondaryAuthor)
      Any additional author for the change. Optional. For DetailType.CHANGE_DETAIL events, this field generally represents the user engaged the deployment. For non-CHANGE_DETAIL events, this field represents any CSR impersonating the primary author for the event.
      Returns:
      this.
    • build

      public AuditEventHeader build()
    • toString

      public String toString()
      Overrides:
      toString in class Object