Interface ProductTypeTransformService
-
- All Known Implementing Classes:
ProductTypeTransformServiceImpl
public interface ProductTypeTransformService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.util.List<io.sphere.sdk.producttypes.ProductTypeDraft>>
toProductTypeDrafts(java.util.List<io.sphere.sdk.producttypes.ProductType> productTypes)
Transforms productTypes by resolving the references and map them to ProductTypeDrafts.
-
-
-
Method Detail
-
toProductTypeDrafts
@Nonnull java.util.concurrent.CompletableFuture<java.util.List<io.sphere.sdk.producttypes.ProductTypeDraft>> toProductTypeDrafts(@Nonnull java.util.List<io.sphere.sdk.producttypes.ProductType> productTypes)
Transforms productTypes by resolving the references and map them to ProductTypeDrafts.This method replaces the ids on attribute references with keys. It resolves(fetch key value for the reference id) the non-null unexpanded references in the productType
ProductType
by using a cache.If the reference ids are already cached, key values are pulled from the cache, otherwise it executes the query to fetch the key value for the reference id and store in the cache.
Then maps the ProductType to ProductTypeDraft by performing reference resolution considering idToKey value from the cache.
- Parameters:
productTypes
- the productTypes to replace the references and attributes ids with keys.- Returns:
- a new list which contains productTypeDrafts which have all their references and attributes references resolved and already replaced with keys.
-
-