Class TmaOrderItemCreateValidator

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

public class TmaOrderItemCreateValidator extends Object implements org.springframework.validation.Validator
Validator for creation of a new OrderItem.
Since:
2205
  • Constructor Details

    • TmaOrderItemCreateValidator

      public TmaOrderItemCreateValidator(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
    • validateAction

      protected void validateAction(OrderItem orderItem, org.springframework.validation.Errors errors)
      Validate ActionType from the order item.
      Parameters:
      orderItem - the order item to be validate
      errors - the errors found
    • validateAddParameters

      protected void validateAddParameters(OrderItem orderItem, org.springframework.validation.Errors errors)
      Checks if the order item structure is correct for adding an order item.
      Parameters:
      orderItem - the order item to be validated
      errors - the errors found
    • validateChildCartItems

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

      protected void validateQuantity(OrderItem orderItem, org.springframework.validation.Errors errors)
      Checks if the quantity of the order item is correct.
      Parameters:
      orderItem - the order item for which the quantity is validated
      errors - the errors found
    • validatePlaces

      protected void validatePlaces(OrderItem orderItem, org.springframework.validation.Errors errors)
      Checks that all the places on product are valid.
      Parameters:
      orderItem - the order item to be checked
      errors - the errors found
    • getPlaceValidator

      protected TmaPlaceValidator getPlaceValidator()