public final class InventoryReferenceResolver extends CustomReferenceResolver<io.sphere.sdk.inventory.InventoryEntryDraft,io.sphere.sdk.inventory.InventoryEntryDraftBuilder,InventorySyncOptions>
TYPE_DOES_NOT_EXISTBLANK_ID_VALUE_ON_REFERENCE, BLANK_KEY_VALUE_ON_RESOURCE_IDENTIFIER, options| Constructor and Description |
|---|
InventoryReferenceResolver(InventorySyncOptions options,
TypeService typeService,
ChannelService channelService) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.concurrent.CompletionStage<io.sphere.sdk.inventory.InventoryEntryDraftBuilder> |
resolveCustomTypeReference(io.sphere.sdk.inventory.InventoryEntryDraftBuilder draftBuilder)
Given a draft of
D (e.g. |
java.util.concurrent.CompletionStage<io.sphere.sdk.inventory.InventoryEntryDraft> |
resolveReferences(io.sphere.sdk.inventory.InventoryEntryDraft draft)
Given a
InventoryEntryDraft this method attempts to resolve the custom type and supply channel
resource identifiers to return a CompletionStage which contains a new instance of the draft with the
resolved resource identifiers. |
resolveCustomTypeReferencegetIdFromReference, getKeyFromResourceIdentifierpublic InventoryReferenceResolver(@Nonnull
InventorySyncOptions options,
@Nonnull
TypeService typeService,
@Nonnull
ChannelService channelService)
public java.util.concurrent.CompletionStage<io.sphere.sdk.inventory.InventoryEntryDraft> resolveReferences(@Nonnull
io.sphere.sdk.inventory.InventoryEntryDraft draft)
InventoryEntryDraft this method attempts to resolve the custom type and supply channel
resource identifiers to return a CompletionStage which contains a new instance of the draft with the
resolved resource identifiers.resolveReferences in class BaseReferenceResolver<io.sphere.sdk.inventory.InventoryEntryDraft,InventorySyncOptions>draft - the inventoryEntryDraft to resolve its resource identifiers.CompletionStage that contains as a result a new inventoryEntryDraft instance with resolved
resource identifiers or, in case an error occurs during reference resolution,
a ReferenceResolutionException.@Nonnull
protected java.util.concurrent.CompletionStage<io.sphere.sdk.inventory.InventoryEntryDraftBuilder> resolveCustomTypeReference(@Nonnull
io.sphere.sdk.inventory.InventoryEntryDraftBuilder draftBuilder)
CustomReferenceResolverD (e.g. CategoryDraft) this method attempts to resolve it's custom type
reference to return CompletionStage which contains a new instance of the draft with the resolved
custom type reference.
The method then tries to fetch the key of the custom type, optimistically from a cache. If the key is is not found, the resultant draft would remain exactly the same as the passed draft (without a custom type reference resolution).
resolveCustomTypeReference in class CustomReferenceResolver<io.sphere.sdk.inventory.InventoryEntryDraft,io.sphere.sdk.inventory.InventoryEntryDraftBuilder,InventorySyncOptions>draftBuilder - the draft builder to resolve it's references.CompletionStage that contains as a result a new draft instance with resolved custom
type references or, in case an error occurs during reference resolution,
a ReferenceResolutionException.