public class DefaultFulfillmentGroupSubmitValidator extends Object implements FulfillmentGroupSubmitValidator
HINT_ALLOW_NO_ITEMS, HINT_ALLOW_NO_OPTION, HINT_PRICING_NOT_REQUIRED, HINT_SKIP_ITEM_VALIDATION, HINT_SKIP_OPTION_VALIDATION, HINT_SKIP_TYPE_SPECIFIC_VALIDATION| Constructor and Description |
|---|
DefaultFulfillmentGroupSubmitValidator(Set<TypeFulfillmentGroupSubmitValidator> typeValidators,
Set<FulfillmentItemSubmitValidator> itemValidators,
Set<FulfillmentOptionSubmitValidator> optionValidators) |
| Modifier and Type | Method and Description |
|---|---|
protected Set<FulfillmentItemSubmitValidator> |
getItemValidators() |
protected Set<FulfillmentOptionSubmitValidator> |
getOptionValidators() |
protected Set<String> |
getPricingFields() |
Class<?> |
getSupportedClass()
Gets the class that this validator supports.
|
protected Set<TypeFulfillmentGroupSubmitValidator> |
getTypeValidators() |
protected Set<String> |
pricingFields()
Produces a set of field names of pricing fields that should be validated.
|
void |
validate(@NonNull Object target,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the target.
|
protected void |
validateBase(@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates a fulfillment group at the top level, not considering nested or pricing fields.
|
protected void |
validateItems(@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the fulfillment items of the group.
|
protected void |
validateOptions(@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the fulfillment option on this group.
|
protected void |
validatePricing(@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the price fields on the fulfillment group (top-level only- does not consider
individual item prices).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic DefaultFulfillmentGroupSubmitValidator(Set<TypeFulfillmentGroupSubmitValidator> typeValidators, Set<FulfillmentItemSubmitValidator> itemValidators, Set<FulfillmentOptionSubmitValidator> optionValidators)
public Class<?> getSupportedClass()
FulfillmentValidatorgetSupportedClass in interface FulfillmentValidatorpublic void validate(@NonNull
@NonNull Object target,
@NonNull
@NonNull org.springframework.validation.Errors errors,
@NonNull
@NonNull Set<Object> hints)
FulfillmentValidatorvalidate in interface FulfillmentValidatortarget - the target of the validationerrors - an errors container to place rejections and pull values fromhints - any hints that should be used during validationprotected void validateBase(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group,
@NonNull
@NonNull org.springframework.validation.Errors errors,
@NonNull
@NonNull Set<Object> hints)
typeValidators to validate things that would be
specific to the fulfillment type being used.group - the fulfillment group to validateerrors - an error container to place validation errors inhints - any hints to use when validating the groupprotected void validatePricing(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group,
@NonNull
@NonNull org.springframework.validation.Errors errors,
@NonNull
@NonNull Set<Object> hints)
group - the fulfillment group to validateerrors - an error container to place validation errors inhints - any hints to use when validating the groupprotected void validateItems(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group,
@NonNull
@NonNull org.springframework.validation.Errors errors,
@NonNull
@NonNull Set<Object> hints)
itemValidators for the
actual validation.group - the fulfillment group to validateerrors - an error container to place validation errors inhints - any hints to use when validating the groupprotected void validateOptions(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group,
@NonNull
@NonNull org.springframework.validation.Errors errors,
@NonNull
@NonNull Set<Object> hints)
optionValidators.group - the fulfillment group to validateerrors - an error container to place validation errors inhints - any hints to use when validating the groupprotected Set<String> pricingFields()
protected Set<TypeFulfillmentGroupSubmitValidator> getTypeValidators()
protected Set<FulfillmentItemSubmitValidator> getItemValidators()
protected Set<FulfillmentOptionSubmitValidator> getOptionValidators()
Copyright © 2021. All rights reserved.