public interface InventoryManager
Modifier and Type | Field and Description |
---|---|
static int |
AVAILABILITY_STATUS_BACKORDERABLE
Constant value for an item's "backorderable" state.
|
static int |
AVAILABILITY_STATUS_DERIVED
Constant value specifying that the items availability status is derived.
|
static int |
AVAILABILITY_STATUS_DISCONTINUED
Constant value for an item's "discontinued" state.
|
static int |
AVAILABILITY_STATUS_IN_STOCK
Constant value for an item's "in stock" state.
|
static int |
AVAILABILITY_STATUS_OUT_OF_STOCK
Constant value for an item's "out of stock" state.
|
static int |
AVAILABILITY_STATUS_PREORDERABLE
Constant value for an item's "preorderable" state.
|
static java.lang.String |
CLASS_VERSION |
static int |
INVENTORY_STATUS_FAIL
Signifies a failed method call.
|
static int |
INVENTORY_STATUS_INSUFFICIENT_SUPPLY
Signifies that the procedure failed because the inventory system is out of the item(s).
|
static int |
INVENTORY_STATUS_ITEM_NOT_FOUND
Signifies that the procedure failed because the item wasn't found.
|
static int |
INVENTORY_STATUS_SUCCEED
Signifies a successful method call.
|
Modifier and Type | Method and Description |
---|---|
void |
acquireInventoryLocks(java.util.List pItemIds)
Acquires locks for the inventory items that apply to the given
ids.
|
int |
backorder(java.lang.String pId,
double pQuantity)
Backorder an item.
|
int |
backorder(java.lang.String pId,
long pQuantity)
Backorder an item.
|
int |
decreaseBackorderLevel(java.lang.String pId,
double pQuantity)
Decrease an item's backorder level by the specified amount.
|
int |
decreaseBackorderLevel(java.lang.String pId,
long pQuantity)
Decrease an item's backorder level by the specified amount.
|
int |
decreasePreorderLevel(java.lang.String pId,
double pQuantity)
Decrease an item's preorder level by the specified amount.
|
int |
decreasePreorderLevel(java.lang.String pId,
long pQuantity)
Decrease an item's preorder level by the specified amount.
|
int |
decreaseStockLevel(java.lang.String pId,
double pQuantity)
Decrease an item's stock level by the specified amount.
|
int |
decreaseStockLevel(java.lang.String pId,
long pQuantity)
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,
double pQuantity)
Increase an item's backorder level by the specified number.
|
int |
increaseBackorderLevel(java.lang.String pId,
long pQuantity)
Increase an item's backorder level by the specified number.
|
int |
increasePreorderLevel(java.lang.String pId,
double pQuantity)
Increase an item's preorder level by the specified number.
|
int |
increasePreorderLevel(java.lang.String pId,
long pQuantity)
Increase an item's preorder level by the specified number.
|
int |
increaseStockLevel(java.lang.String pId,
double pQuantity)
Increase an item's stock level by the specified number.
|
int |
increaseStockLevel(java.lang.String pId,
long pQuantity)
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,
double pQuantity)
Preorder an item.
|
int |
preorder(java.lang.String pId,
long pQuantity)
Preorder an item.
|
int |
purchase(java.lang.String pId,
double pQuantity)
Actually purchases a product.
|
int |
purchase(java.lang.String pId,
long pQuantity)
Actually purchases a product.
|
int |
purchaseOffBackorder(java.lang.String pId,
double pQuantity)
Actually purchases a product.
|
int |
purchaseOffBackorder(java.lang.String pId,
long pQuantity)
Actually purchases a product.
|
int |
purchaseOffPreorder(java.lang.String pId,
double pQuantity)
Actually purchases a product.
|
int |
purchaseOffPreorder(java.lang.String pId,
long pQuantity)
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.
|
double |
queryBackorderLevelWithFraction(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.
|
double |
queryPreorderLevelWithFraction(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.
|
double |
queryStockLevelWithFraction(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,
double pQuantity)
Set an item's backorder level to the specified number.
|
int |
setBackorderLevel(java.lang.String pId,
long pQuantity)
Set an item's backorder level to the specified number.
|
int |
setBackorderThreshold(java.lang.String pId,
long pQuantity)
Set an item's backorder level threshold.
|
int |
setPreorderLevel(java.lang.String pId,
double pQuantity)
Set an item's preorder level to the specified number.
|
int |
setPreorderLevel(java.lang.String pId,
long pQuantity)
Set an item's preorder level to the specified number.
|
int |
setPreorderThreshold(java.lang.String pId,
long pQuantity)
Set an item's preorder level threshold.
|
int |
setStockLevel(java.lang.String pId,
double pQuantity)
Set an item's stock level to the specified number.
|
int |
setStockLevel(java.lang.String pId,
long pQuantity)
Set an item's stock level to the specified number.
|
int |
setStockThreshold(java.lang.String pId,
long pQuantity)
Set an item's stock level threshold.
|
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
*java.lang.String getInventoryName()
int purchase(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the quantity of productInventoryException
- if there was a problem during the purchase process.int purchase(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the quantity of productInventoryException
- if there was a problem during the purchase process.int purchaseOffBackorder(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the quantity of productInventoryException
- if there was a problem during the purchase process.int purchaseOffBackorder(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the quantity of productInventoryException
- if there was a problem during the purchase process.int purchaseOffPreorder(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the quantity of productInventoryException
- if there was a problem during the purchase process.int purchaseOffPreorder(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the quantity of productInventoryException
- if there was a problem during the purchase process.int preorder(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the quantity of productInventoryException
- if there was a problem in trying to preorder the itemint preorder(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the quantity of productInventoryException
- if there was a problem in trying to preorder the itemint backorder(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the quantity of productInventoryException
- if there was a problem with the backordering process.int backorder(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the quantity of productInventoryException
- if there was a problem with the backordering process.int setStockLevel(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of the given item to restockInventoryException
- if there was a problem trying to restockint setStockLevel(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of the given item to restockInventoryException
- if there was a problem trying to restockint setBackorderLevel(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of the given item to restockInventoryException
- if there was a problem trying to restockint setBackorderLevel(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of the given item to restockInventoryException
- if there was a problem trying to restockint setPreorderLevel(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of the given item to restockInventoryException
- if there was a problem trying to restockint setPreorderLevel(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of the given item to restockInventoryException
- if there was a problem trying to restockint increaseStockLevel(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to add to the current stock levelInventoryException
- if there was a problem trying to restockint increaseStockLevel(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to add to the current stock levelInventoryException
- if there was a problem trying to restockint decreaseStockLevel(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to decrease from the current stock levelInventoryException
- if there was a problem trying to restockint decreaseStockLevel(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to decrease from the current stock levelInventoryException
- if there was a problem trying to restockint increaseBackorderLevel(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to add to the current stock levelInventoryException
- if there was a problem trying to restockint increaseBackorderLevel(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to add to the current stock levelInventoryException
- if there was a problem trying to restockint decreaseBackorderLevel(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to decrease from the current stock levelInventoryException
- if there was a problem trying to restockint decreaseBackorderLevel(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to decrease from the current stock levelInventoryException
- if there was a problem trying to restockint increasePreorderLevel(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to add to the current stock levelInventoryException
- if there was a problem trying to restockint increasePreorderLevel(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to add to the current stock levelInventoryException
- if there was a problem trying to restockint decreasePreorderLevel(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to decrease from the current stock levelInventoryException
- if there was a problem trying to restockint decreasePreorderLevel(java.lang.String pId, double pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of items to decrease from the current stock levelInventoryException
- if there was a problem trying to restockint setStockThreshold(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of the given item to restockInventoryException
- if there was a problem trying to restockint setBackorderThreshold(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of the given item to restockInventoryException
- if there was a problem trying to restockint setPreorderThreshold(java.lang.String pId, long pQuantity) throws InventoryException
pId
- the id of the item involvedpQuantity
- the number of the given item to restockInventoryException
- if there was a problem trying to restockint 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 itemlong queryStockLevel(java.lang.String pId) throws InventoryException
InventoryException
- if there was a problem determining the numberdouble queryStockLevelWithFraction(java.lang.String pId) throws InventoryException
InventoryException
- if there was a problem determining the numberlong queryBackorderLevel(java.lang.String pId) throws InventoryException
InventoryException
- if there was a problem determining the numberdouble queryBackorderLevelWithFraction(java.lang.String pId) throws InventoryException
InventoryException
- if there was a problem determining the numberlong queryPreorderLevel(java.lang.String pId) throws InventoryException
InventoryException
- if there was a problem determining the numberdouble queryPreorderLevelWithFraction(java.lang.String pId) throws InventoryException
InventoryException
- if there was a problem determining the numberlong queryStockThreshold(java.lang.String pId) throws InventoryException
InventoryException
- if there was a problem determining the numberlong queryBackorderThreshold(java.lang.String pId) throws InventoryException
InventoryException
- if there was a problem determining the numberlong queryPreorderThreshold(java.lang.String pId) throws InventoryException
InventoryException
- if there was a problem determining the numberjava.util.Date queryAvailabilityDate(java.lang.String pId) throws InventoryException
InventoryException
- if there was a problem determining the dateint inventoryWasUpdated(java.util.List pItemIds) throws InventoryException
pItemIds
- The items with recently added inventoryInventoryException
void acquireInventoryLocks(java.util.List pItemIds) throws InventoryException
InventoryException
void releaseInventoryLocks(java.util.List pItemIds) throws InventoryException
InventoryException