| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface InventoryManager
This interface describes an inventory manager. It provides capability to interact with a backend inventory system in three types of ways: -Inspect the inventory system -Alter the state of the inventory system -Inspect how users have been using the system
| Field Summary | |
|---|---|
| static int | AVAILABILITY_STATUS_BACKORDERABLEConstant value for an item's "backorderable" state. | 
| static int | AVAILABILITY_STATUS_DERIVEDConstant value specifying that the items availability status is derived. | 
| static int | AVAILABILITY_STATUS_DISCONTINUEDConstant value for an item's "discontinued" state. | 
| static int | AVAILABILITY_STATUS_IN_STOCKConstant value for an item's "in stock" state. | 
| static int | AVAILABILITY_STATUS_OUT_OF_STOCKConstant value for an item's "out of stock" state. | 
| static int | AVAILABILITY_STATUS_PREORDERABLEConstant value for an item's "preorderable" state. | 
| static java.lang.String | CLASS_VERSION | 
| static int | INVENTORY_STATUS_FAILSignifies a failed method call. | 
| static int | INVENTORY_STATUS_INSUFFICIENT_SUPPLYSignifies that the procedure failed because the inventory system is out of the item(s). | 
| static int | INVENTORY_STATUS_ITEM_NOT_FOUNDSignifies that the procedure failed because the item wasn't found. | 
| static int | INVENTORY_STATUS_SUCCEEDSignifies a successful method call. | 
| Method Summary | |
|---|---|
|  void | acquireInventoryLocks(java.util.List pItemIds)Acquires locks for the inventory items that apply to the given ids. | 
|  int | backorder(java.lang.String pId,
          long pHowMany)Backorder an item. | 
|  int | decreaseBackorderLevel(java.lang.String pId,
                       long pNumber)Decrease an item's backorder level by the specified amount. | 
|  int | decreasePreorderLevel(java.lang.String pId,
                      long pNumber)Decrease an item's preorder level by the specified amount. | 
|  int | decreaseStockLevel(java.lang.String pId,
                   long pNumber)Decrease an item's stock level by the specified amount. | 
|  java.lang.String | getInventoryName()The displayable name of this inventory manager. | 
|  int | increaseBackorderLevel(java.lang.String pId,
                       long pNumber)Increase an item's backorder level by the specified number. | 
|  int | increasePreorderLevel(java.lang.String pId,
                      long pNumber)Increase an item's preorder level by the specified number. | 
|  int | increaseStockLevel(java.lang.String pId,
                   long pNumber)Increase an item's stock level by the specified number. | 
|  int | inventoryWasUpdated(java.util.List pItemIds)Informs the inventory manager that the given ids are now available. | 
|  int | preorder(java.lang.String pId,
         long pHowMany)Preorder an item. | 
|  int | purchase(java.lang.String pId,
         long pHowMany)Actually purchases a product. | 
|  int | purchaseOffBackorder(java.lang.String pId,
                     long pHowMany)Actually purchases a product. | 
|  int | purchaseOffPreorder(java.lang.String pId,
                    long pHowMany)Actually purchases a product. | 
|  java.util.Date | queryAvailabilityDate(java.lang.String pId)Return the availability date of an item. | 
|  int | queryAvailabilityStatus(java.lang.String pId)Return the availability status of a given item. | 
|  long | queryBackorderLevel(java.lang.String pId)Return how many of a given item can be backorder. | 
|  long | queryBackorderThreshold(java.lang.String pId)Return the threshold associated with backorderLevel | 
|  long | queryPreorderLevel(java.lang.String pId)Return how many of a given item can be preorder. | 
|  long | queryPreorderThreshold(java.lang.String pId)Return the threshold associated with preorderLevel | 
|  long | queryStockLevel(java.lang.String pId)Return how many of a given item are in the system. | 
|  long | queryStockThreshold(java.lang.String pId)Return the threshold associated with stockLevel. | 
|  void | releaseInventoryLocks(java.util.List pItemIds)Release locks for the inventory items that apply to the given ids. | 
|  int | setAvailabilityDate(java.lang.String pId,
                    java.util.Date pDate)Set an item's availability date. | 
|  int | setAvailabilityStatus(java.lang.String pId,
                      int pStatus)Set an item's availability status. | 
|  int | setBackorderLevel(java.lang.String pId,
                  long pNumber)Set an item's backorder level to the specified number. | 
|  int | setBackorderThreshold(java.lang.String pId,
                      long pNumber)Set an item's backorder level threshold. | 
|  int | setPreorderLevel(java.lang.String pId,
                 long pNumber)Set an item's preorder level to the specified number. | 
|  int | setPreorderThreshold(java.lang.String pId,
                     long pNumber)Set an item's preorder level threshold. | 
|  int | setStockLevel(java.lang.String pId,
              long pNumber)Set an item's stock level to the specified number. | 
|  int | setStockThreshold(java.lang.String pId,
                  long pNumber)Set an item's stock level threshold. | 
| Field Detail | 
|---|
static final java.lang.String CLASS_VERSION
static final int AVAILABILITY_STATUS_IN_STOCK
1000
static final int AVAILABILITY_STATUS_OUT_OF_STOCK
1001
static final int AVAILABILITY_STATUS_PREORDERABLE
1002
static final int AVAILABILITY_STATUS_BACKORDERABLE
1003
static final int AVAILABILITY_STATUS_DERIVED
1004
static final int AVAILABILITY_STATUS_DISCONTINUED
1005
static final int INVENTORY_STATUS_SUCCEED
1
static final int INVENTORY_STATUS_FAIL
-1
static final int INVENTORY_STATUS_INSUFFICIENT_SUPPLY
-2 *
static final int INVENTORY_STATUS_ITEM_NOT_FOUND
-3 *
| Method Detail | 
|---|
java.lang.String getInventoryName()
int purchase(java.lang.String pId,
             long pHowMany)
             throws InventoryException
pId - the id of the item involved
InventoryException - if there was a problem during the purchase process.
int purchaseOffBackorder(java.lang.String pId,
                         long pHowMany)
                         throws InventoryException
pId - the id of the item involved
InventoryException - if there was a problem during the purchase process.
int purchaseOffPreorder(java.lang.String pId,
                        long pHowMany)
                        throws InventoryException
pId - the id of the item involved
InventoryException - if there was a problem during the purchase process.
int preorder(java.lang.String pId,
             long pHowMany)
             throws InventoryException
pId - the id of the item involved
InventoryException - if there was a problem in trying to preorder the item
int backorder(java.lang.String pId,
              long pHowMany)
              throws InventoryException
pId - the id of the item involved
InventoryException - if there was a problem with the backordering process.
int setStockLevel(java.lang.String pId,
                  long pNumber)
                  throws InventoryException
pId - the id of the item involvedpNumber - the number of the given item to restock
InventoryException - if there was a problem trying to restock
int setBackorderLevel(java.lang.String pId,
                      long pNumber)
                      throws InventoryException
pId - the id of the item involvedpNumber - the number of the given item to restock
InventoryException - if there was a problem trying to restock
int setPreorderLevel(java.lang.String pId,
                     long pNumber)
                     throws InventoryException
pId - the id of the item involvedpNumber - the number of the given item to restock
InventoryException - if there was a problem trying to restock
int increaseStockLevel(java.lang.String pId,
                       long pNumber)
                       throws InventoryException
pId - the id of the item involvedpNumber - the number of items to add to the current stock level
InventoryException - if there was a problem trying to restock
int decreaseStockLevel(java.lang.String pId,
                       long pNumber)
                       throws InventoryException
pId - the id of the item involvedpNumber - the number of items to decrease from the current stock level
InventoryException - if there was a problem trying to restock
int increaseBackorderLevel(java.lang.String pId,
                           long pNumber)
                           throws InventoryException
pId - the id of the item involvedpNumber - the number of items to add to the current stock level
InventoryException - if there was a problem trying to restock
int decreaseBackorderLevel(java.lang.String pId,
                           long pNumber)
                           throws InventoryException
pId - the id of the item involvedpNumber - the number of items to decrease from the current stock level
InventoryException - if there was a problem trying to restock
int increasePreorderLevel(java.lang.String pId,
                          long pNumber)
                          throws InventoryException
pId - the id of the item involvedpNumber - the number of items to add to the current stock level
InventoryException - if there was a problem trying to restock
int decreasePreorderLevel(java.lang.String pId,
                          long pNumber)
                          throws InventoryException
pId - the id of the item involvedpNumber - the number of items to decrease from the current stock level
InventoryException - if there was a problem trying to restock
int setStockThreshold(java.lang.String pId,
                      long pNumber)
                      throws InventoryException
pId - the id of the item involvedpNumber - the number of the given item to restock
InventoryException - if there was a problem trying to restock
int setBackorderThreshold(java.lang.String pId,
                          long pNumber)
                          throws InventoryException
pId - the id of the item involvedpNumber - the number of the given item to restock
InventoryException - if there was a problem trying to restock
int setPreorderThreshold(java.lang.String pId,
                         long pNumber)
                         throws InventoryException
pId - the id of the item involvedpNumber - the number of the given item to restock
InventoryException - if there was a problem trying to restock
int setAvailabilityStatus(java.lang.String pId,
                          int pStatus)
                          throws InventoryException
pId - the id of the item involvedpStatus - the new status (one of AVAILABILITY_STATUS_IN_STOCK, 
                                       AVAILABILITY_STATUS_BACKORDERABLE,
                                       AVAILABILITY_STATUS_PREORDERABLE,
                                       AVAILABILITY_STATUS_OUT_OF_STOCK,
                                       AVAILABILITY_STATUS_DISCONTINUED,
                                    or AVAILABILITY_STATUS_DERIVED)
InventoryException
int setAvailabilityDate(java.lang.String pId,
                        java.util.Date pDate)
                        throws InventoryException
pId - the id of the item involvedpDate - The new availability date for the item.
InventoryException
int queryAvailabilityStatus(java.lang.String pId)
                            throws InventoryException
pId - The id of the item involved.
InventoryException - if there was a problem determining the status of the item
long queryStockLevel(java.lang.String pId)
                     throws InventoryException
InventoryException - if there was a problem determining the number
long queryBackorderLevel(java.lang.String pId)
                         throws InventoryException
InventoryException - if there was a problem determining the number
long queryPreorderLevel(java.lang.String pId)
                        throws InventoryException
InventoryException - if there was a problem determining the number
long queryStockThreshold(java.lang.String pId)
                         throws InventoryException
InventoryException - if there was a problem determining the number
long queryBackorderThreshold(java.lang.String pId)
                             throws InventoryException
InventoryException - if there was a problem determining the number
long queryPreorderThreshold(java.lang.String pId)
                            throws InventoryException
InventoryException - if there was a problem determining the number
java.util.Date queryAvailabilityDate(java.lang.String pId)
                                     throws InventoryException
InventoryException - if there was a problem determining the date
int inventoryWasUpdated(java.util.List pItemIds)
                        throws InventoryException
pItemIds - The items with recently added inventory
InventoryException
void acquireInventoryLocks(java.util.List pItemIds)
                           throws InventoryException
InventoryException
void releaseInventoryLocks(java.util.List pItemIds)
                           throws InventoryException
InventoryException| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||