Class InventoryVendorNotificationHandler

  • All Implemented Interfaces:
    com.broadleafcommerce.common.messaging.PersistenceHandler

    @DataRouteByKey("inventory")
    public class InventoryVendorNotificationHandler
    extends Object
    implements com.broadleafcommerce.common.messaging.PersistenceHandler
    Event listener that listens for a VendorCreationEvent and is responsible for setting up a new catalog for the vendor.
    Author:
    Jon Fleschler (jfleschler), Jeff Fischer
    • Constructor Detail

      • InventoryVendorNotificationHandler

        public InventoryVendorNotificationHandler​(InventoryLocationService<InventoryLocation> inventoryLocationService,
                                                  InventoryLocationRepository<com.broadleafcommerce.data.tracking.core.Trackable> inventoryLocationRepo,
                                                  com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                                  com.broadleafcommerce.common.extension.TypeFactory typeFactory,
                                                  com.broadleafcommerce.data.tracking.core.mapping.DomainMapperManager mapperManager)
    • Method Detail

      • hook

        @StreamListener("vendorNotificationInputInventory")
        public void hook​(String entityJson)
        Specified by:
        hook in interface com.broadleafcommerce.common.messaging.PersistenceHandler
      • processStateChange

        public void processStateChange​(com.fasterxml.jackson.databind.JsonNode entityJson)
        Specified by:
        processStateChange in interface com.broadleafcommerce.common.messaging.PersistenceHandler
      • getVendorAddress

        protected Address getVendorAddress​(com.fasterxml.jackson.databind.JsonNode entityJson)
      • getSupportedSimpleTypeNames

        public String[] getSupportedSimpleTypeNames()
        Specified by:
        getSupportedSimpleTypeNames in interface com.broadleafcommerce.common.messaging.PersistenceHandler
      • getInventoryLocationRepo

        protected InventoryLocationRepository<com.broadleafcommerce.data.tracking.core.Trackable> getInventoryLocationRepo()
      • getObjectMapper

        public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
        Specified by:
        getObjectMapper in interface com.broadleafcommerce.common.messaging.PersistenceHandler
      • getTypeFactory

        protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
      • getMapperManager

        protected com.broadleafcommerce.data.tracking.core.mapping.DomainMapperManager getMapperManager()
      • setInventoryProperties

        @Autowired
        @Lazy
        public void setInventoryProperties​(InventoryServiceProperties inventoryProperties)