Class ProcessAssetsListener
java.lang.Object
com.broadleafcommerce.asset.messaging.ProcessAssetsListener
A listener that accepts triggered scheduled job events of type
JOB_TYPE
and updates the
attributes of all assets in the data store.- Author:
- Jon Fleschler (jfleschler)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AssetStorageUtils
static final String
protected final StorageProvider
protected final StorageService
-
Constructor Summary
ConstructorsConstructorDescriptionProcessAssetsListener
(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, AssetService<Asset> assetService, StorageProvider storageProvider, StorageService storageService, List<AssetDataRouteSupporting> routes) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.data.tracking.core.context.ContextInfo
buildContextInfo
(String applicationId, String tenantId) protected com.broadleafcommerce.data.tracking.core.context.ContextInfo
buildContextInfoForAsset
(Asset asset) protected AssetService<Asset>
protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService
protected int
getPageSize
(com.broadleafcommerce.common.messaging.domain.ScheduledJobRef scheduledJobRef) protected List<AssetDataRouteSupporting>
protected StorageProvider
protected StorageService
protected void
handleMessage
(org.springframework.messaging.Message<com.broadleafcommerce.common.messaging.domain.ScheduledJobRef> message) void
listen
(org.springframework.messaging.Message<com.broadleafcommerce.common.messaging.domain.ScheduledJobRef> message) Queries the data store for all assets and updates their attributes.
-
Field Details
-
JOB_TYPE
- See Also:
-
storageProvider
-
storageService
-
assetStorageUtils
-
-
Constructor Details
-
ProcessAssetsListener
public ProcessAssetsListener(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, AssetService<Asset> assetService, StorageProvider storageProvider, StorageService storageService, List<AssetDataRouteSupporting> routes)
-
-
Method Details
-
listen
@StreamListener("triggeredJobEventInputProcessAssets") public void listen(org.springframework.messaging.Message<com.broadleafcommerce.common.messaging.domain.ScheduledJobRef> message) Queries the data store for all assets and updates their attributes.- Parameters:
message
- a scheduled job trigger event - will only be handled if it has typeJOB_TYPE
-
handleMessage
protected void handleMessage(org.springframework.messaging.Message<com.broadleafcommerce.common.messaging.domain.ScheduledJobRef> message) -
getPageSize
protected int getPageSize(com.broadleafcommerce.common.messaging.domain.ScheduledJobRef scheduledJobRef) -
buildContextInfoForAsset
protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildContextInfoForAsset(Asset asset) -
buildContextInfo
-
getIdempotentConsumptionService
protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService getIdempotentConsumptionService() -
getAssetService
-
getStorageProvider
-
getStorageService
-
getRoutes
-