java.lang.Object
com.broadleafcommerce.common.error.ApiError
com.broadleafcommerce.cartoperation.web.endpoint.exception.AddToCartApiError

public final class AddToCartApiError extends com.broadleafcommerce.common.error.ApiError
ApiError used for errors during CartItem validation.
Author:
Nathan Moore (nathandmoore)
  • Constructor Summary

    Constructors
    Constructor
    Description
    AddToCartApiError(@NonNull CartItemValidationException validationException)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    Map<String,List<com.broadleafcommerce.cart.client.domain.ConfigError>>
    Map of configuration errors for related to the item's CartItem#attributeChoices() that are derived from ProductOptions where the key is the attribute name.
    Map<String,List<com.broadleafcommerce.cart.client.domain.ConfigError>>
    Map of configuration errors for related to the item's CartItem.getDependentCartItems() where the key is the item's identifier such as ProductOption choiceKey.
    List<com.broadleafcommerce.cart.client.domain.ConfigError>
    List of global configuration errors for the CartItem
    int
     
     

    Methods inherited from class com.broadleafcommerce.common.error.ApiError

    addError, getException, getGlobalErrors, getStatus, getStatusCode, getTimestamp, getTitle, getType, setException, setTimestamp, toResponseEntity, withException, withGlobalErrors, withStatus, withStatusCode, withTimestamp, withTitle, withType

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getGlobalConfigErrors

      public List<com.broadleafcommerce.cart.client.domain.ConfigError> getGlobalConfigErrors()
      List of global configuration errors for the CartItem
      Returns:
      List of global configuration errors
    • getAttributeConfigErrors

      public Map<String,List<com.broadleafcommerce.cart.client.domain.ConfigError>> getAttributeConfigErrors()
      Map of configuration errors for related to the item's CartItem#attributeChoices() that are derived from ProductOptions where the key is the attribute name.
      Returns:
      Map of configuration errors for related to the item's CartItem#attributeChoices() that are derived from ProductOptions where the key is the attribute name.
    • getDependentItemConfigErrors

      public Map<String,List<com.broadleafcommerce.cart.client.domain.ConfigError>> getDependentItemConfigErrors()
      Map of configuration errors for related to the item's CartItem.getDependentCartItems() where the key is the item's identifier such as ProductOption choiceKey.
      Returns:
      Map of configuration errors for related to this item's the item's CartItem.getDependentCartItems().
    • 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 com.broadleafcommerce.common.error.ApiError