Class DefaultPricedFulfillmentOptionSubmitValidator

java.lang.Object
com.broadleafcommerce.cartoperation.service.fulfillment.validation.option.DefaultPricedFulfillmentOptionSubmitValidator
All Implemented Interfaces:
FulfillmentValidator, PricedFulfillmentOptionSubmitValidator, org.springframework.validation.SmartValidator, org.springframework.validation.Validator

public class DefaultPricedFulfillmentOptionSubmitValidator extends Object implements PricedFulfillmentOptionSubmitValidator
  • Constructor Details

    • DefaultPricedFulfillmentOptionSubmitValidator

      public DefaultPricedFulfillmentOptionSubmitValidator()
  • Method Details

    • getSupportedClass

      public Class<?> getSupportedClass()
      Description copied from interface: FulfillmentValidator
      Gets the class that this validator supports.
      Specified by:
      getSupportedClass in interface FulfillmentValidator
      Returns:
      the class that this validator support
    • validate

      public void validate(Object target, org.springframework.validation.Errors errors, Set<Object> validationHints)
      Description copied from interface: FulfillmentValidator
      Validates the target.
      Specified by:
      validate in interface FulfillmentValidator
      Parameters:
      target - the target of the validation
      errors - an errors container to place rejections and pull values from
      validationHints - any hints that should be used during validation
    • validateWithDataHolder

      public void validateWithDataHolder(Object target, org.springframework.validation.Errors errors, Set<Object> validationHints, FulfillmentValidationDataHolder dataHolder)
      Description copied from interface: FulfillmentValidator
      Validates the target and uses FulfillmentValidationDataHolder parameter that can be used to hold some additional data needed for the validation.
      Specified by:
      validateWithDataHolder in interface FulfillmentValidator
      Parameters:
      target - the target of the validation
      errors - an errors container to place rejections and pull values from
      validationHints - any hints that should be used during validation
      dataHolder - the state holder that can be used to store some additional data required for validation
    • validateStaleFulfillmentOptions

      protected void validateStaleFulfillmentOptions(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup, @NonNull @NonNull org.springframework.validation.Errors errors, FulfillmentValidationDataHolder dataHolder)
    • validateStaleFulfillmentOptionsForItems

      protected void validateStaleFulfillmentOptionsForItems(@NonNull @NonNull List<com.broadleafcommerce.cart.client.domain.FulfillmentItem> fulfillmentItems, @NonNull @NonNull org.springframework.validation.Errors errors, FulfillmentValidationDataHolder dataHolder)
    • getFulfillmentOptionsForCart

      protected com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse getFulfillmentOptionsForCart(FulfillmentValidationDataHolder dataHolder)
    • supports

      public boolean supports(com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup)
      Specified by:
      supports in interface PricedFulfillmentOptionSubmitValidator
    • getFULFILLMENT_OPTIONS_FOR_CART_STATE_KEY

      protected static String getFULFILLMENT_OPTIONS_FOR_CART_STATE_KEY()
    • setFulfillmentOptionRequestService

      @Autowired public void setFulfillmentOptionRequestService(FulfillmentOptionRequestService fulfillmentOptionRequestService)
    • getFulfillmentOptionRequestService

      protected FulfillmentOptionRequestService getFulfillmentOptionRequestService()