Class InventoryVendorNotificationHandler
- java.lang.Object
-
- com.broadleafcommerce.inventory.service.messaging.vendor.InventoryVendorNotificationHandler
-
- All Implemented Interfaces:
com.broadleafcommerce.common.messaging.PersistenceHandler
@DataRouteByKey("inventory") public class InventoryVendorNotificationHandler extends Object implements com.broadleafcommerce.common.messaging.PersistenceHandlerEvent listener that listens for a VendorCreationEvent and is responsible for setting up a new catalog for the vendor.- Author:
- Jon Fleschler (jfleschler), Jeff Fischer
-
-
Field Summary
Fields Modifier and Type Field Description static StringJPA_VENDOR_TYPE
-
Constructor Summary
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InventoryLocationRepository<com.broadleafcommerce.data.tracking.core.Trackable>getInventoryLocationRepo()protected InventoryLocationService<InventoryLocation>getInventoryLocationService()protected InventoryServicePropertiesgetInventoryProperties()protected com.broadleafcommerce.data.tracking.core.mapping.DomainMapperManagergetMapperManager()com.fasterxml.jackson.databind.ObjectMappergetObjectMapper()String[]getSupportedSimpleTypeNames()protected com.broadleafcommerce.common.extension.TypeFactorygetTypeFactory()protected AddressgetVendorAddress(com.fasterxml.jackson.databind.JsonNode entityJson)voidhook(String entityJson)voidprocessStateChange(com.fasterxml.jackson.databind.JsonNode entityJson)voidsetInventoryProperties(InventoryServiceProperties inventoryProperties)
-
-
-
Field Detail
-
JPA_VENDOR_TYPE
public static final String JPA_VENDOR_TYPE
- See Also:
- Constant Field Values
-
-
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:
hookin interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
processStateChange
public void processStateChange(com.fasterxml.jackson.databind.JsonNode entityJson)
- Specified by:
processStateChangein interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
getVendorAddress
protected Address getVendorAddress(com.fasterxml.jackson.databind.JsonNode entityJson)
-
getSupportedSimpleTypeNames
public String[] getSupportedSimpleTypeNames()
- Specified by:
getSupportedSimpleTypeNamesin interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
getInventoryLocationService
protected InventoryLocationService<InventoryLocation> getInventoryLocationService()
-
getInventoryLocationRepo
protected InventoryLocationRepository<com.broadleafcommerce.data.tracking.core.Trackable> getInventoryLocationRepo()
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
- Specified by:
getObjectMapperin interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-
getMapperManager
protected com.broadleafcommerce.data.tracking.core.mapping.DomainMapperManager getMapperManager()
-
getInventoryProperties
protected InventoryServiceProperties getInventoryProperties()
-
setInventoryProperties
@Autowired @Lazy public void setInventoryProperties(InventoryServiceProperties inventoryProperties)
-
-