Class InventoryLocationValidator
- java.lang.Object
-
- com.broadleafcommerce.inventory.service.validation.InventoryLocationValidator
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
public class InventoryLocationValidator extends Object implements com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
Validates data forInventoryLocation
objects.- Author:
- Kelly Tisdell (ktisdell)
-
-
Field Summary
Fields Modifier and Type Field Description static Double
MAX_LATITUDE
Constant for the maximum possible latitude.static Double
MAX_LONGITUDE
Constant for the maximum possible longitude.static Double
MIN_LATITUDE
Constant for the minimum possible latitude.static Double
MIN_LONGIITUDE
Constant for the minimum possible longitude.
-
Constructor Summary
Constructors Constructor Description InventoryLocationValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InventoryLocationService<InventoryLocation>
getInventoryLocationService()
void
setInventoryLocationService(InventoryLocationService<InventoryLocation> inventoryLocationService)
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)
protected void
validateAddress(@NonNull InventoryLocation location, @NonNull org.springframework.validation.Errors errors)
protected void
validateForModification(@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 businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
protected void
validateLatLon(Address address, @NonNull org.springframework.validation.Errors errors)
-
-
-
Field Detail
-
MIN_LATITUDE
public static final Double MIN_LATITUDE
Constant for the minimum possible latitude.
-
MAX_LATITUDE
public static final Double MAX_LATITUDE
Constant for the maximum possible latitude.
-
MIN_LONGIITUDE
public static final Double MIN_LONGIITUDE
Constant for the minimum possible longitude.
-
MAX_LONGITUDE
public static final Double MAX_LONGITUDE
Constant for the maximum possible longitude.
-
-
Method Detail
-
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
-
validateForUpdate
public void validateForUpdate(@NonNull @NonNull Object businessInstance, @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
-
validateForModification
protected void validateForModification(@NonNull @NonNull Object businessInstance, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
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
-
validateAddress
protected void validateAddress(@NonNull @NonNull InventoryLocation location, @NonNull @NonNull org.springframework.validation.Errors errors)
-
validateLatLon
protected void validateLatLon(@Nullable Address address, @NonNull @NonNull org.springframework.validation.Errors errors)
-
getInventoryLocationService
protected InventoryLocationService<InventoryLocation> getInventoryLocationService()
-
-