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 aSkuInventoryReservationRequest
.- Author:
- Nathan Moore (nathandmoore)
-
-
Constructor Summary
Constructors Constructor Description SkuInventoryReservationRequestValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
supports(@NonNull Class<?> clazz)
void
validate(@NonNull SkuInventoryReservationRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Validates the request.void
validate(@NonNull Object target, @NonNull org.springframework.validation.Errors errors)
-
-
-
Method Detail
-
supports
public boolean supports(@NonNull @NonNull @NonNull Class<?> clazz)
- Specified by:
supports
in interfaceorg.springframework.validation.Validator
-
validate
public void validate(@NonNull @NonNull @NonNull Object target, @NonNull @NonNull @NonNull org.springframework.validation.Errors errors)
- Specified by:
validate
in interfaceorg.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 anIllegalArgumentException
or aValidationException
if there is a condition that does not pass validation.- Parameters:
request
-SkuInventoryReservationRequest
that was made and should be validatedcontextInfo
- Context information around sandbox and multitenant state.- Throws:
com.broadleafcommerce.common.error.validation.ValidationException
- if therequest
fails validation
-
-