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 Details

    • 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.
  • 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 interface com.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 interface com.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 interface com.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 interface com.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()