Class SkuInventoryReservationRequestValidator

java.lang.Object
com.broadleafcommerce.inventory.service.validation.SkuInventoryReservationRequestValidator
All Implemented Interfaces:
org.springframework.validation.Validator

public class SkuInventoryReservationRequestValidator extends Object implements org.springframework.validation.Validator
Class used to validate a SkuInventoryReservationRequest.
Author:
Nathan Moore (nathandmoore)
  • Constructor Details

    • SkuInventoryReservationRequestValidator

      public SkuInventoryReservationRequestValidator()
  • Method Details

    • supports

      public boolean supports(@NonNull @NonNull @NonNull Class<?> clazz)
      Specified by:
      supports in interface org.springframework.validation.Validator
    • validate

      public void validate(@NonNull @NonNull @NonNull Object target, @NonNull @NonNull @NonNull org.springframework.validation.Errors errors)
      Specified by:
      validate in interface org.springframework.validation.Validator
    • validate

      public void validate(@NonNull @NonNull @NonNull SkuInventoryReservationRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Validates the request. This method should throw an IllegalArgumentException or a ValidationException if there is a condition that does not pass validation.
      Parameters:
      request - SkuInventoryReservationRequest that was made and should be validated
      contextInfo - Context information around sandbox and multitenant state.
      Throws:
      com.broadleafcommerce.common.error.validation.ValidationException - if the request fails validation