Class FeeValidator
java.lang.Object
com.broadleafcommerce.pricing.service.validation.FeeValidator
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
public class FeeValidator
extends Object
implements com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
- Author:
- Julia Lopez-Pozas (jlopezpozas)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FeeService<Fee>protected booleanisNonNullNegative(BigDecimal decimal) protected StringprefixWithEntityValidationMessageKey(String errorCode) voidsetFeeService(FeeService<Fee> feeService) booleansupports(Class<?> serviceClass, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) voidvalidate(Object businessInstance, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected voidvalidateFeeCode(Fee fee, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected voidvalidateNonNullNonNegativeFee(Fee fee, org.springframework.validation.Errors errors) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
validateForCreate, validateForReplace, validateForUpdate
-
Constructor Details
-
FeeValidator
public FeeValidator()
-
-
Method Details
-
supports
public boolean supports(Class<?> serviceClass, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
supportsin interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validate
public void validate(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
validatein interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validateNonNullNonNegativeFee
-
validateFeeCode
protected void validateFeeCode(Fee fee, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
isNonNullNegative
-
prefixWithEntityValidationMessageKey
-
getFeeService
-
setFeeService
-