Class InventorySyncOptionsBuilder
- java.lang.Object
-
- com.commercetools.sync.commons.BaseSyncOptionsBuilder<InventorySyncOptionsBuilder,InventorySyncOptions,io.sphere.sdk.inventory.InventoryEntry,io.sphere.sdk.inventory.InventoryEntryDraft,io.sphere.sdk.inventory.InventoryEntry>
-
- com.commercetools.sync.inventories.InventorySyncOptionsBuilder
-
public final class InventorySyncOptionsBuilder extends BaseSyncOptionsBuilder<InventorySyncOptionsBuilder,InventorySyncOptions,io.sphere.sdk.inventory.InventoryEntry,io.sphere.sdk.inventory.InventoryEntryDraft,io.sphere.sdk.inventory.InventoryEntry>
Builder for creation ofInventorySyncOptions.
-
-
Field Summary
-
Fields inherited from class com.commercetools.sync.commons.BaseSyncOptionsBuilder
batchSize, beforeCreateCallback, beforeUpdateCallback, cacheSize, ctpClient, errorCallback, warningCallback
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InventorySyncOptionsbuild()Returns new instance ofInventorySyncOptions, enriched with all attributes provided tothisbuilder.InventorySyncOptionsBuilderensureChannels(boolean ensureChannels)Set option that indicates whether sync process should create a supply channel of given key when it doesn't exist in a target project yet.protected InventorySyncOptionsBuildergetThis()Returnsthisinstance ofInventorySyncOptionsBuilder.static InventorySyncOptionsBuilderof(io.sphere.sdk.client.SphereClient ctpClient)Creates a new instance ofInventorySyncOptionsBuildergiven aSphereClientresponsible for interaction with the target CTP project, with the default batch size (BATCH_SIZE_DEFAULT= 150).-
Methods inherited from class com.commercetools.sync.commons.BaseSyncOptionsBuilder
batchSize, beforeCreateCallback, beforeUpdateCallback, cacheSize, errorCallback, warningCallback
-
-
-
-
Method Detail
-
of
public static InventorySyncOptionsBuilder of(@Nonnull io.sphere.sdk.client.SphereClient ctpClient)
Creates a new instance ofInventorySyncOptionsBuildergiven aSphereClientresponsible for interaction with the target CTP project, with the default batch size (BATCH_SIZE_DEFAULT= 150).- Parameters:
ctpClient-SphereClientresponsible for interaction with the target CTP project.- Returns:
- new instance of
InventorySyncOptionsBuilder
-
ensureChannels
public InventorySyncOptionsBuilder ensureChannels(boolean ensureChannels)
Set option that indicates whether sync process should create a supply channel of given key when it doesn't exist in a target project yet. If set totruesync process would try to create new supply channel of given key, otherwise the sync process would log an error and fail to process the draft with the given supply channel key.This property is
ENSURE_CHANNELS_DEFAULTby default.- Parameters:
ensureChannels- boolean that indicates whether sync process should create supply channel of given key when it doesn't exist in a target project yet- Returns:
thisinstance ofInventorySyncOptionsBuilder
-
build
public InventorySyncOptions build()
Returns new instance ofInventorySyncOptions, enriched with all attributes provided tothisbuilder.- Specified by:
buildin classBaseSyncOptionsBuilder<InventorySyncOptionsBuilder,InventorySyncOptions,io.sphere.sdk.inventory.InventoryEntry,io.sphere.sdk.inventory.InventoryEntryDraft,io.sphere.sdk.inventory.InventoryEntry>- Returns:
- new instance of
InventorySyncOptions
-
getThis
protected InventorySyncOptionsBuilder getThis()
Returnsthisinstance ofInventorySyncOptionsBuilder.Inherited doc:
Returnsthisinstance ofT, which extendsBaseSyncOptionsBuilder. The purpose of this method is to make sure thatthisis an instance of a class which extendsBaseSyncOptionsBuilderin order to be used in the generic methods of the class. Otherwise, without this method, the methods above would need to castthis to Twhich could lead to a runtime error of the class was extended in a wrong way.- Specified by:
getThisin classBaseSyncOptionsBuilder<InventorySyncOptionsBuilder,InventorySyncOptions,io.sphere.sdk.inventory.InventoryEntry,io.sphere.sdk.inventory.InventoryEntryDraft,io.sphere.sdk.inventory.InventoryEntry>- Returns:
- an instance of the class that overrides this method.
-
-