Class AssetReferenceResolutionUtils


  • public final class AssetReferenceResolutionUtils
    extends java.lang.Object
    Util class which provides utilities that can be used when syncing resources from a source commercetools project to a target one.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<io.sphere.sdk.models.AssetDraft> mapToAssetDrafts​(java.util.List<io.sphere.sdk.models.Asset> assets)
      Takes an asset list that is supposed to have all its assets' custom references expanded in order to be able to fetch the keys for the custom references.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • mapToAssetDrafts

        @Nonnull
        public static java.util.List<io.sphere.sdk.models.AssetDraft> mapToAssetDrafts​(@Nonnull
                                                                                       java.util.List<io.sphere.sdk.models.Asset> assets)
        Takes an asset list that is supposed to have all its assets' custom references expanded in order to be able to fetch the keys for the custom references. This method returns as a result a List of AssetDraft that has all custom references with keys.

        Any custom reference that is not expanded will have its id in place and not replaced by the key.

        Parameters:
        assets - the list of assets to replace their custom ids with keys.
        Returns:
        a List of AssetDraft that has all channel references with keys.