Class InventoryServiceImpl
- java.lang.Object
 - 
- com.commercetools.sync.services.impl.InventoryServiceImpl
 
 
- 
- All Implemented Interfaces:
 InventoryService
public final class InventoryServiceImpl extends java.lang.Object implements InventoryService
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected com.github.benmanes.caffeine.cache.Cache<java.lang.String,java.lang.String>keyToIdCacheprotected static intMAXIMUM_ALLOWED_UPDATE_ACTIONS 
- 
Constructor Summary
Constructors Constructor Description InventoryServiceImpl(InventorySyncOptions syncOptions) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletionStage<java.util.Optional<io.sphere.sdk.inventory.InventoryEntry>>createInventoryEntry(io.sphere.sdk.inventory.InventoryEntryDraft inventoryEntryDraft)Creates new inventory entry frominventoryEntryDraft.java.util.concurrent.CompletionStage<java.util.Set<io.sphere.sdk.inventory.InventoryEntry>>fetchInventoryEntriesByIdentifiers(java.util.Set<InventoryEntryIdentifier> identifiers)Queries existingInventoryEntry'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 withupdateActions. 
 - 
 
- 
- 
Field Detail
- 
keyToIdCache
protected final com.github.benmanes.caffeine.cache.Cache<java.lang.String,java.lang.String> keyToIdCache
 
- 
MAXIMUM_ALLOWED_UPDATE_ACTIONS
protected static final int MAXIMUM_ALLOWED_UPDATE_ACTIONS
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
InventoryServiceImpl
public InventoryServiceImpl(@Nonnull InventorySyncOptions syncOptions) 
 - 
 
- 
Method Detail
- 
fetchInventoryEntriesByIdentifiers
@Nonnull public java.util.concurrent.CompletionStage<java.util.Set<io.sphere.sdk.inventory.InventoryEntry>> fetchInventoryEntriesByIdentifiers(@Nonnull java.util.Set<InventoryEntryIdentifier> identifiers)Description copied from interface:InventoryServiceQueries existingInventoryEntry's against set of sku and supply channels.- Specified by:
 fetchInventoryEntriesByIdentifiersin interfaceInventoryService- Parameters:
 identifiers-Setof unique inventory identifiers, used in search predicate- Returns:
 Listof matching entries or empty list when there was no matching resources.
 
- 
createInventoryEntry
@Nonnull public java.util.concurrent.CompletionStage<java.util.Optional<io.sphere.sdk.inventory.InventoryEntry>> createInventoryEntry(@Nonnull io.sphere.sdk.inventory.InventoryEntryDraft inventoryEntryDraft)Description copied from interface:InventoryServiceCreates new inventory entry frominventoryEntryDraft.- Specified by:
 createInventoryEntryin interfaceInventoryService- Parameters:
 inventoryEntryDraft- draft with data for new inventory entry- Returns:
 CompletionStagewith createdInventoryEntryor an exception
 
- 
updateInventoryEntry
@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)Description copied from interface:InventoryServiceUpdates existing inventory entry withupdateActions.- Specified by:
 updateInventoryEntryin interfaceInventoryService- Parameters:
 inventoryEntry- entry that should be updatedupdateActions-Listof actions that should be applied toinventoryEntry- Returns:
 CompletionStagewith updatedInventoryEntryor an exception
 
 - 
 
 -