public final class InventoryServiceImpl extends java.lang.Object implements InventoryService
Modifier and Type | Field and Description |
---|---|
protected com.github.benmanes.caffeine.cache.Cache<java.lang.String,java.lang.String> |
keyToIdCache |
protected static int |
MAXIMUM_ALLOWED_UPDATE_ACTIONS |
Constructor and Description |
---|
InventoryServiceImpl(InventorySyncOptions syncOptions) |
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletionStage<java.util.Optional<io.sphere.sdk.inventory.InventoryEntry>> |
createInventoryEntry(io.sphere.sdk.inventory.InventoryEntryDraft inventoryEntryDraft)
Creates new inventory entry from
inventoryEntryDraft . |
java.util.concurrent.CompletionStage<java.util.Set<io.sphere.sdk.inventory.InventoryEntry>> |
fetchInventoryEntriesByIdentifiers(java.util.Set<InventoryEntryIdentifier> identifiers)
Queries existing
InventoryEntry 's against set of sku and supply channels. |
java.util.concurrent.CompletionStage<io.sphere.sdk.inventory.InventoryEntry> |
updateInventoryEntry(io.sphere.sdk.inventory.InventoryEntry inventoryEntry,
java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> updateActions)
Updates existing inventory entry with
updateActions . |
protected final com.github.benmanes.caffeine.cache.Cache<java.lang.String,java.lang.String> keyToIdCache
protected static final int MAXIMUM_ALLOWED_UPDATE_ACTIONS
public InventoryServiceImpl(@Nonnull InventorySyncOptions syncOptions)
@Nonnull public java.util.concurrent.CompletionStage<java.util.Set<io.sphere.sdk.inventory.InventoryEntry>> fetchInventoryEntriesByIdentifiers(@Nonnull java.util.Set<InventoryEntryIdentifier> identifiers)
InventoryService
InventoryEntry
's against set of sku and supply channels.fetchInventoryEntriesByIdentifiers
in interface InventoryService
identifiers
- Set
of unique inventory identifiers, used in search
predicateList
of matching entries or empty list when there was no matching resources.@Nonnull public java.util.concurrent.CompletionStage<java.util.Optional<io.sphere.sdk.inventory.InventoryEntry>> createInventoryEntry(@Nonnull io.sphere.sdk.inventory.InventoryEntryDraft inventoryEntryDraft)
InventoryService
inventoryEntryDraft
.createInventoryEntry
in interface InventoryService
inventoryEntryDraft
- draft with data for new inventory entryCompletionStage
with created InventoryEntry
or an exception@Nonnull public java.util.concurrent.CompletionStage<io.sphere.sdk.inventory.InventoryEntry> updateInventoryEntry(@Nonnull io.sphere.sdk.inventory.InventoryEntry inventoryEntry, @Nonnull java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> updateActions)
InventoryService
updateActions
.updateInventoryEntry
in interface InventoryService
inventoryEntry
- entry that should be updatedupdateActions
- List
of actions that should be applied to inventoryEntry
CompletionStage
with updated InventoryEntry
or an exception