Interface ProductOptionValidationService
- All Known Implementing Classes:
ProductOptionValidationServiceImpl
public interface ProductOptionValidationService
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasProductOptionValidationStrategy(ProductOption productOption) booleanisAddOrNoneType(ProductOption productOption) booleanisSubmitType(ProductOption productOption) validate(ProductOption productOption, String value) voidvalidateProductOptionAttributes(Product product, Map<String, String> attributeValues) For each submitted attribute that corresponds to a product option on the product, validates that the submitted value is one the option allows.voidvalidateWithoutException(ProductOption productOption, String attributeValue, ActivityMessages messages)
-
Method Details
-
validate
-
validateProductOptionAttributes
For each submitted attribute that corresponds to a product option on the product, validates that the submitted value is one the option allows. A value that is not one of an enumerated option'sallowed valuesis rejected. Non-enumerated option types (free entry, e.g. text or date) are excluded, since their value is not chosen from a list. An attribute that does not match a product option is left alone, since order item attributes are a generic key-value store also used for custom, non-option attributes.- Parameters:
product- the product the attributes are being validated againstattributeValues- the submitted item attribute name/value pairs
-
isSubmitType
-
hasProductOptionValidationStrategy
-
isAddOrNoneType
-
validateWithoutException
void validateWithoutException(ProductOption productOption, String attributeValue, ActivityMessages messages) -
findSkuIdsForProductOptionValues
-