Class ExternalProductAssetProvider<T extends ProductAsset>
java.lang.Object
com.broadleafcommerce.dataexchange.service.provider.external.AbstractRestApiExternalProvider
com.broadleafcommerce.dataexchange.service.provider.external.ExternalProductAssetProvider<T>
- All Implemented Interfaces:
ProductAssetProvider<T>
public class ExternalProductAssetProvider<T extends ProductAsset>
extends AbstractRestApiExternalProvider
implements ProductAssetProvider<T>
-
Field Summary
Fields inherited from class com.broadleafcommerce.dataexchange.service.provider.external.AbstractRestApiExternalProvider
CONTENT_CONTEXT_HEADER
-
Constructor Summary
ConstructorsConstructorDescriptionExternalProductAssetProvider
(ExternalCatalogProviderProperties properties, com.fasterxml.jackson.databind.ObjectMapper mapper, org.springframework.web.reactive.function.client.WebClient webClient, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptioncreateProductAsset
(String productId, T asset, BatchContext<?> batchContext) protected String
readProductAssets
(String productId, BatchContext<?> batchContext) Fetch any assets associated with the supplied product id.saveTranslations
(String productId, String assetId, Locale locale, List<Translation> translations, BatchContext<?> batchContext) updateProductAsset
(String productId, T asset, BatchContext<?> batchContext) Methods inherited from class com.broadleafcommerce.dataexchange.service.provider.external.AbstractRestApiExternalProvider
buildAndNode, buildAndNode, buildEqualsNode, buildInNode, buildInNode, buildOrNode, buildOrNode, deleteRequest, deleteRequest, emptyNode, filterEmptyNodes, filterEmptyNodes, getHeaders, getMapper, getMostDerivedType, getRequest, getRequest, getTypeFactory, getWebClient, isEmptyNodeOrNull, narrowedPageParams, patchRequest, patchRequest, postRequest, postRequest, putRequest, putRequest, setCorrelationIds
-
Constructor Details
-
ExternalProductAssetProvider
public ExternalProductAssetProvider(ExternalCatalogProviderProperties properties, com.fasterxml.jackson.databind.ObjectMapper mapper, org.springframework.web.reactive.function.client.WebClient webClient, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
readProductAssets
Description copied from interface:ProductAssetProvider
Fetch any assets associated with the supplied product id.- Specified by:
readProductAssets
in interfaceProductAssetProvider<T extends ProductAsset>
- Parameters:
productId
- The product id.- Returns:
- The assets associated with the product.
-
createProductAsset
- Specified by:
createProductAsset
in interfaceProductAssetProvider<T extends ProductAsset>
-
updateProductAsset
- Specified by:
updateProductAsset
in interfaceProductAssetProvider<T extends ProductAsset>
-
saveTranslations
public List<Translation> saveTranslations(String productId, String assetId, Locale locale, List<Translation> translations, BatchContext<?> batchContext) - Specified by:
saveTranslations
in interfaceProductAssetProvider<T extends ProductAsset>
-
getServiceClient
- Specified by:
getServiceClient
in classAbstractRestApiExternalProvider
- Returns:
- Returns the service client name to be used for the request.
-
getProperties
-