Skip to content

Commit 5df3baf

Browse files
committed
Replace todo links in docs
1 parent b366998 commit 5df3baf

File tree

10 files changed

+81
-83
lines changed

10 files changed

+81
-83
lines changed

docs/usage/CATEGORY_SYNC.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ against a [CategoryDraft](https://docs.commercetools.com/api/projects/categories
4141

4242
#### ProjectApiRoot
4343

44-
Use the [ClientConfigurationUtils](#todo) which apply the best practices for `ProjectApiRoot` creation.
45-
To create `ClientCredentials` which are required for creating a client please use the `ClientCredentialsBuilder` provided in java-sdk-v2 [Client OAUTH2 package](#todo)
44+
Use the [ClientConfigurationUtils](/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java) which apply the best practices for `ProjectApiRoot` creation.
45+
To create `ClientCredentials` which are required for creating a client please use the `ClientCredentialsBuilder` provided in java-sdk-v2 [Client OAUTH2 package](https://github.com/commercetools/commercetools-sdk-java-v2/blob/main/rmf/rmf-java-base/src/main/java/io/vrap/rmf/base/client/oauth2/ClientCredentialsBuilder.java)
4646
If you have custom requirements for the client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).
4747

4848
````java
@@ -145,7 +145,7 @@ As soon, as the referenced parent Category Draft is supplied to the sync, the Ca
145145

146146
##### Syncing from a commercetools project
147147

148-
When syncing from a source commercetools project, you can use [`toCategoryDrafts`](#todo)
148+
When syncing from a source commercetools project, you can use [`toCategoryDrafts`](/src/main/java/com/commercetools/sync/categories/utils/CategoryTransformUtils.java)
149149
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:
150150

151151
````java
@@ -161,8 +161,8 @@ final List<Categories> categories = QueryUtils.queryAll(byProjectKeyCategoriesGe
161161
````
162162

163163
In order to transform and map the `Category` to `CategoryDraft`,
164-
Utils method `toCategoryDrafts` requires `projectApiRoot`, implementation of [`ReferenceIdToKeyCache`](#todo) and `categories` as parameters.
165-
For cache implementation, You can use your own cache implementation or use the class in the library - which implements the cache using caffeine library with an LRU (Least Recently Used) based cache eviction strategy[`CaffeineReferenceIdToKeyCacheImpl`](#todo).
164+
Utils method `toCategoryDrafts` requires `projectApiRoot`, implementation of [`ReferenceIdToKeyCache`](/src/main/java/com/commercetools/sync/commons/utils/ReferenceIdToKeyCache.java) and `categories` as parameters.
165+
For cache implementation, You can use your own cache implementation or use the class in the library - which implements the cache using caffeine library with an LRU (Least Recently Used) based cache eviction strategy[`CaffeineReferenceIdToKeyCacheImpl`](/src/main/java/com/commercetools/sync/commons/utils/CaffeineReferenceIdToKeyCacheImpl.java).
166166
Example as shown below:
167167

168168
````java
@@ -343,8 +343,8 @@ __Note__ The statistics object contains the processing time of the last batch on
343343

344344
##### More examples of how to use the sync
345345

346-
1. [Sync from another CTP project as a source](#todo).
347-
2. [Sync from an external source](#todo).
346+
1. [Sync from another CTP project as a source](/src/integration-test/java/com/commercetools/sync/integration/ctpprojectsource/categories/CategorySyncIT.java).
347+
2. [Sync from an external source](/src/integration-test/java/com/commercetools/sync/integration/externalsource/categories/CategorySyncIT.java).
348348

349349
*Make sure to read the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md) for optimal performance.*
350350

@@ -355,18 +355,17 @@ A utility method provided by the library to compare a Category with a new Catego
355355
final List<CategoryUpdateAction> updateActions = CategorySyncUtils.buildActions(category, categoryDraft, categorySyncOptions);
356356
```
357357

358-
Examples of its usage can be found in the tests
359-
[here](#todo).
358+
Examples of its usage can be found in the tests [here](/src/test/java/com/commercetools/sync/categories/utils/CategorySyncUtilsTest.java).
360359

361360

362361
### Build particular update action(s)
363362

364363
Utility methods provided by the library to compare the specific fields of a Category and a new CategoryDraft, and in turn, build
365364
the update action. One example is the `buildChangeNameUpdateAction` which compares names:
366365
````java
367-
final Optional<CategoryUpdateAction> updateAction = buildChangeNameUpdateAction(oldCategory, categoryDraft);
366+
final Optional<CategoryUpdateAction> updateAction = CategoryUpdateActionUtils.buildChangeNameUpdateAction(oldCategory, categoryDraft);
368367
````
369-
More examples of those utils for different fields can be found [here](#todo).
368+
More examples of those utils for different fields can be found [here](/src/test/java/com/commercetools/sync/categories/utils/CategoryUpdateActionUtilsTest.java).
370369

371370
## Migration Guide
372371

@@ -396,14 +395,14 @@ any HTTP client module. The default one is `commercetools-http-client`.
396395

397396
### Client configuration and creation
398397

399-
For client creation use [ClientConfigurationUtils](#todo) which apply the best practices for `ProjectApiRoot` creation.
398+
For client creation use [ClientConfigurationUtils](/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java) which apply the best practices for `ProjectApiRoot` creation.
400399
If you have custom requirements for the client creation make sure to replace `SphereClientFactory` with `ApiRootBuilder` as described in this [Migration Document](https://docs.commercetools.com/sdk/java-sdk-migrate#client-configuration-and-creation).
401400

402401
### Signature of CategorySyncOptions
403402

404403
As models and update actions have changed in the JVM-SDK-V2 the signature of SyncOptions is different. It's constructor now takes a `ProjectApiRoot` as first argument. The callback functions are signed with `CategoryDraft`, `Category` and `CategoryUpdateAction` from `package com.commercetools.api.models.category.*`
405404

406-
> Note: Type `UpdateAction<Category>` has changed to `CategoryUpdateAction`. Make sure you create and supply a specific CategoryUpdateAction in `beforeUpdateCallback`. For that you can use the [library-utilities](#todo) or use a JVM-SDK builder ([see also](https://docs.commercetools.com/sdk/java-sdk-migrate#update-resources)):
405+
> Note: Type `UpdateAction<Category>` has changed to `CategoryUpdateAction`. Make sure you create and supply a specific CategoryUpdateAction in `beforeUpdateCallback`. For that you can use the [library-utilities](/src/main/java/com/commercetools/sync/categories/utils/CategorySyncUtils.java) or use a JVM-SDK builder ([see also](https://docs.commercetools.com/sdk/java-sdk-migrate#update-resources)):
407406
408407
```java
409408
// Example: Create a category update action to change name taking the 'newName' of the categoryDraft
@@ -448,7 +447,7 @@ For more information, see the [Guide to replace DraftBuilders](https://docs.comm
448447

449448
### Query for Categories (syncing from CTP project)
450449

451-
If you sync categories between different commercetools projects you probably use [CategoryTransformUtils#toCategoryDrafts](#todo) to transform `Category` into `CategoryDraft` which can be used by the category-sync.
450+
If you sync categories between different commercetools projects you probably use [CategoryTransformUtils#toCategoryDrafts](/src/main/java/com/commercetools/sync/categories/utils/CategoryTransformUtils.java) to transform `Category` into `CategoryDraft` which can be used by the category-sync.
452451
However, if you need to query `Categories` from a commercetools project instead of passing `CategoryQuery`s to a `sphereClient`, create (and execute) requests directly from the `apiRoot`.
453452
Here's an example:
454453

docs/usage/CUSTOMER_SYNC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ During the sync process, if a customer draft should be created, this callback ca
200200

201201
* customer draft that should be created
202202

203-
Please refer to the [example in the product sync document](https://github.com/commercetools/commercetools-sync-java/blob/master/docs/usage/PRODUCT_SYNC.md#example-set-publish-stage-if-category-references-of-given-product-draft-exists).
203+
Please refer to the [example in the product sync document](./PRODUCT_SYNC.md#example-set-publish-stage-if-category-references-of-given-product-draft-exists).
204204

205205
##### batchSize
206206
A number that could be used to set the batch size with which customers are fetched and processed,

docs/usage/CUSTOM_OBJECT_SYNC.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ against a [CustomObjectDraft](https://docs.commercetools.com/api/projects/custom
3636

3737
#### ProjectApiRoot
3838

39-
Use the [ClientConfigurationUtils](#todo) which apply the best practices for `ProjectApiRoot` creation.
40-
To create `ClientCredentials` which are required for creating a client please use the `ClientCredentialsBuilder` provided in java-sdk-v2 [Client OAUTH2 package](#todo)
39+
Use the [ClientConfigurationUtils](/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java) which apply the best practices for `ProjectApiRoot` creation.
40+
To create `ClientCredentials` which are required for creating a client please use the `ClientCredentialsBuilder` provided in java-sdk-v2 [Client OAUTH2 package](https://github.com/commercetools/commercetools-sdk-java-v2/blob/main/rmf/rmf-java-base/src/main/java/io/vrap/rmf/base/client/oauth2/ClientCredentialsBuilder.java)
4141
If you have custom requirements for the client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).
4242

4343
````java
@@ -78,7 +78,7 @@ following context about the error-event:
7878
* sync exception
7979
* custom object draft from the source
8080
* custom object of the target project (only provided if an existing custom object could be found)
81-
* a fake list of update actions, as custom objects API does not provide update actions. [NoopResourceUpdateAction.java](#todo)
81+
* a fake list of update actions, as custom objects API does not provide update actions. [NoopResourceUpdateAction.java](/src/main/java/com/commercetools/sync/customobjects/models/NoopResourceUpdateAction.java)
8282

8383
````java
8484
final Logger logger = LoggerFactory.getLogger(CustomObjectSync.class);
@@ -168,12 +168,10 @@ __Note__ The statistics object contains the processing time of the last batch on
168168

169169
#### More examples of how to use the sync
170170

171-
- [Sync from an external source](#todo).
171+
- [Sync from an external source](/src/integration-test/java/com/commercetools/sync/integration/externalsource/customobjects/CustomObjectSyncIT.java).
172172

173173
*Make sure to read the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md) for optimal performance.*
174174

175-
More examples of those utils for different custom objects can be found [here](#todo).
176-
177175
## Migration Guide
178176

179177
The custom-object-sync uses the [JVM-SDK-V2](http://commercetools.github.io/commercetools-sdk-java-v2), therefore ensure you [Install JVM SDK](https://docs.commercetools.com/sdk/java-sdk-getting-started#install-the-java-sdk) module `commercetools-sdk-java-api` with
@@ -202,7 +200,7 @@ any HTTP client module. The default one is `commercetools-http-client`.
202200

203201
### Client configuration and creation
204202

205-
For client creation use [ClientConfigurationUtils](#todo) which apply the best practices for `ProjectApiRoot` creation.
203+
For client creation use [ClientConfigurationUtils](/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java) which apply the best practices for `ProjectApiRoot` creation.
206204
If you have custom requirements for the client creation make sure to replace `SphereClientFactory` with `ApiRootBuilder` as described in this [Migration Document](https://docs.commercetools.com/sdk/java-sdk-migrate#client-configuration-and-creation).
207205

208206
### Signature of CustomObjectSyncOptions

docs/usage/INVENTORY_SYNC.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ against a [InventoryEntryDraft](https://docs.commercetools.com/api/projects/inve
4040

4141
#### ProjectApiRoot
4242

43-
Use the [ClientConfigurationUtils](#todo) which apply the best practices for `ProjectApiRoot` creation.
44-
To create `ClientCredentials` which are required for creating a client please use the `ClientCredentialsBuilder` provided in java-sdk-v2 [Client OAUTH2 package](#todo)
43+
Use the [ClientConfigurationUtils](/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java) which apply the best practices for `ProjectApiRoot` creation.
44+
To create `ClientCredentials` which are required for creating a client please use the `ClientCredentialsBuilder` provided in java-sdk-v2 [Client OAUTH2 package](https://github.com/commercetools/commercetools-sdk-java-v2/blob/main/rmf/rmf-java-base/src/main/java/io/vrap/rmf/base/client/oauth2/ClientCredentialsBuilder.java)
4545
If you have custom requirements for the client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).
4646

4747
````java
@@ -77,7 +77,7 @@ Therefore, in order to resolve the actual ids of those references in the sync pr
7777
7878
##### Syncing from a commercetools project
7979

80-
When syncing from a source commercetools project, you can use [`toInventoryEntryDrafts`](#todo)
80+
When syncing from a source commercetools project, you can use [`toInventoryEntryDrafts`](/src/main/java/com/commercetools/sync/inventories/utils/InventoryTransformUtils.java)
8181
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:
8282

8383
````java
@@ -93,8 +93,8 @@ final List<InventoryEntry> categories = QueryUtils.queryAll(inventoryEntryQuery,
9393
````
9494

9595
In order to transform and map the `InventoryEntry` to `InventoryEntryDraft`,
96-
Utils method `toInventoryEntryDrafts` requires `projectApiRoot`, implementation of [`ReferenceIdToKeyCache`](#todo) and `inventoryEntries` as parameters.
97-
For cache implementation, You can use your own cache implementation or use the class in the library - which implements the cache using caffeine library with an LRU (Least Recently Used) based cache eviction strategy[`CaffeineReferenceIdToKeyCacheImpl`](#todo).
96+
Utils method `toInventoryEntryDrafts` requires `projectApiRoot`, implementation of [`ReferenceIdToKeyCache`](/src/main/java/com/commercetools/sync/commons/utils/ReferenceIdToKeyCache.java) and `inventoryEntries` as parameters.
97+
For cache implementation, You can use your own cache implementation or use the class in the library - which implements the cache using caffeine library with an LRU (Least Recently Used) based cache eviction strategy[`CaffeineReferenceIdToKeyCacheImpl`](/src/main/java/com/commercetools/sync/commons/utils/CaffeineReferenceIdToKeyCacheImpl.java).
9898
Example as shown below:
9999

100100
````java
@@ -254,7 +254,7 @@ __Note__ The statistics object contains the processing time of the last batch on
254254
2. It is not known by the sync which batch is going to be the last one supplied.
255255

256256

257-
More examples of how to use the sync [here](#todo).
257+
More examples of how to use the sync can be found [here](/src/integration-test/java/com/commercetools/sync/integration/externalsource/inventories/InventorySyncIT.java).
258258

259259
*Make sure to read the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md) for optimal performance.*
260260

@@ -307,14 +307,14 @@ any HTTP client module. The default one is `commercetools-http-client`.
307307

308308
### Client configuration and creation
309309

310-
For client creation use [ClientConfigurationUtils](#todo) which apply the best practices for `ProjectApiRoot` creation.
310+
For client creation use [ClientConfigurationUtils](/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java) which apply the best practices for `ProjectApiRoot` creation.
311311
If you have custom requirements for the client creation make sure to replace `SphereClientFactory` with `ApiRootBuilder` as described in this [Migration Document](https://docs.commercetools.com/sdk/java-sdk-migrate#client-configuration-and-creation).
312312

313313
### Signature of InventorySyncOptions
314314

315315
As models and update actions have changed in the JVM-SDK-V2 the signature of SyncOptions is different. It's constructor now takes a `ProjectApiRoot` as first argument. The callback functions are signed with `InventoryEntryDraft`, `InventoryEntry` and `InventoryEntryUpdateAction` from `package com.commercetools.api.models.inventory.*`
316316

317-
> Note: Type `UpdateAction<InventoryEntry>` has changed to `InventoryEntryUpdateAction`. Make sure you create and supply a specific InventoryEntryUpdateAction in `beforeUpdateCallback`. For that you can use the [library-utilities](#todo) or use a JVM-SDK builder ([see also](https://docs.commercetools.com/sdk/java-sdk-migrate#update-resources)):
317+
> Note: Type `UpdateAction<InventoryEntry>` has changed to `InventoryEntryUpdateAction`. Make sure you create and supply a specific InventoryEntryUpdateAction in `beforeUpdateCallback`. For that you can use the [library-utilities](/src/main/java/com/commercetools/sync/inventories/utils/InventorySyncUtils.java) or use a JVM-SDK builder ([see also](https://docs.commercetools.com/sdk/java-sdk-migrate#update-resources)):
318318
319319
```java
320320
// Example: Create a inventory update action to change quantity taking the 'newQuantity' of the InventoryEntryDraft
@@ -359,7 +359,7 @@ For more information, see the [Guide to replace DraftBuilders](https://docs.comm
359359

360360
### Query for Inventories (syncing from CTP project)
361361

362-
If you sync inventories between different commercetools projects you probably use [InventoryTransformUtils#toInventoryEntryDrafts](#todo) to transform `InventoryEntry` into `InventoryEntryDraft` which can be used by the inventory-sync.
362+
If you sync inventories between different commercetools projects you probably use [InventoryTransformUtils#toInventoryEntryDrafts](/src/main/java/com/commercetools/sync/inventories/utils/InventoryTransformUtils.java) to transform `InventoryEntry` into `InventoryEntryDraft` which can be used by the inventory-sync.
363363
However, if you need to query `Inventories` from a commercetools project instead of passing `InventoryEntryQuery`s to a `sphereClient`, create (and execute) requests directly from the `apiRoot`.
364364
Here's an example:
365365

0 commit comments

Comments
 (0)