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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TmaPlaceValidatorbooleanvoidprotected 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(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(Integer quantity, String fieldName, org.springframework.validation.Errors errors) Checks if the quantity of the cart item is correct.
-
Constructor Details
-
TmaCartItemValidator
-
-
Method Details
-
supports
- Specified by:
supportsin interfaceorg.springframework.validation.Validator
-
validate
- 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
Checks if SPO added to cart is correct.- Parameters:
cartItem- the cart itemerrors- the errors found
-
validateAddBpo
Checks if BPO added to cart is correct.- Parameters:
cartItem- the cart itemerrors- the errors found
-
validateChildCartItems
-
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 itemerrors- the errors found
-
validatePlaces
Checks that all the places on product are valid.- Parameters:
cartItem- the cart itemerrors- the errors found
-
validateActions
Checks that the subscribed product and offering are correctly set for the action found on the cartItem.- Parameters:
cartItem- the input cartItemerrors- the errors found
-
getPlaceValidator
-