public final class AssetReferenceResolutionUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.List<io.sphere.sdk.models.AssetDraft> |
mapToAssetDrafts(java.util.List<io.sphere.sdk.models.Asset> assets,
ReferenceIdToKeyCache referenceIdToKeyCache)
Takes an asset list that is supposed to have all its asset's custom references id's are cached
in the map in order to be able to fetch the keys for the custom references.
|
@Nonnull public static java.util.List<io.sphere.sdk.models.AssetDraft> mapToAssetDrafts(@Nonnull java.util.List<io.sphere.sdk.models.Asset> assets, @Nonnull ReferenceIdToKeyCache referenceIdToKeyCache)
List
of AssetDraft
that has all custom references with keys.
Any custom reference that is not in the map(cache) will have its id in place and not replaced by the key.
assets
- the list of assets to replace their custom ids with keys.referenceIdToKeyCache
- the instance that manages cache.List
of AssetDraft
that has all channel references with keys.