Class TmaCartItemValidator
- java.lang.Object
-
- de.hybris.platform.b2ctelcotmfwebservices.validators.TmaCartItemValidator
-
- All Implemented Interfaces:
org.springframework.validation.Validator
public class TmaCartItemValidator extends java.lang.Object implements org.springframework.validation.ValidatorValidator forCartItem.- Since:
- 1907
-
-
Constructor Summary
Constructors Constructor Description TmaCartItemValidator(TmaPlaceValidator placeValidator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TmaPlaceValidatorgetPlaceValidator()booleansupports(java.lang.Class<?> aClass)voidvalidate(java.lang.Object object, org.springframework.validation.Errors errors)protected voidvalidateActions(CartItem cartItem, org.springframework.validation.Errors errors)Checks that the subscribed product and offering are correctly set for the action found on the cartItem.protected voidvalidateAddBpo(CartItem cartItem, org.springframework.validation.Errors errors)Checks if BPO added to cart is correct.protected voidvalidateAddParameters(CartItem cartItem, org.springframework.validation.Errors errors)Checks if cart item is correct for adding a cartItem.protected voidvalidateAddSpo(CartItem cartItem, org.springframework.validation.Errors errors)Checks if SPO added to cart is correct.protected voidvalidateChildCartItems(java.util.List<CartItem> cartItems, org.springframework.validation.Errors errors)protected voidvalidateDeleteParameters(CartItem cartItem, org.springframework.validation.Errors errors)Checks if cart item is correct for deleting a cartItem.protected voidvalidateModifyParameters(CartItem cartItem, org.springframework.validation.Errors errors)Checks if cart item is correct for modifying a cartItem.protected voidvalidatePlaces(CartItem cartItem, org.springframework.validation.Errors errors)Checks that all the places on product are valid.protected voidvalidateQuantity(java.lang.Integer quantity, java.lang.String fieldName, org.springframework.validation.Errors errors)Checks if the quantity of the cart item is correct.
-
-
-
Constructor Detail
-
TmaCartItemValidator
public TmaCartItemValidator(TmaPlaceValidator placeValidator)
-
-
Method Detail
-
supports
public boolean supports(java.lang.Class<?> aClass)
- Specified by:
supportsin interfaceorg.springframework.validation.Validator
-
validate
public void validate(java.lang.Object object, org.springframework.validation.Errors errors)- Specified by:
validatein interfaceorg.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 itemerrors- 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 itemerrors- 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 itemerrors- 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 itemerrors- 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 itemerrors- the errors found
-
validateChildCartItems
protected void validateChildCartItems(java.util.List<CartItem> cartItems, org.springframework.validation.Errors errors)
-
validateQuantity
protected void validateQuantity(java.lang.Integer quantity, java.lang.String fieldName, org.springframework.validation.Errors errors)Checks if the quantity of the cart item is correct.- Parameters:
quantity- the quantity of the cart itemerrors- 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 itemerrors- 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
-
getPlaceValidator
protected TmaPlaceValidator getPlaceValidator()
-
-