Class TmaCartItemValidator

java.lang.Object
de.hybris.platform.b2ctelcotmfwebservices.validators.TmaCartItemValidator
All Implemented Interfaces:
org.springframework.validation.Validator

public class TmaCartItemValidator extends Object implements org.springframework.validation.Validator
Validator for CartItem.
Since:
1907
  • Constructor Details

    • TmaCartItemValidator

      public TmaCartItemValidator(TmaPlaceValidator placeValidator)
  • Method Details

    • supports

      public boolean supports(Class<?> aClass)
      Specified by:
      supports in interface org.springframework.validation.Validator
    • validate

      public void validate(Object object, org.springframework.validation.Errors errors)
      Specified by:
      validate in interface org.springframework.validation.Validator
    • validateAddParameters

      protected void validateAddParameters(CartItem cartItem, org.springframework.validation.Errors errors)
      Checks if cart item is correct for adding a cartItem.
      Parameters:
      cartItem - the cart item
      errors - the errors found
    • validateModifyParameters

      protected void validateModifyParameters(CartItem cartItem, org.springframework.validation.Errors errors)
      Checks if cart item is correct for modifying a cartItem.
      Parameters:
      cartItem - the cart item
      errors - the errors found
    • validateDeleteParameters

      protected void validateDeleteParameters(CartItem cartItem, org.springframework.validation.Errors errors)
      Checks if cart item is correct for deleting a cartItem.
      Parameters:
      cartItem - the cart item
      errors - the errors found
    • validateAddSpo

      protected void validateAddSpo(CartItem cartItem, org.springframework.validation.Errors errors)
      Checks if SPO added to cart is correct.
      Parameters:
      cartItem - the cart item
      errors - the errors found
    • validateAddBpo

      protected void validateAddBpo(CartItem cartItem, org.springframework.validation.Errors errors)
      Checks if BPO added to cart is correct.
      Parameters:
      cartItem - the cart item
      errors - the errors found
    • validateChildCartItems

      protected void validateChildCartItems(List<CartItem> cartItems, org.springframework.validation.Errors errors)
    • validateQuantity

      protected void validateQuantity(Integer quantity, String fieldName, org.springframework.validation.Errors errors)
      Checks if the quantity of the cart item is correct.
      Parameters:
      quantity - the quantity of the cart item
      errors - the errors found
    • validatePlaces

      protected void validatePlaces(CartItem cartItem, org.springframework.validation.Errors errors)
      Checks that all the places on product are valid.
      Parameters:
      cartItem - the cart item
      errors - the errors found
    • validateActions

      protected void validateActions(CartItem cartItem, org.springframework.validation.Errors errors)
      Checks that the subscribed product and offering are correctly set for the action found on the cartItem.
      Parameters:
      cartItem - the input cartItem
      errors - the errors found
    • getPlaceValidator

      protected TmaPlaceValidator getPlaceValidator()