Class 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 validate SkuInventory.
    Author:
    Kelly Tisdell (ktisdell)
    • Constructor Detail

      • SkuInventoryValidator

        public SkuInventoryValidator()
    • Method Detail

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