Class SkuInventoryValidator
- java.lang.Object
-
- com.broadleafcommerce.inventory.service.validation.SkuInventoryValidator
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
public class SkuInventoryValidator extends Object implements com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
Validator to validateSkuInventory
.- Author:
- Kelly Tisdell (ktisdell)
-
-
Constructor Summary
Constructors Constructor Description SkuInventoryValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InventoryLocationService<InventoryLocation>
getInventoryLocationService()
protected SkuInventoryService<SkuInventory>
getSkuInventoryService()
void
setInventoryLocationService(InventoryLocationService<InventoryLocation> inventoryLocationService)
void
setSkuInventoryService(SkuInventoryService<SkuInventory> skuInventoryService)
boolean
supports(Class<?> serviceClass, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
void
validate(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
void
validateForCreate(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
void
validateForReplace(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
void
validateForUpdate(@NonNull Object updatedBusinessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
protected void
validateInventoryLocation(@NonNull SkuInventory skuInventory, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
protected void
validateNoDuplicateSkuReferences(@NonNull SkuInventory skuInventory, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
protected void
validateQuantities(@NonNull SkuInventory skuInventory, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
protected void
validateSkuComponent(@NonNull SkuInventory skuInventory, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
-
-
Method Detail
-
setSkuInventoryService
@Autowired @Lazy public void setSkuInventoryService(SkuInventoryService<SkuInventory> skuInventoryService)
-
setInventoryLocationService
@Autowired @Lazy public void setInventoryLocationService(InventoryLocationService<InventoryLocation> inventoryLocationService)
-
supports
public boolean supports(Class<?> serviceClass, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
- Specified by:
supports
in 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:
validate
in interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validateForCreate
public void validateForCreate(@NonNull @NonNull Object businessInstance, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
- Specified by:
validateForCreate
in interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validateForUpdate
public void validateForUpdate(@NonNull @NonNull Object updatedBusinessInstance, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
- Specified by:
validateForUpdate
in interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validateForReplace
public void validateForReplace(@NonNull @NonNull Object businessInstance, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
- Specified by:
validateForReplace
in interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validateSkuComponent
protected void validateSkuComponent(@NonNull @NonNull SkuInventory skuInventory, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
validateQuantities
protected void validateQuantities(@NonNull @NonNull SkuInventory skuInventory, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
validateInventoryLocation
protected void validateInventoryLocation(@NonNull @NonNull SkuInventory skuInventory, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
validateNoDuplicateSkuReferences
protected void validateNoDuplicateSkuReferences(@NonNull @NonNull SkuInventory skuInventory, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
getInventoryLocationService
protected InventoryLocationService<InventoryLocation> getInventoryLocationService()
-
getSkuInventoryService
protected SkuInventoryService<SkuInventory> getSkuInventoryService()
-
-