public final class ProductTypeReferenceResolutionUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<io.sphere.sdk.producttypes.ProductTypeDraft> |
mapToProductTypeDrafts(java.util.List<io.sphere.sdk.producttypes.ProductType> productTypes,
ReferenceIdToKeyCache referenceIdToKeyCache)
Returns an
List<ProductTypeDraft> consisting of the results of applying
the mapping from ProductType to ProductTypeDraft with considering reference
resolution. |
@Nonnull
public static java.util.List<io.sphere.sdk.producttypes.ProductTypeDraft> mapToProductTypeDrafts(@Nonnull
java.util.List<io.sphere.sdk.producttypes.ProductType> productTypes,
@Nonnull
ReferenceIdToKeyCache referenceIdToKeyCache)
List<ProductTypeDraft> consisting of the results of applying
the mapping from ProductType to ProductTypeDraft with considering reference
resolution.
| Reference field | from | to |
|---|---|---|
| productType references (in case it has NestedType or set of NestedType) | Set<Reference<ProductType>> |
Set<Reference<ProductType>> (with key replaced with id field) |
Note:If some references are not expanded for an attributeDefinition of a productType,
the method will throw a ReferenceReplacementException containing the root causes of the
exceptions that occurred in any of the supplied productTypes.
productTypes - the product types with expanded references.referenceIdToKeyCache - the instance that manages cache.List of ProductTypeDraft built from the supplied List of
ProductType.