Class DefaultWebhookCacheService
java.lang.Object
de.hybris.platform.webhookservices.cache.DefaultWebhookCacheService
- All Implemented Interfaces:
WebhookCacheService
Default implementation of
WebhookCacheService-
Constructor Summary
ConstructorsConstructorDescriptionDefaultWebhookCacheService(@NotNull IntegrationCache<WebhookDeletedItemCacheKey, WebhookItemPayload> itemPayloadsCache, @NotNull IntegrationCache<WebhookDeletedItemCacheKey, ItemModel> deletedItemCache, @NotNull WebhookConfigurationService configurationService, @NotNull org.springframework.core.convert.converter.Converter<ItemModel, Set<WebhookItemConversion>> itemPayloadConverter) Instantiates a newWebhookCacheService -
Method Summary
Modifier and TypeMethodDescriptionvoidcacheDeletedItem(ItemModel item, InterceptorContext ctx) Cache deletedItemModelFindItemModelin deleted cachefindItemPayloads(PK pk) FindWebhookItemPayloadconverted from deletedItemModelin converted cache
-
Constructor Details
-
DefaultWebhookCacheService
public DefaultWebhookCacheService(@NotNull @NotNull IntegrationCache<WebhookDeletedItemCacheKey, WebhookItemPayload> itemPayloadsCache, @NotNull @NotNull IntegrationCache<WebhookDeletedItemCacheKey, ItemModel> deletedItemCache, @NotNull @NotNull WebhookConfigurationService configurationService, @NotNull @NotNull org.springframework.core.convert.converter.Converter<ItemModel, Set<WebhookItemConversion>> itemPayloadConverter) Instantiates a newWebhookCacheService- Parameters:
itemPayloadsCache- cache forWebhookItemPayloaddeletedItemCache- cache for deletedItemModelconfigurationService- to look upWebhookConfigurationModelitemPayloadConverter- to convertItemModelto set ofWebhookItemConversion
-
-
Method Details
-
findItemPayloads
Description copied from interface:WebhookCacheServiceFindWebhookItemPayloadconverted from deletedItemModelin converted cache- Specified by:
findItemPayloadsin interfaceWebhookCacheService- Parameters:
pk- PK of deletedItemModelto find- Returns:
- return
WebhookItemPayloadif found; otherwise returnsOptional.empty()
-
findItem
Description copied from interface:WebhookCacheServiceFindItemModelin deleted cache- Specified by:
findItemin interfaceWebhookCacheService- Type Parameters:
T- expected type of the item found- Parameters:
pk- PK of deletedItemModelto find- Returns:
- return
ItemModelif found; otherwise returnsOptional.empty()
-
cacheDeletedItem
Description copied from interface:WebhookCacheServiceCache deletedItemModel- Specified by:
cacheDeletedItemin interfaceWebhookCacheService- Parameters:
item- PK of deletedItemModelto cachectx- theInterceptorContext
-