public class InventoryFormHandler extends GenericFormHandler
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
DEFAULT_PROPERTY_NAME |
static java.lang.String |
SKUVIEW |
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDSSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
InventoryFormHandler() |
| Modifier and Type | Method and Description |
|---|---|
int |
getBatchNumber()
The subset of ids in
catalogRefIds |
int |
getBatchSize()
catalogRefIds will contain this many ids. |
java.lang.String[] |
getCatalogRefIds()
This is an array of catalog ref ids returned from the
catalogRepository. |
Repository |
getCatalogRepository()
This is the repository where product catalog items are stored.
|
java.lang.String |
getChangedProperty()
The name of the property that is changing for
SKU. |
java.lang.String |
getErrorMessage()
If there is an error, this will contain its description.
|
InventoryManager |
getInventoryManager()
The inventory manager that will be notified of update inventory
|
java.lang.String |
getLocationId()
The location of the inventory that's changing.
|
java.lang.String |
getLowerBound()
The smallest value for
propertyName contained in
catalogRefIds |
java.lang.String |
getNewValue()
The value to set
changedProperty for SKU to |
int |
getNextBatchNumber()
One more than
batchNumber |
int |
getPreviousBatchNumber()
One less than
batchNumber |
java.lang.String |
getPropertyName()
This is the property of each catalog item in
catalogRepository that is bounded by
lowerBound and upperBound. |
java.lang.String |
getSetType()
The kind of change to make.
|
java.lang.String |
getSKU()
The id of the sku whose inventory is changing
|
java.util.List |
getUpdatedItemIdList()
A list of preordered ids.
|
java.lang.String |
getUpdatedItemIdString()
A space delimited string of sku ids
|
java.lang.String |
getUpperBound()
The largest value for
propertyName contained in
catalogRefIds |
boolean |
handleChangeInventory(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will update the
changedProperty of the inventory
item with catalogRefId of SKU by newValue. |
boolean |
handleUpdateInventory(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This handle method will call
inventoryManager.inventoryWasUpdated
with the ids contained in updatedItemIdList |
void |
setBatchNumber(int pBatchNumber) |
void |
setBatchSize(int pBatchSize) |
void |
setCatalogRefIds(java.lang.String[] pCatalogRefIds) |
void |
setCatalogRepository(Repository pCatalogRepository) |
void |
setChangedProperty(java.lang.String pChangedProperty) |
void |
setErrorMessage(java.lang.String pErrorMessage) |
void |
setInventoryManager(InventoryManager pInventoryManager) |
void |
setLocationId(java.lang.String pLocationId) |
void |
setLowerBound(java.lang.String pLowerBound) |
void |
setNewValue(java.lang.String pNewValue) |
void |
setPropertyName(java.lang.String pPropertyName) |
void |
setSetType(java.lang.String pSetType) |
void |
setSKU(java.lang.String pSKU) |
void |
setUpdatedItemIdList(java.util.List pUpdatedItemIdList) |
void |
setUpdatedItemIdString(java.lang.String pUpdatedItemIdString) |
void |
setUpperBound(java.lang.String pUpperBound) |
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwardsafterGet, beforeGetaddLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public static final java.lang.String SKUVIEW
public static final java.lang.String DEFAULT_PROPERTY_NAME
public void setSKU(java.lang.String pSKU)
public java.lang.String getSKU()
public void setLocationId(java.lang.String pLocationId)
public java.lang.String getLocationId()
public void setChangedProperty(java.lang.String pChangedProperty)
public java.lang.String getChangedProperty()
SKU.
Valid choices are:
public void setNewValue(java.lang.String pNewValue)
public java.lang.String getNewValue()
changedProperty for SKU topublic void setSetType(java.lang.String pSetType)
public java.lang.String getSetType()
public void setUpdatedItemIdString(java.lang.String pUpdatedItemIdString)
public java.lang.String getUpdatedItemIdString()
public void setUpdatedItemIdList(java.util.List pUpdatedItemIdList)
public java.util.List getUpdatedItemIdList()
public void setLowerBound(java.lang.String pLowerBound)
public java.lang.String getLowerBound()
propertyName contained in
catalogRefIdspublic void setUpperBound(java.lang.String pUpperBound)
public java.lang.String getUpperBound()
propertyName contained in
catalogRefIdspublic void setBatchNumber(int pBatchNumber)
public int getBatchNumber()
catalogRefIdsgetCatalogRefIds()public int getNextBatchNumber()
batchNumberpublic int getPreviousBatchNumber()
batchNumberpublic void setBatchSize(int pBatchSize)
public int getBatchSize()
catalogRefIds will contain this many ids.public void setCatalogRepository(Repository pCatalogRepository)
public Repository getCatalogRepository()
public void setPropertyName(java.lang.String pPropertyName)
public java.lang.String getPropertyName()
catalogRepository that is bounded by
lowerBound and upperBound.public void setCatalogRefIds(java.lang.String[] pCatalogRefIds)
public java.lang.String[] getCatalogRefIds()
catalogRepository.
It contains all catalog ref ids that are lower than
upperBound and higher than lowerBound.
The array will contain batchSize elements. If
batchNumber is 1, then the batchNumber
+ 1 through batchNumber * 2 elements will be
returned, and so on.public void setInventoryManager(InventoryManager pInventoryManager)
public InventoryManager getInventoryManager()
public void setErrorMessage(java.lang.String pErrorMessage)
public java.lang.String getErrorMessage()
public boolean handleChangeInventory(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
changedProperty of the inventory
item with catalogRefId of SKU by newValue.
The update is according to setType as follows:
javax.servlet.ServletExceptionjava.io.IOExceptionpublic boolean handleUpdateInventory(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
inventoryManager.inventoryWasUpdated
with the ids contained in updatedItemIdListjavax.servlet.ServletExceptionjava.io.IOExceptionInventoryManager.inventoryWasUpdated(java.util.List)