Skip to content

Commit

Permalink
Adapt SDK-v2 compatible layer (#859)
Browse files Browse the repository at this point in the history
* test with compat layer

* style fix

* fix auth URL

* update sdkv2 to unwrap exceptions

* fix auth URL

* update sdkv2 to unwrap exceptions

* Add forkJoinPool

* Revert "Add forkJoinPool"

This reverts commit dd96726.

* Revert "update sdkv2 to unwrap exceptions"

This reverts commit a0e59a4.

* Upgrade SDK-v2 to v9.1.0

* Disable NotFoundExceptionMiddleware

* Add ForkJoinPool for ApiClient

* Revert "Disable NotFoundExceptionMiddleware"

This reverts commit 338c684.

* Skip ForkJoinPool in ClientConfigurationUtils

* Add ErrorMiddleware

* Add missing import

* Add CompactClientConfigurationUtils

* Change to ClientV2ConfigurationUtils

* Downgrade sdk-v2 version to 8.10.0 for testing purpose

* Fix format

* Use client from SDK-v2 version v8.10.0 to debug the build process

* Downgrade sdk-v2 to version 9.1.0

* Convert to Java 1.8 for debugging purpose

* Add ForkJoinPool for testing purpose

* Revert "Convert to Java 1.8 for debugging purpose"

This reverts commit a2deb95.

* Remove ForkJoinPool in ClientConfigurationUtils

* Fix style

* Fix integration test NPE in CartDiscountSyncIT and CategorySyncIT

* Revert "Fix integration test NPE in CartDiscountSyncIT and CategorySyncIT"

This reverts commit c479476.

* Fix CartDiscountSyncIT

* Fix CategorySyncIT

* Init ForkJoinPool to avoid occasionally suspension in build

* Revert "Fix CategorySyncIT"

This reverts commit e4fbfc7.

* Fix CustomObjectSyncIT

* Revert "Fix CustomObjectSyncIT"

This reverts commit db0fc02.

* Revert "Fix CartDiscountSyncIT"

This reverts commit c859202.

* Revert change in SphereClientUtils to make sure IT works for old SphereClient

* Implement ProductSyncWithSdkV2IT

* Fix compilation error

* Fix ProductSyncWithSdkV2IT

* Modify settings.gradle

* Modify settings.gradle

* Apply mavenCentral

* Fix Jcenter problem

* Assign external source of dependecy for spotless.gradle

* Add Product Sync Benchmark test for sdk-v2

* Add benchmarkCommit gradle task

* Add benchmark test temporarily in CI

* Refactor the ClientConfigurationUtils

* Add unit test for ClientV2ConfigurationUtils

* Disable ForkJoinPool creation

* Remove benchmark test in CI

* Update document

* Enable ForkJoinPool

* Disable ForkJoinPool

* Adapt SDK-v2 9.4.0

* Remove old SDK as dependency

* Update version number and write release notes

* Enable previous JVM SDK v2.9.0

* Update release notes

* Remove unused variables

* Disable repositories assignment in spotless.gradle

Co-authored-by: Jens Schulze <jens.schulze@commercetools.com>
Co-authored-by: King-Hin Leung <kinghin.leung@gmail.com>
Co-authored-by: King-Hin Leung <>
  • Loading branch information
3 people authored Nov 4, 2022
1 parent ebcb519 commit fa8e04f
Show file tree
Hide file tree
Showing 23 changed files with 1,582 additions and 37 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# commercetools sync
[![CI](https://github.com/commercetools/commercetools-sync-java/workflows/CI/badge.svg)](https://github.com/commercetools/commercetools-sync-java/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/commercetools/commercetools-sync-java/branch/master/graph/badge.svg)](https://codecov.io/gh/commercetools/commercetools-sync-java)
[![Benchmarks 9.0.3](https://img.shields.io/badge/Benchmarks-9.0.3-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
[![Download from Maven Central](https://img.shields.io/badge/Maven_Central-9.0.3-blue.svg)](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/9.0.3/jar)
[![Javadoc](https://javadoc.io/badge2/com.commercetools/commercetools-sync-java/javadoc.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/9.0.3/)
[![Benchmarks 9.1.0](https://img.shields.io/badge/Benchmarks-9.1.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
[![Download from Maven Central](https://img.shields.io/badge/Maven_Central-9.1.0-blue.svg)](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/9.1.0/jar)
[![Javadoc](https://javadoc.io/badge2/com.commercetools/commercetools-sync-java/javadoc.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/)
[![Known Vulnerabilities](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646/badge.svg)](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646)

More at https://commercetools.github.io/commercetools-sync-java
Expand All @@ -25,7 +25,7 @@ Supported resources: [Categories](/docs/usage/CATEGORY_SYNC.md), [Products](/doc
- [SBT](#sbt)
- [Ivy](#ivy)
- [Release Notes](/docs/RELEASE_NOTES.md)
- [Javadoc](https://commercetools.github.io/commercetools-sync-java/v/9.0.3/)
- [Javadoc](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/)
- [Benchmarks](https://commercetools.github.io/commercetools-sync-java/benchmarks/)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Expand Down Expand Up @@ -60,26 +60,26 @@ Here are the most popular ones:
<dependency>
<groupId>com.commercetools</groupId>
<artifactId>commercetools-sync-java</artifactId>
<version>9.0.3</version>
<version>9.1.0</version>
</dependency>
````

#### Gradle

````groovy
implementation 'com.commercetools:commercetools-sync-java:9.0.3'
implementation 'com.commercetools:commercetools-sync-java:9.1.0'
````

#### SBT

````
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "9.0.3"
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "9.1.0"
````

#### Ivy

````xml
<dependency org="com.commercetools" name="commercetools-sync-java" rev="9.0.3"/>
<dependency org="com.commercetools" name="commercetools-sync-java" rev="9.1.0"/>
````

**Note**: To avoid `commercetools JVM SDK` libraries version mismatch between projects.
Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ plugins {

ext{
commercetoolsJvmSdkVersion = '2.9.0'
commercetoolsJavaSdkV2Version = '9.4.0'
mockitoJunitJupiterVersion = '4.8.1'
jupiterApiVersion = '5.9.1'
assertjVersion = '3.23.1'
Expand Down Expand Up @@ -48,6 +49,8 @@ dependencies {
api "com.commercetools.sdk.jvm.core:commercetools-convenience:${commercetoolsJvmSdkVersion}"
implementation "com.github.ben-manes.caffeine:caffeine:${caffeineVersion}"
implementation "org.apache.commons:commons-text:${commonTextVersion}"
api "com.commercetools.sdk:commercetools-sdk-compat-v1:${commercetoolsJavaSdkV2Version}"
api "com.commercetools.sdk:commercetools-apachehttp-client:${commercetoolsJavaSdkV2Version}"
testImplementation "org.mockito:mockito-junit-jupiter:${mockitoJunitJupiterVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${jupiterApiVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${jupiterApiVersion}"
Expand Down
14 changes: 7 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# commercetools sync
[![CI](https://github.com/commercetools/commercetools-sync-java/workflows/CI/badge.svg)](https://github.com/commercetools/commercetools-sync-java/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/commercetools/commercetools-sync-java/branch/master/graph/badge.svg)](https://codecov.io/gh/commercetools/commercetools-sync-java)
[![Benchmarks 9.0.3](https://img.shields.io/badge/Benchmarks-9.0.3-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
[![Download from Maven Central](https://img.shields.io/badge/Maven_Central-9.0.3-blue.svg)](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/9.0.3/jar)
[![Javadoc](https://javadoc.io/badge2/com.commercetools/commercetools-sync-java/javadoc.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/9.0.3/)
[![Benchmarks 9.1.0](https://img.shields.io/badge/Benchmarks-9.1.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
[![Download from Maven Central](https://img.shields.io/badge/Maven_Central-9.1.0-blue.svg)](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/9.1.0/jar)
[![Javadoc](https://javadoc.io/badge2/com.commercetools/commercetools-sync-java/javadoc.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/)
[![Known Vulnerabilities](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646/badge.svg)](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646)


Expand Down Expand Up @@ -40,18 +40,18 @@ Here are the most popular ones:
<dependency>
<groupId>com.commercetools</groupId>
<artifactId>commercetools-sync-java</artifactId>
<version>9.0.3</version>
<version>9.1.0</version>
</dependency>
````
#### Gradle
````groovy
implementation 'com.commercetools:commercetools-sync-java:9.0.3'
implementation 'com.commercetools:commercetools-sync-java:9.1.0'
````
#### SBT
````
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "9.0.3"
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "9.1.0"
````
#### Ivy
````xml
<dependency org="com.commercetools" name="commercetools-sync-java" rev="9.0.3"/>
<dependency org="com.commercetools" name="commercetools-sync-java" rev="9.1.0"/>
````
16 changes: 16 additions & 0 deletions docs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@
7. Add Migration guide section which specifies explicitly if there are breaking changes and how to tackle them.
-->

### 9.1.0 - Nov 02, 2022
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/9.0.3...9.1.0) |
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/) |
[Jar](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/9.1.0/jar)
- 🐞 **Enhancement** (1)
- Java SDK-v2 Compatible layer adaption [#859](https://github.com/commercetools/commercetools-sync-java/pull/859)

- 🛠️ **Dependency Updates**
- Added `com.commercetools.sdk` [`9.4.0`](https://github.com/commercetools/commercetools-sdk-java-v2/releases/tag/9.4.0)
- Migrated `com.diffplug.spotless` plugin from `6.9.1` to [`6.11.0`](https://github.com/diffplug/spotless/releases/tag/gradle%2F6.11.0).
- Migrated `com.github.ben-manes.versions` `0.42.0` -> [`0.43.0`](https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.13)
- Migrated `com.github.spotbugs` `5.0.12` -> [`5.0.13`](https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.13)
- Migrated `commercetools-jvm-sdk` -> [2.9.0](https://github.com/commercetools/commercetools-jvm-sdk/releases/tag/v2.9.0)
- Migrated `org.apache.commons:common-text` `1.9` -> [`1.10`](https://commons.apache.org/proper/commons-text/changes-report.html#a1.10)
- Migrated `org.mockito:mockito-junit-jupiter` `4.7.0` -> [`4.8.1`](https://github.com/mockito/mockito/releases/tag/v4.8.1)

### 9.0.3 - Sep 22, 2022
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/9.0.2...9.0.3) |
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/9.0.3/) |
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/CART_DISCOUNT_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ against a [CartDiscountDraft](https://docs.commercetools.com/http-api-projects-c

#### SphereClient

Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.0.3/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.1.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

````java
Expand Down Expand Up @@ -67,7 +67,7 @@ Therefore, in order to resolve the actual ids of those references in the sync pr
##### Syncing from a commercetools project

When syncing from a source commercetools project, you can use [`toCartDiscountDrafts`](https://commercetools.github.io/commercetools-sync-java/v/9.0.3/com/commercetools/sync/cartdiscounts/utils/CartDiscountTransformUtils.html#toCartDiscountDrafts-java.util.List-)
When syncing from a source commercetools project, you can use [`toCartDiscountDrafts`](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/com/commercetools/sync/cartdiscounts/utils/CartDiscountTransformUtils.html#toCartDiscountDrafts-java.util.List-)
method that transforms(resolves by querying and caching key-id pairs) and maps from a `CartDiscount` to `CartDiscountDraft` using cache in order to make them ready for reference resolution by the sync, for example:

````java
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/CATEGORY_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ against a [CategoryDraft](https://docs.commercetools.com/http-api-projects-categ

#### SphereClient

Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.0.3/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.1.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

````java
Expand Down Expand Up @@ -135,7 +135,7 @@ As soon, as the referenced parent Category draft is supplied to the sync, the dr

##### Syncing from a commercetools project

When syncing from a source commercetools project, you can use [`toCategoryDrafts`](https://commercetools.github.io/commercetools-sync-java/v/9.0.3/com/commercetools/sync/categories/utils/CategoryTransformUtils.html#toCategoryDrafts-java.util.List-)
When syncing from a source commercetools project, you can use [`toCategoryDrafts`](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/com/commercetools/sync/categories/utils/CategoryTransformUtils.html#toCategoryDrafts-java.util.List-)
method that transforms(resolves by querying and caching key-id pairs) and maps from a `Category` to `CategoryDraft` using cache in order to make them ready for reference resolution by the sync, for example:

````java
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/CUSTOMER_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ against a [CustomerDraft](https://docs.commercetools.com/api/projects/customers#
### Prerequisites
#### SphereClient

Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.0.3/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.1.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

````java
Expand Down Expand Up @@ -69,7 +69,7 @@ Therefore, in order to resolve the actual ids of those references in the sync pr
##### Syncing from a commercetools project

When syncing from a source commercetools project, you can use [`toCustomerDrafts`](https://commercetools.github.io/commercetools-sync-java/v/9.0.3/com/commercetools/sync/customers/utils/CustomerTransformUtils.html#toCustomerDrafts-java.util.List-)
When syncing from a source commercetools project, you can use [`toCustomerDrafts`](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/com/commercetools/sync/customers/utils/CustomerTransformUtils.html#toCustomerDrafts-java.util.List-)
method that transforms(resolves by querying and caching key-id pairs) and maps from a `Customer` to `CustomerDraft` using cache in order to make them ready for reference resolution by the sync, for example:

````java
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/CUSTOM_OBJECT_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ against a [CustomObjectDraft](https://docs.commercetools.com/http-api-projects-c

#### SphereClient

Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.0.3/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.1.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

````java
Expand Down
11 changes: 10 additions & 1 deletion docs/usage/IMPORTANT_USAGE_TIPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ When creating a customized `SphereClient` the following remarks should be consid
If you have no special requirements on the sphere client creation, then you can use the `ClientConfigurationUtils#createClient`
util which applies the best practices for `SphereClient` creation.

As [next generation of JVM-SDK](http://commercetools.github.io/commercetools-sdk-java-v2) has been released, now we provide an overloading method for `ClientConfigurationUtils#createClient`
which makes use of JVM-SDK-V2 to apply the best practices for `SphereClient` creation. Meanwhile the original `ClientConfigurationUtils#createClient` is supporting the last generation of JVM-SDK to avoid breaking change.
```
public static SphereClient createClient(
@Nonnull final String projectKey,
@Nonnull final ClientCredentials clientCredentials,
@Nonnull final ServiceRegion serviceRegion) {
```
To understand how to initialize those method arguments, please refer to the [unit test](https://github.com/commercetools/commercetools-sync-java/blob/master/src/test/java/com/commercetools/sync/commons/utils/ClientV2ConfigurationUtilsTest.java#L20)

#### Tuning the Sync Process
The sync library is not meant to be executed in a parallel fashion. For example:
Expand All @@ -31,7 +40,7 @@ productSync.sync(batch1)
By design, scaling the sync process should **not** be done by executing the batches themselves in parallel. However, it can be done either by:

- Changing the number of [max parallel requests](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L116) within the `sphereClient` configuration. It defines how many requests the client can execute in parallel.
- or changing the draft [batch size](https://commercetools.github.io/commercetools-sync-java/v/9.0.3/com/commercetools/sync/commons/BaseSyncOptionsBuilder.html#batchSize-int-). It defines how many drafts can one batch contains.
- or changing the draft [batch size](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/com/commercetools/sync/commons/BaseSyncOptionsBuilder.html#batchSize-int-). It defines how many drafts can one batch contains.

The current overridable default [configuration](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) of the `sphereClient`
is the recommended good balance for stability and performance for the sync process.
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/INVENTORY_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ against a [InventoryEntryDraft](https://docs.commercetools.com/http-api-projects

#### SphereClient

Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.0.3/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.1.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

````java
Expand Down Expand Up @@ -68,7 +68,7 @@ Therefore, in order to resolve the actual ids of those references in the sync pr
##### Syncing from a commercetools project

When syncing from a source commercetools project, you can use [`toInventoryEntryDrafts`](https://commercetools.github.io/commercetools-sync-java/v/9.0.3/com/commercetools/sync/inventories/utils/InventoryTransformUtils.html#toInventoryEntryDrafts-java.util.List-)
When syncing from a source commercetools project, you can use [`toInventoryEntryDrafts`](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/com/commercetools/sync/inventories/utils/InventoryTransformUtils.html#toInventoryEntryDrafts-java.util.List-)
method that transforms(resolves by querying and caching key-id pairs) and maps from a `InventoryEntry` to `InventoryEntryDraft` using cache in order to make them ready for reference resolution by the sync, for example:

````java
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/PRODUCT_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ against a [ProductDraft](https://docs.commercetools.com/http-api-projects-produc

#### SphereClient

Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.0.3/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/9.1.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

````java
Expand Down Expand Up @@ -80,7 +80,7 @@ resource on the target commercetools project and the library will issue an updat

##### Syncing from a commercetools project

When syncing from a source commercetools project, you can use [`toProductDrafts`](https://commercetools.github.io/commercetools-sync-java/v/9.0.3/com/commercetools/sync/products/utils/ProductTransformUtils.html#toProductDrafts-java.util.List-)
When syncing from a source commercetools project, you can use [`toProductDrafts`](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/com/commercetools/sync/products/utils/ProductTransformUtils.html#toProductDrafts-java.util.List-)
method that transforms(resolves by querying and caching key-id pairs) and maps from a `Product` to `ProductDraft` using cache in order to make them ready for reference resolution by the sync, for example:

````java
Expand Down
Loading

0 comments on commit fa8e04f

Please sign in to comment.