Class OrderFulfillmentNoteValidator<P extends OrderFulfillmentNote>

    • Constructor Detail

      • OrderFulfillmentNoteValidator

        public OrderFulfillmentNoteValidator()
    • Method Detail

      • setOrderFulfillmentService

        @Autowired
        @Lazy
        public void setOrderFulfillmentService​(OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> orderFulfillmentService)
        Lazy injection since this validator is itself a service component. This avoids circular dependency exceptions.
        Parameters:
        orderFulfillmentService - the order fulfillment service
      • supports

        public boolean supports​(Class<?> serviceClass,
                                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​(Object businessInstance,
                             org.springframework.validation.Errors errors,
                             com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Specified by:
        validate in interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
      • validateExistingOrderFulfillment

        protected void validateExistingOrderFulfillment​(P orderFulfillmentNote,
                                                        org.springframework.validation.Errors errors,
                                                        com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Validates that the OrderFulfillment exists for the OrderFulfillmentNote.
        Parameters:
        orderFulfillmentNote - order fulfillment note to check if its fulfillment exists
        errors - holder for validation context information
        context - current context this validation is running in
      • prefixWithEntityValidationMessageKey

        protected String prefixWithEntityValidationMessageKey​(String errorCode)
      • getOrderFulfillmentService

        protected OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> getOrderFulfillmentService()