java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.tools.command.ToolsControllerCommandImpl | +--com.ibm.commerce.inventory.commands.ExpectedInventoryRecordCreateCmdImpl
Default implementation of the ExpectedInventoryRecordCreateCmd
interface. Creates an expected inventory record.
If a redirect URL is not provided, calls ExpectedInventoryRecordCreateRedirectView upon successful completion, or ExpectedInventoryRecordCreateErrorView upon failure.
Utilizes these access beans
BaseItemAccessBean
ExpectedInventoryRecordsAccessBean
ExpectedInventoryRecordsDetailAccessBean
ItemFulfillmentCenterAccessBean
ItemSpecificationAccessBean
StoreEntityAccessBean
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT The internal copyright field. |
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl |
requestProperties,
responseProperties,
retriable,
viewReqProperties |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.inventory.commands. ExpectedInventoryRecordCreateCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.tools.common. ECToolsConstants |
EC_LINE_SEPARATOR,
EC_TOOLS_FULFILLMENT_CENTER_ID,
EC_TOOLS_MERCHANT_CENTER_URL,
EC_TOOLS_STORE_LANGUAGE_URL,
EC_TOOLS_STORES_ACCESS_CONTROL_REQUIRED,
EC_TOOLS_STORES_EMPTY,
EC_TOOLS_STORES_NO_ACCESS,
EC_TOOLS_STORES_NOT_ADMINISTRATOR,
EC_XML,
EC_XMLFILE,
EC_XMLFILEOBJECT,
EC_XMLOBJECT,
EC_XMLSTRING |
Constructor Summary | |
---|---|
ExpectedInventoryRecordCreateCmdImpl() |
Method Summary | |
---|---|
protected
void |
checkEIRDetailException() Checks if the detailed information about items on the expected inventory record are missing or not in the right data type. |
void |
checkForeignKeyViolation() Checks for foreign key violation. |
protected
void |
checkIllegalArgumentException() Checks if the timestamp fields are not in the right timestamp format. |
protected
void |
checkNumberFormatException() Checks if the numeric fields are not in the right numeric format. |
protected
void |
checkParametersException() Checks if the required fields are missing or not in the right data type. |
void |
createItemffmctr(java.lang.Long itemspcId) Adds a new row in itemffmctr table for this item, store and fulfillment center if row does not yet exist when the expected inventory record is created. |
java.util.Vector |
getAddedItem() Returns the list of items included in the new expected inventory record. |
int |
getAddedSize() Returns the number of items included in the new expected inventory record. |
java.lang.String |
getExpectedDate() Returns the date the inventory is expected. |
java.lang.String |
getExternalId() Returns the external identifier. |
java.lang.String |
getFfmcenterId() Returns the fulfillment center identifier. |
java.lang.String |
getItemspcId() Returns the item identifier. |
java.lang.String |
getOrderDate() Returns the date this order is created with the vendor. |
java.lang.String |
getQtyOrdered() Returns quantity ordered from vendor. |
java.lang.String |
getRaDetailComment() Returns the comment. |
java.lang.String |
getRaId() Returns the new expected inventory record identifier. |
AccessVector |
getResources() Gets the access vector accessed by this command. |
java.lang.String |
getVendorId() Returns the vendor identifier. |
protected
void |
handleSubmitError(
ECException e) Constructs and returns the error message. |
void |
performExecute() Performs the execution of creating an expected inventory record. |
void |
setAddedItem(java.util.Vector newAddedItem) Sets the list of items included in the new expected inventory record. |
void |
setAddedSize(java.lang.String newAddedSize) Sets the number of items included in the new expected inventory record. |
void |
setExpectedDate(java.lang.String newExpectedDate) Sets the date the inventory is expected. |
void |
setExternalId(java.lang.String newExternalId) Sets the external identifier. |
void |
setFfmcenterId(java.lang.String newFfmcenterId) Sets the fulfillment center identifier. |
void |
setItemspcId(java.lang.String newItemspcId) Sets item identifier. |
void |
setOrderDate(java.lang.String newOrderDate) Sets the date this order is created with the vendor. |
void |
setQtyOrdered(java.lang.String newQtyOrdered) Sets quantity ordered from vendor. |
void |
setRaDetailComment(java.lang.String newRaDetailComment) Sets the comment. |
void |
setRaId(java.lang.String newRaId) Sets the new expected inventory record identifier. |
void |
setVendorId(java.lang.String newVendorId) Sets the vendor identifer. |
void |
validateParameters() Validates the information of the expected inventory record to be created and sets the information into the command local variable. |
Methods inherited from class com.ibm.commerce.tools.command. ToolsControllerCommandImpl |
getViewInputProperties,
setRequestProperties |
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl |
checkPermission,
fulfills,
getForUserId,
getGeneric,
getOwner,
getRequestProperties,
getResolvedRequestProperties,
getResourceOwners,
getResponseProperties,
getRetriable,
isGeneric,
isRetriable,
mergeProperties,
setForUserId,
setGeneric,
setOwner,
setResponseProperties,
setRetriable,
setViewInputProperties |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Methods inherited from interface com.ibm.commerce.command. ControllerCommand |
checkPermission,
execute,
getGeneric,
getRequestProperties,
getResolvedRequestProperties,
getResponseProperties,
getRetriable,
getViewInputProperties,
isGeneric,
isRetriable,
mergeProperties,
setGeneric,
setRequestProperties,
setRetriable,
setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command. AccCommand |
accessControlCheck,
getAccCheck,
getForUserId,
getResourceOwners,
setAccCheck,
setForUserId,
setOwner |
Methods inherited from interface com.ibm.commerce.command. ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public ExpectedInventoryRecordCreateCmdImpl()
Method Detail |
---|
public java.util.Vector getAddedItem()
public int getAddedSize()
public java.lang.String getExpectedDate()
public java.lang.String getExternalId()
public java.lang.String getFfmcenterId()
public java.lang.String getItemspcId()
public java.lang.String getOrderDate()
public java.lang.String getQtyOrdered()
public java.lang.String getRaDetailComment()
public java.lang.String getRaId()
public java.lang.String getVendorId()
public void setAddedItem(java.util.Vector newAddedItem)
ExpectedInventoryRecordCreateCmd
setAddedItem
in interface
ExpectedInventoryRecordCreateCmd
newAddedItem
- list of itemsExpectedInventoryRecordCreateCmd.setAddedItem(java.util.Vector)
public void setAddedSize(java.lang.String newAddedSize)
ExpectedInventoryRecordCreateCmd
setAddedSize
in interface
ExpectedInventoryRecordCreateCmd
newAddedSize
- quantity of expected itesmExpectedInventoryRecordCreateCmd.setAddedSize(java.lang.String)
public void setExpectedDate(java.lang.String newExpectedDate)
newExpectedDate
- date expectedpublic void setExternalId(java.lang.String newExternalId)
ExpectedInventoryRecordCreateCmd
setExternalId
in interface
ExpectedInventoryRecordCreateCmd
newExternalId
- external idExpectedInventoryRecordCreateCmd.setExternalId(java.lang.String)
public void setFfmcenterId(java.lang.String newFfmcenterId)
newFfmcenterId
- fulfillment center idpublic void setItemspcId(java.lang.String newItemspcId)
newItemspcId
- item idpublic void setOrderDate(java.lang.String newOrderDate)
ExpectedInventoryRecordCreateCmd
setOrderDate
in interface
ExpectedInventoryRecordCreateCmd
newOrderDate
- order create dateExpectedInventoryRecordCreateCmd.setOrderDate(java.lang.String)
public void setQtyOrdered(java.lang.String newQtyOrdered)
newQtyOrdered
- quantitypublic void setRaDetailComment(java.lang.String newRaDetailComment)
newRaDetailComment
- Commentpublic void setRaId(java.lang.String newRaId)
newRaId
- record idpublic void setVendorId(java.lang.String newVendorId)
ExpectedInventoryRecordCreateCmd
setVendorId
in interface
ExpectedInventoryRecordCreateCmd
newVendorId
- vendor idExpectedInventoryRecordCreateCmd.setVendorId(java.lang.String)
public void validateParameters() throws ECException
checkParametersException()
to check required parms.
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECApplicationException
- If the XMLObject cannot be parsed as
expected, throw ECApplicationExceptionECException
checkParametersException()
protected void checkParametersException() throws ECApplicationException
ECApplicationException
- Indicate which field is missing or bad
_ERR_BAD_MISSING_CMD_PARAMETERpublic AccessVector getResources() throws ECException
Calls
StoreEntityAccessBean
.
getResources
in interface
ECCommand
getResources
in class
AbstractECTargetableCommand
ECException
-
public void performExecute() throws ECException
ExpectedInventoryRecordsAccessBean
and
ExpectedInventoryRecordsDetailAccessBean
Sets the expected
inventory id. Pulls information from the item vector to create the record
detail, utilizing
ItemSpecificationAccessBean
.
BaseItemAccessBean
is used to test if a dynamic kit.
ItemSpecificationAccessBean
to retrieve.)Add a new row in itemffmctr for this item, store and fufillment center, by
calling
createItemffmctr(java.lang.Long)
.
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECApplication
- If baseItem itemTypeId is dynamic syecify
_ERR_INVENTORY_DYNAMIC_KITS_NOT_ALLOWEDECException
- If required parameters are missing or malformed specify
_ERR_CMD_INVALID_PARAM, _ERR_BAD_MISSING_CMD_PARAMETER
ECSystemException
- Create error, _ERR_CREATE_EXCEPTION
ECSystemException
- Finder error, _ERR_FINDER_EXCEPTION
ECSystemException
- Naming error,
_ERR_NAMING_EXCEPTIONprotected void checkNumberFormatException() throws ECApplicationException
ECApplicationException
- Throw ECApplicationException to indicate
which field is bad.protected void checkIllegalArgumentException() throws ECApplicationException
ECApplicationException
- Throw ECApplicationException if there is an
illegal argument exception.protected void checkEIRDetailException() throws ECApplicationException
ECApplicationException
- Throw ECApplicationException to indicate
which field is missing or bad, or if there is an illegal argument exception, or
number format exception.public void checkForeignKeyViolation() throws ECApplicationException
performExecute()
.
ECApplicationException
- Message _ERR_RECORD_NOT_FOUND to indicate
which foreign or unique key is violated causing the record to not be
found.public void createItemffmctr(java.lang.Long itemspcId) throws ECException
ItemFulfillmentCenterAccessBean
is called. This row will be
used to record information about reserved quantities, amount on backorder, and
amount allocated to backorders for this item owned by this store at this
fulfillment center.
itemspcId
- item specification id Called by
performExecute()
.
ECSystemException
- Create error, _ERR_CREATE_EXCEPTION
ECSystemException
- Finder error, _ERR_FINDER_EXCEPTION
ECSystemException
- Naming error, _ERR_NAMING_EXCEPTION Throw
exception if the new row cannot be added.ECException
protected void handleSubmitError(ECException e) throws ECApplicationException
e
- exceptioncom.ibm.commerce.exception.ECApplicationException.
- Throw
ECApplicationException with the newly constructed message.
ECApplicationException