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 for
InventoryLocation
objects.- Author:
- Kelly Tisdell (ktisdell)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected InventoryLocationService<InventoryLocation>
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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
validateForCreate
-
Field Details
-
MIN_LATITUDE
Constant for the minimum possible latitude. -
MAX_LATITUDE
Constant for the maximum possible latitude. -
MIN_LONGIITUDE
Constant for the minimum possible longitude. -
MAX_LONGITUDE
Constant for the maximum possible longitude.
-
-
Constructor Details
-
InventoryLocationValidator
public InventoryLocationValidator()
-
-
Method Details
-
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
-