public class InventoryFacadeClient extends AbstractInventoryFacadeClient
This class provides common methods that this and other utility classes to the Inventory facade use. This class also provides a set of convenient Java APIs to represent particular Inventory operations. This set of Java APIs also include APIs for Web-based requests to transform the name-value pair requests into the appropriate request documents.
Constructor and Description |
---|
InventoryFacadeClient()
Creates an instance of the client to communicate with the Inventory facade.
|
InventoryFacadeClient(BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler callbackHandler)
Creates an instance of the client to communicate with the Inventory facade.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map | checkInventory(java.util.Map parameters)
Checks the inventory availability of an order in different locations (identified by the storeId or physicalStoreId).
|
CommerceFoundationFactory | getCommerceFoundationFactory()
Gets the commerce foundation factory.
|
InventoryFactory | getInventoryFactory()
Gets the inventory factory.
|
OrderFactory | getOrderFactory()
Gets the order factory.
|
AcknowledgeInventoryRequirementType | processInventoryRequirement(ProcessType process, java.util.List orders)
This method communicates with the Inventory facade and sends the specified ProcessInventoryRequirement request.
|
public InventoryFacadeClient()
public InventoryFacadeClient(BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler callbackHandler)
public java.util.Map checkInventory(java.util.Map parameters) throws InventoryRequirementException
orderId, the order ID which inventory availability will be checked. storeId, the online store Id. physicalStoreId_n, the No. n physical store Id, if only one, just use physicalStoreId.
storeId | ID of the online store. |
---|---|
overallInventoryStatus | The overall (i.e. worst) inventory status of the order/shopping cart in the online store. |
overallAvailabilityDate | The overall (i.e. latest) availability date of the order/shopping cart in the online store. |
inventoryRequirement | The InventoryRequirement SDO corresponding to the online store. |
physicalStoreInventoryAvailability | A list containing the inventory availability of the order/shopping cart in each of the physical stores specified |
---|
physicalStoreId | ID of physical store n. |
---|---|
overallInventoryStatus | The overall (i.e. worst) inventory status of the order/shopping cart in the physical store. |
overallAvailabilityDate | The overall (i.e. latest) availability date of the order/shopping cart in the physical store. |
inventoryRequirement | The InventoryRequirement SDO corresponding to the physical store. |
Map parameters = new HashMap(); parameters.put("orderId", "10051"); parameters.put("storeId", "10001"); parameters.put("physicalStoreId_0", "50001"); parameters.put("physicalStoreId_1", "50002"); InventoryFacadeClient ifcClient = new InventoryFacadeClient(yourBusinessContext, yourCallbackHandler); Map mapResult = ifcClient.checkInventory(parameters); mapResult.get("storeId"); mapResult.get("overallInventoryStatus"); List physicalStoreResults = (List) (mapResult.get("physicalStoreInventoryAvailability")); for (int i=0; i
public CommerceFoundationFactory getCommerceFoundationFactory()
public OrderFactory getOrderFactory()
public InventoryFactory getInventoryFactory()
public AcknowledgeInventoryRequirementType processInventoryRequirement(ProcessType process, java.util.List orders) throws InventoryRequirementException