Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
salander85 committed Oct 9, 2023
1 parent af9fdd8 commit 2a79815
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
15 changes: 7 additions & 8 deletions src/main/java/com/commercetools/project/sync/Syncer.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,10 @@ public Syncer(
}

/**
* Fetches the sourceClient's project resources of type {@code ResourceT} with all needed references
* expanded and treats each page as a batch to the sync process. Then executes the sync process
* on every page sequentially. It then returns a completion stage
* containing a {@link Void} result after the execution of the sync process and logging the
* result.
* Fetches the sourceClient's project resources of type {@code ResourceT} with all needed
* references expanded and treats each page as a batch to the sync process. Then executes the sync
* process on every page sequentially. It then returns a completion stage containing a {@link
* Void} result after the execution of the sync process and logging the result.
*
* <p>Note: If {@param isFullSync} is {@code false}, i.e. a delta sync is required, the method
* checks if there was a last sync time stamp persisted as a custom object in the target project
Expand Down Expand Up @@ -265,9 +264,9 @@ private SyncStatisticsT syncPage(@Nonnull final List<ResourceT> page) {
}

/**
* Given a {@link List} representing a page of resources of type {@link ResourceT}, this method creates
* a list of drafts of type {@link ResourceDraftT} where reference ids of the references are
* replaced with keys and are ready for reference resolution by the sync process.
* Given a {@link List} representing a page of resources of type {@link ResourceT}, this method
* creates a list of drafts of type {@link ResourceDraftT} where reference ids of the references
* are replaced with keys and are ready for reference resolution by the sync process.
*
* @return a {@link CompletionStage} containing a list of drafts of type {@link ResourceDraftT}
* after being transformed from type {@link ResourceT}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
public interface CustomObjectService {

/**
* Creates or updates a custom object with the container named
* 'commercetools-project-sync.{@param runnerName}.{@param syncModuleName}.timestampGenerator' and
* key equals 'timestampGenerator' and then reading the 'lastModifiedAt' field of the persisted custom
* object and returning it.
* Creates or updates a custom object with the container named 'commercetools-project-sync.{@param
* runnerName}.{@param syncModuleName}.timestampGenerator' and key equals 'timestampGenerator' and
* then reading the 'lastModifiedAt' field of the persisted custom object and returning it.
*
* @param syncModuleName the name of the resource being synced. E.g. productSync, categorySync,
* etc..
Expand All @@ -37,8 +36,8 @@ CompletableFuture<ZonedDateTime> getCurrentCtpTimestamp(
* etc..
* @param runnerName the name of this specific running sync instance defined by the user.
* @return the custom object with container 'commercetools-project-sync.{@param
* runnerName}.{@param syncModuleName}' and key '{@param sourceProjectKey}', wrapped in an {@link Optional} as a
* result of a {@link CompletableFuture}.
* runnerName}.{@param syncModuleName}' and key '{@param sourceProjectKey}', wrapped in an
* {@link Optional} as a result of a {@link CompletableFuture}.
*/
@Nonnull
CompletableFuture<Optional<LastSyncCustomObject>> getLastSyncCustomObject(
Expand All @@ -57,7 +56,8 @@ CompletableFuture<Optional<LastSyncCustomObject>> getLastSyncCustomObject(
* etc..
* @param runnerName the name of this specific running sync instance defined by the user.
* @param lastSyncCustomObject contains information about the last sync instance.
* @return a {@link CompletableFuture} of {@link ApiHttpResponse} with the created/updated custom object resource.
* @return a {@link CompletableFuture} of {@link ApiHttpResponse} with the created/updated custom
* object resource.
*/
@Nonnull
CompletableFuture<ApiHttpResponse<CustomObject>> createLastSyncCustomObject(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ public CompletableFuture<ZonedDateTime> getCurrentCtpTimestamp(
}

/**
* Helper to create a custom object of {@param customObjectDraft} on the CTP project defined by the {@code ctpClient}.
* Helper to create a custom object of {@param customObjectDraft} on the CTP project defined by
* the {@code ctpClient}.
*
* @param customObjectDraft draft of custom object to create
* @return a {@link CompletableFuture} of {@link ApiHttpResponse} with the created custom object resource.
* @return a {@link CompletableFuture} of {@link ApiHttpResponse} with the created custom object
* resource.
*/
@Nonnull
private CompletableFuture<ApiHttpResponse<CustomObject>> createCustomObject(
Expand Down

0 comments on commit 2a79815

Please sign in to comment.