The InventoryManager is a public interface that contains all of the Inventory system functionality. Each method described below returns an integer status code. All successful return codes should be greater than or equal to zero, all failure codes should be less than zero. By default, the codes are:

Status Code

Description

int INVENTORY_STATUS_SUCCEED=0

There was no problem performing the operation.

int INVENTORY_STATUS_FAIL=-1

There was an unknown/generic problem performing the operation.

int INVENTORY_STATUS_INSUFFICIENT_SUPPLY = -2

The operation could not be completed because there were not enough of the items in the inventory system.

int INVENTORY_STATUS_ITEM_NOT_FOUND = -3

The operation could not be completed because a specified item could not be found in the inventory system.

The methods that effect a change on the backend system return an integer status code. Methods that inspect the backend system return the answer to the query. The status return codes listed above and any implementer-defined status codes usually should be used to convey a definitive answer concerning a method’s success.

When a method succeeds, an answer is prepared for return from the method. When a method fails, you can either return a failure code or throw an exception. In general, a method should return a failure code only if it is determined that the operation will not succeed. For example:

For detailed information on the methods provided by the InventoryManager interface, refer to the Examples of Using the Inventory Manager section and the ATG Platform API Reference.


Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices