public class TaxCategorySync extends BaseSync<io.sphere.sdk.taxcategories.TaxCategoryDraft,TaxCategorySyncStatistics,TaxCategorySyncOptions>
statistics, syncOptions| Constructor and Description |
|---|
TaxCategorySync(TaxCategorySyncOptions taxCategorySyncOptions) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.concurrent.CompletionStage<TaxCategorySyncStatistics> |
process(java.util.List<io.sphere.sdk.taxcategories.TaxCategoryDraft> resourceDrafts)
Given a list of resource (e.g.
|
protected java.util.concurrent.CompletionStage<TaxCategorySyncStatistics> |
processBatch(java.util.List<io.sphere.sdk.taxcategories.TaxCategoryDraft> batch)
This method first creates a new
Set of valid TaxCategoryDraft elements. |
executeSupplierIfConcurrentModificationException, getStatistics, getSyncOptions, sync, syncBatchespublic TaxCategorySync(@Nonnull
TaxCategorySyncOptions taxCategorySyncOptions)
protected java.util.concurrent.CompletionStage<TaxCategorySyncStatistics> process(@Nonnull java.util.List<io.sphere.sdk.taxcategories.TaxCategoryDraft> resourceDrafts)
BaseSyncprocess in class BaseSync<io.sphere.sdk.taxcategories.TaxCategoryDraft,TaxCategorySyncStatistics,TaxCategorySyncOptions>resourceDrafts - the list of new resources as drafts.CompletionStage<U> which contains as a result an instance of
U which is a subclass of BaseSyncStatistics representing the statistics instance
attribute of this BaseSync.protected java.util.concurrent.CompletionStage<TaxCategorySyncStatistics> processBatch(@Nonnull java.util.List<io.sphere.sdk.taxcategories.TaxCategoryDraft> batch)
Set of valid TaxCategoryDraft elements. For more on the rules of
validation, check: TaxCategoryBatchValidator.validateAndCollectReferencedKeys(List). Using the resulting
set of validTaxCategoryDrafts, the matching tax categories in the target CTP project are fetched then
the method syncBatch(Set, Set) is called to perform the sync (update or
create requests accordingly) on the target project.
In case of error during of fetching of existing tax categories, the error callback will be triggered. And the sync process would stop for the given batch.
processBatch in class BaseSync<io.sphere.sdk.taxcategories.TaxCategoryDraft,TaxCategorySyncStatistics,TaxCategorySyncOptions>batch - batch of drafts that need to be syncedCompletionStage containing an instance
of TaxCategorySyncStatistics which contains information about the result of syncing the supplied
batch to the target project.