Class CartActionAudit

java.lang.Object
com.broadleafcommerce.cart.client.domain.CartActionAudit
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class CartActionAudit extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
The domain used to record the actions taken against a cart Cart.

These records can be used to represent any action, but they're most commonly used to record the actions that various account members took against a B2B cart.

See Also:
  • Constructor Details

    • CartActionAudit

      public CartActionAudit()
  • Method Details

    • getId

      public String getId()
      The context ID of the cart action audit.
      Returns:
      the context ID of the cart action audit
    • getCartId

      public String getCartId()
      The ID of the cart this cart action audit was created after.
      Returns:
      the ID of the related cart
    • getActionType

      public String getActionType()
      The action type of this audit.
      Returns:
      the action type of this audit
      See Also:
    • getOldStatus

      public String getOldStatus()
      The old Cart.getStatus() prior the cart action in which this audit was created for.
      Returns:
      the old Cart.getStatus() prior the cart action in which this audit was created for.
      See Also:
    • getNewStatus

      public String getNewStatus()
      The new Cart.getStatus() after the cart action in which this audit was created for.

      For example, this field would be DefaultCartStatuses.REJECTED if the Cart was rejected.

      Returns:
      the new Cart.getStatus() after the cart action in which this audit was created for.
      See Also:
    • getUserType

      public String getUserType()
      The type of user who performed the cart action.

      For example, this could be an account approver.

      Returns:
      the type of user who performed the cart action
      See Also:
    • getUserId

      public String getUserId()
      The id of the user who performed the cart action.

      For example, this would be the id of the account approver who rejected the cart.

      Returns:
      the id of the user who performed the cart action
    • getUserEmail

      public String getUserEmail()
      The email of the user who performed the cart action.

      For example, this would be the email of the account approver who rejected the cart.

      Returns:
      the email of the user who performed the cart action
    • getComment

      public String getComment()
      A comment related to the audit
      Returns:
      te comment related to the audit
    • getTimestamp

      public Instant getTimestamp()
      The time at which the CartActionAudit was created
      Returns:
      the time at which the CartActionAudit was created
    • getData

      public Map<String,Object> getData()
      Additional or custom audit information
      Returns:
      additional or custom information
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The context ID of the cart action audit.
      Parameters:
      id - the context ID of the cart action audit
    • setCartId

      public void setCartId(String cartId)
      The ID of the cart this cart action audit was created after.
      Parameters:
      cartId - the ID of the related cart
    • setActionType

      public void setActionType(String actionType)
      The action type of this audit.
      Parameters:
      actionType - the action type of this audit
      See Also:
    • setOldStatus

      public void setOldStatus(String oldStatus)
      The old Cart.getStatus() prior the cart action in which this audit was created for.
      Parameters:
      oldStatus - the old Cart.getStatus() prior the cart action in which this audit was created for.
      See Also:
    • setNewStatus

      public void setNewStatus(String newStatus)
      The new Cart.getStatus() after the cart action in which this audit was created for.

      For example, this field would be DefaultCartStatuses.REJECTED if the Cart was rejected.

      Parameters:
      newStatus - the new Cart.getStatus() after the cart action in which this audit was created for
      See Also:
    • setUserType

      public void setUserType(String userType)
      The type of user who performed the cart action.

      For example, this could be an account approver.

      Parameters:
      userType - the type of user who performed the cart action
      See Also:
    • setUserId

      public void setUserId(String userId)
      The id of the user who performed the cart action.

      For example, this would be the id of the account approver who rejected the cart.

      Parameters:
      userId - the id of the user who performed the cart action
    • setUserEmail

      public void setUserEmail(String userEmail)
      The email of the user who performed the cart action.

      For example, this would be the email of the account approver who rejected the cart.

      Parameters:
      userEmail - the email of the user who performed the cart action
    • setComment

      public void setComment(String comment)
      A comment related to the audit
      Parameters:
      comment - the comment related to the audit
    • setTimestamp

      public void setTimestamp(Instant timestamp)
      The time at which the CartActionAudit was created
      Parameters:
      timestamp - the time at which the CartActionAudit was created
    • setData

      public void setData(Map<String,Object> data)
      Additional or custom audit information
      Parameters:
      data - additional or custom information
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • 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