Class CartActionAuditValidator
- java.lang.Object
 - 
- com.broadleafcommerce.cart.service.validation.CartActionAuditValidator
 
 
- 
- All Implemented Interfaces:
 com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
public class CartActionAuditValidator extends Object implements com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
Validator used to validateCartActionAudit.- Author:
 - Sunny Yu
 
 
- 
- 
Constructor Summary
Constructors Constructor Description CartActionAuditValidator() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CartService<com.broadleafcommerce.cart.client.domain.Cart>getCartService()Lazy injectedCartServicesince this service is itself a service component.protected StringprefixWithEntityValidationMessageKey(String errorCode)voidsetCartService(CartService<com.broadleafcommerce.cart.client.domain.Cart> cartService)Lazy injectedCartServicesince this service is itself a service component.booleansupports(Class<?> serviceClass, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)voidvalidate(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)protected voidvalidateActionType(@NonNull org.springframework.validation.Errors errors)protected voidvalidateCartExists(@NonNull com.broadleafcommerce.cart.client.domain.CartActionAudit cartActionAudit, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)protected voidvalidateCartId(@NonNull org.springframework.validation.Errors errors) 
 - 
 
- 
- 
Method Detail
- 
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 @NonNull Object businessInstance, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)- Specified by:
 validatein interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
 
- 
validateCartId
protected void validateCartId(@NonNull @NonNull org.springframework.validation.Errors errors) 
- 
validateActionType
protected void validateActionType(@NonNull @NonNull org.springframework.validation.Errors errors) 
- 
validateCartExists
protected void validateCartExists(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.CartActionAudit cartActionAudit, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) 
- 
prefixWithEntityValidationMessageKey
protected String prefixWithEntityValidationMessageKey(String errorCode)
 
- 
getCartService
protected CartService<com.broadleafcommerce.cart.client.domain.Cart> getCartService()
Lazy injectedCartServicesince this service is itself a service component.This avoids circular dependency exceptions
 
- 
setCartService
@Autowired @Lazy public void setCartService(CartService<com.broadleafcommerce.cart.client.domain.Cart> cartService)
Lazy injectedCartServicesince this service is itself a service component.This avoids circular dependency exceptions
 
 - 
 
 -