Class AbstractTypeFulfillmentGroupSubmitValidator

    • Method Detail

      • validate

        public void validate​(@NonNull
                             @NonNull Object target,
                             @NonNull
                             @NonNull org.springframework.validation.Errors errors,
                             @NonNull
                             @NonNull 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
      • shouldValidateAddress

        protected abstract boolean shouldValidateAddress​(Set<Object> hints)
        Tells whether this validator should validate the address or not.
        Parameters:
        hints - hints to use when determining whether or not to validate the address
        Returns:
        true to validate the address, false otherwise
      • validateAddress

        protected void validateAddress​(@NonNull
                                       @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group,
                                       @NonNull
                                       @NonNull org.springframework.validation.Errors errors,
                                       @NonNull
                                       @NonNull Set<Object> hints)
        Validates the address (if required by shouldValidateAddress(Set)).
        Parameters:
        group - the fulfillment group of which to validate the address
        errors - error container to place validation errors in
        hints - any hints to use during validation