Table of Contents generated with DocToc
Migration Guide¶
The commercetools sync library uses the JVM-SDK-V2, therefore ensure you Install JVM SDK module commercetools-sdk-java-api
with
any HTTP client module. The default one is commercetools-http-client
.
Common Changes¶
Some utility methods aren't available in this version. Please make sure to replace these. Here's a list of changes:
- Removed utility methods:
// CollectionUtils public static <T> Set<T> emptyIfNull(@Nullable final Set<T> set)
// ShoppingListReferenceResolutionUtils public static ShoppingListQuery buildShoppingListQuery() { return ShoppingListQuery.of().plusExpansionPaths(ExpansionPath.of("lineItems[*].variant")); }
- Changed scope of utility method:
// CompletableFutureUtils private static <T, S, U extends Collection<CompletableFuture<S>>> U mapValuesToFutures( @Nonnull final Stream<T> values, @Nonnull final Function<T, CompletionStage<S>> mapper, @Nonnull final Collector<CompletableFuture<S>, ?, U> collector)
- Removed helper class:
ChannelCustomActionBuilder
// Included these methods public UpdateAction<Channel> buildRemoveCustomTypeAction( @Nullable final Integer variantId, @Nullable final String objectId); public UpdateAction<Channel> buildSetCustomTypeAction( @Nullable final Integer variantId, @Nullable final String objectId, @Nonnull final String customTypeId, @Nullable final Map<String, JsonNode> customFieldsJsonMap); public UpdateAction<Channel> buildSetCustomFieldAction( @Nullable final Integer variantId, @Nullable final String objectId, @Nullable final String customFieldName, @Nullable final JsonNode customFieldValue);