Interface ProductOptionValidationService

All Known Implementing Classes:
ProductOptionValidationServiceImpl

public interface ProductOptionValidationService
  • Method Details

    • validate

      Boolean validate(ProductOption productOption, String value)
    • validateProductOptionAttributes

      void validateProductOptionAttributes(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. A value that is not one of an enumerated option's allowed values is 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 against
      attributeValues - the submitted item attribute name/value pairs
    • isSubmitType

      boolean isSubmitType(ProductOption productOption)
    • hasProductOptionValidationStrategy

      boolean hasProductOptionValidationStrategy(ProductOption productOption)
    • isAddOrNoneType

      boolean isAddOrNoneType(ProductOption productOption)
    • validateWithoutException

      void validateWithoutException(ProductOption productOption, String attributeValue, ActivityMessages messages)
    • findSkuIdsForProductOptionValues

      List<Long> findSkuIdsForProductOptionValues(Long id, String key, String value, List<Long> possibleSkuIds)