java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.inventory.commands.CreateReceiptCmdImpl
Default implementation of the CreateReceiptCmd
interface.
Creates a receipt of an item at a fulfillment center.
This command first determines the type of receipt to be created. If the expected inventory record detail identifier is provided, an expected inventory receipt will be created and the receipt type will be set to 'EIR'. If the disposition record identifier of returned item is provided, a return receipt will be created and the receipt type will be set to 'RTN'. Otherwise, an ad hoc receipt will be created and the receipt type will be set to 'ADHC'.
If this is an expected inventory receipt, the quantity received and quantity remaining of the corresponding expected inventory record detail will be updated.
If the receipt is created successfully, the receipt identifier will be
returned and the receipt will be made available to the distribution arrangement
by calling
MakeReceiptAvailableCmd
task command.
This command requires to have the store id set in the command context.
Required parameters are listed in the validateParameters
method.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT The internal copyright field. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.inventory.commands. CreateReceiptCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CreateReceiptCmdImpl() |
Method Summary | |
---|---|
java.lang.String |
getComment1() Gets the comment specified on the new receipt. |
java.lang.String |
getComment2() Gets the comment specified regarding the quality of the item received. |
java.math.BigDecimal |
getCost() Gets the unit cost of the item. |
java.lang.Long |
getDistArrangId() Gets the identifier of the distribution arrangement that has access to this received inventory. |
java.lang.Integer |
getFfmcenterId() Gets the identifier of the fulfillment center where the inventory was received. |
java.lang.Long |
getItemspcId() Gets the identifier of the item specified for receipt. |
java.lang.Long |
getMemberId() Gets the identifier of the owner of the received item. |
java.lang.String |
getPartNumber() Gets the part number of the received item. |
java.lang.Integer |
getQtyReceived() Gets the number of items received. |
java.lang.Long |
getRaDetailId() Gets the expected inventory record detail identifier for the expected inventory receipt. |
java.lang.Long |
getRcptAvailId() Gets the available receipt identifier. |
java.sql.Timestamp |
getReceiptDate() Gets the date the inventory was received. |
java.lang.Long |
getReceiptId() Gets the identifier of the new receipt. |
java.lang.String |
getReceiptType() Gets the type of receipt which indicates how this receipt was created. |
java.lang.Long |
getRtnRcptDspId() Gets the disposition record identifier of the item returned for receipt. |
java.lang.String |
getSetCCurr() Gets the currency of the cost field. |
java.lang.Long |
getVendorId() Gets the identifier of the vendor that supplied the inventory. |
java.lang.Long |
getVersionSpcId() Gets the product version identifier of the item returned for receipt. |
boolean |
isReadyToCallExecute() Ready to be executed. |
void |
performExecute() Performs the execution of creating a receipt. |
void |
reset() Resets the command local variable. |
void |
setComment1(java.lang.String newComment1) Sets the comment on the new receipt. |
void |
setComment2(java.lang.String newComment2) Sets the comment regarding the quality of the item received. |
void |
setCost(java.math.BigDecimal newCost) Sets the unit cost of the item being received. |
void |
setDistArrangId(java.lang.Long newDistArrangId) Sets the identifier of the distribution arrangement that has access to this received inventory. |
void |
setFfmcenterId(java.lang.Integer newFfmcenterId) Sets the fulfillment center identifier. |
void |
setItemspcId(java.lang.Long newItemspcId) Sets the identifier of the item specified for receipt. |
void |
setMemberId(java.lang.Long newMemberId) Sets the identifier of the owner of the item specified for receipt. |
void |
setPartNumber(java.lang.String newPartNumber) Sets the part number of the items being received. |
void |
setQtyReceived(java.lang.Integer newQtyReceived) Sets the number of items being received. |
void |
setRaDetailId(java.lang.Long newRaDetailId) Sets the identifier of the record detail of the expected inventory. |
void |
setRcptAvailId(java.lang.Long newRcptAvailId) Sets the identifier of the available receipt. |
void |
setReceiptDate(java.sql.Timestamp newReceiptDate) Sets the date the inventory was received. |
void |
setReceiptId(java.lang.Long newReceiptId) Sets identifier of the new receipt. |
void |
setReceiptType(java.lang.String newReceiptType) Sets the type of receipt which indicates how this receipt was created. |
void |
setRequestProperties(
TypedProperty newRequestProperties) Gets the information of receipt to be created and sets the information into the command local variable. |
void |
setRtnRcptDspId(java.lang.Long newRtnRcptDspId) Sets the disposition record identifier of the returned item. |
void |
setSetCCurr(java.lang.String newSetCCurr) Sets the currency of the cost field. |
void |
setVendorId(java.lang.Long newVendorId) Sets the identifier of the vendor that supplied the inventory. |
void |
setVersionSpcId(java.lang.Long newVersionSpcId) Sets the product version identifier of the item specified for receipt. |
void |
validateParameters() Checks the information of the receipt to be created. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public CreateReceiptCmdImpl()
Method Detail |
---|
public java.lang.String getComment1()
CreateReceiptCmd
getComment1
in interface
CreateReceiptCmd
CreateReceiptCmd.getComment1()
,
setComment1(java.lang.String)
public java.lang.String getComment2()
CreateReceiptCmd
getComment2
in interface
CreateReceiptCmd
CreateReceiptCmd.getComment2()
,
setComment2(java.lang.String)
public java.math.BigDecimal getCost()
CreateReceiptCmd
getCost
in interface
CreateReceiptCmd
CreateReceiptCmd.getCost()
,
setCost(java.math.BigDecimal)
public java.lang.Long getDistArrangId()
CreateReceiptCmd
getDistArrangId
in interface
CreateReceiptCmd
CreateReceiptCmd.getDistArrangId()
,
setDistArrangId(java.lang.Long)
public java.lang.Integer getFfmcenterId()
CreateReceiptCmd
getFfmcenterId
in interface
CreateReceiptCmd
CreateReceiptCmd.getFfmcenterId()
,
setFfmcenterId(java.lang.Integer)
public java.lang.Long getItemspcId()
CreateReceiptCmd
getItemspcId
in interface
CreateReceiptCmd
CreateReceiptCmd.getItemspcId()
,
setItemspcId(java.lang.Long)
public java.lang.Long getMemberId()
CreateReceiptCmd
getMemberId
in interface
CreateReceiptCmd
CreateReceiptCmd.getMemberId()
,
setMemberId(java.lang.Long)
public java.lang.String getPartNumber()
CreateReceiptCmd
getPartNumber
in interface
CreateReceiptCmd
CreateReceiptCmd.getPartNumber()
,
setPartNumber(java.lang.String)
public java.lang.Integer getQtyReceived()
CreateReceiptCmd
getQtyReceived
in interface
CreateReceiptCmd
CreateReceiptCmd.getQtyReceived()
,
setQtyReceived(java.lang.Integer)
public java.lang.Long getRaDetailId()
CreateReceiptCmd
getRaDetailId
in interface
CreateReceiptCmd
CreateReceiptCmd.getRaDetailId()
,
setRaDetailId(java.lang.Long)
public java.lang.Long getRcptAvailId()
CreateReceiptCmd
getRcptAvailId
in interface
CreateReceiptCmd
CreateReceiptCmd.getRcptAvailId()
,
setRcptAvailId(java.lang.Long)
public java.sql.Timestamp getReceiptDate()
CreateReceiptCmd
getReceiptDate
in interface
CreateReceiptCmd
CreateReceiptCmd.getReceiptDate()
,
setReceiptDate(java.sql.Timestamp)
public java.lang.Long getReceiptId()
CreateReceiptCmd
getReceiptId
in interface
CreateReceiptCmd
CreateReceiptCmd.getReceiptId()
,
setReceiptId(java.lang.Long)
public java.lang.String getReceiptType()
CreateReceiptCmd
getReceiptType
in interface
CreateReceiptCmd
CreateReceiptCmd.getReceiptType()
,
setReceiptType(java.lang.String)
public java.lang.Long getRtnRcptDspId()
CreateReceiptCmd
getRtnRcptDspId
in interface
CreateReceiptCmd
CreateReceiptCmd.getRtnRcptDspId()
,
setRtnRcptDspId(java.lang.Long)
public java.lang.String getSetCCurr()
CreateReceiptCmd
cost
field.
getSetCCurr
in interface
CreateReceiptCmd
CreateReceiptCmd.getSetCCurr()
,
setSetCCurr(java.lang.String)
public java.lang.Long getVendorId()
CreateReceiptCmd
getVendorId
in interface
CreateReceiptCmd
CreateReceiptCmd.getVendorId()
,
setVendorId(java.lang.Long)
public java.lang.Long getVersionSpcId()
CreateReceiptCmd
getVersionSpcId
in interface
CreateReceiptCmd
CreateReceiptCmd.getVersionSpcId()
,
setVersionSpcId(java.lang.Long)
public void setComment1(java.lang.String newComment1)
CreateReceiptCmd
setComment1
in interface
CreateReceiptCmd
newComment1
- generic comment, COMMENT1 propertygetComment1()
,
CreateReceiptCmd.setComment1(java.lang.String)
public void setComment2(java.lang.String newComment2)
CreateReceiptCmd
setComment2
in interface
CreateReceiptCmd
newComment2
- quality comment, COMMENT2 propertygetComment2()
,
CreateReceiptCmd.setComment2(java.lang.String)
public void setCost(java.math.BigDecimal newCost)
CreateReceiptCmd
setCost
in interface
CreateReceiptCmd
newCost
- cost of item, COST propertygetCost()
,
CreateReceiptCmd.setCost(java.math.BigDecimal)
public void setDistArrangId(java.lang.Long newDistArrangId)
CreateReceiptCmd
setDistArrangId
in interface
CreateReceiptCmd
newDistArrangId
- distribution arrangement identifier,
DISTARRANG_ID propertygetDistArrangId()
,
CreateReceiptCmd.setDistArrangId(java.lang.Long)
public void setFfmcenterId(java.lang.Integer newFfmcenterId)
CreateReceiptCmd
setFfmcenterId
in interface
CreateReceiptCmd
newFfmcenterId
- fulfillment center identifier, FFMCENTER_ID
propertygetFfmcenterId()
,
CreateReceiptCmd.setFfmcenterId(java.lang.Integer)
public void setItemspcId(java.lang.Long newItemspcId)
CreateReceiptCmd
setItemspcId
in interface
CreateReceiptCmd
newItemspcId
- item specified identifier, ITEMSPC_ID
propertygetItemspcId()
,
CreateReceiptCmd.setItemspcId(java.lang.Long)
public void setMemberId(java.lang.Long newMemberId)
CreateReceiptCmd
setMemberId
in interface
CreateReceiptCmd
newMemberId
- member identifier, MEMBER_ID propertygetMemberId()
,
CreateReceiptCmd.setMemberId(java.lang.Long)
public void setPartNumber(java.lang.String newPartNumber)
CreateReceiptCmd
setPartNumber
in interface
CreateReceiptCmd
newPartNumber
- part number, PARTNUMBER propertygetPartNumber()
,
CreateReceiptCmd.setPartNumber(java.lang.String)
public void setQtyReceived(java.lang.Integer newQtyReceived)
CreateReceiptCmd
setQtyReceived
in interface
CreateReceiptCmd
newQtyReceived
- quantity of received items, QTYRECEIVED
propertygetQtyReceived()
,
CreateReceiptCmd.setQtyReceived(java.lang.Integer)
public void setRaDetailId(java.lang.Long newRaDetailId)
CreateReceiptCmd
setRaDetailId
in interface
CreateReceiptCmd
newRaDetailId
- record detail identifier, RADETAIL_ID
propertygetRaDetailId()
,
CreateReceiptCmd.setRaDetailId(java.lang.Long)
public void setRcptAvailId(java.lang.Long newRcptAvailId)
CreateReceiptCmd
setRcptAvailId
in interface
CreateReceiptCmd
newRcptAvailId
- available receipt identifiergetRcptAvailId()
,
CreateReceiptCmd.setRcptAvailId(java.lang.Long)
public void setReceiptDate(java.sql.Timestamp newReceiptDate)
CreateReceiptCmd
setReceiptDate
in interface
CreateReceiptCmd
newReceiptDate
- receipt date, RECEIPTDATE propertygetReceiptDate()
,
CreateReceiptCmd.setReceiptDate(java.sql.Timestamp)
public void setReceiptId(java.lang.Long newReceiptId)
CreateReceiptCmd
setReceiptId
in interface
CreateReceiptCmd
newReceiptId
- new receipt identifier.getReceiptId()
,
CreateReceiptCmd.setReceiptId(java.lang.Long)
public void setReceiptType(java.lang.String newReceiptType)
CreateReceiptCmd
setReceiptType
in interface
CreateReceiptCmd
newReceiptType
- new receipt type, RECEIPTTYPE propertygetReceiptType()
,
CreateReceiptCmd.setReceiptType(java.lang.String)
public void setRtnRcptDspId(java.lang.Long newRtnRcptDspId)
CreateReceiptCmd
setRtnRcptDspId
in interface
CreateReceiptCmd
newRtnRcptDspId
- disposition record identifier, RTNRCPTDSP_ID
propertygetRtnRcptDspId()
,
CreateReceiptCmd.setRtnRcptDspId(java.lang.Long)
public void setSetCCurr(java.lang.String newSetCCurr)
CreateReceiptCmd
cost
field.
setSetCCurr
in interface
CreateReceiptCmd
newSetCCurr
- currency, SETCCURR propertygetSetCCurr()
,
CreateReceiptCmd.setSetCCurr(java.lang.String)
public void setVendorId(java.lang.Long newVendorId)
CreateReceiptCmd
setVendorId
in interface
CreateReceiptCmd
newVendorId
- vendor identifier, VENDOR_ID propertygetVendorId()
,
CreateReceiptCmd.setVendorId(java.lang.Long)
public void setVersionSpcId(java.lang.Long newVersionSpcId)
CreateReceiptCmd
setVersionSpcId
in interface
CreateReceiptCmd
newVersionSpcId
- version identifier, VERSIONSPC_ID
propertygetVersionSpcId()
,
CreateReceiptCmd.setVersionSpcId(java.lang.Long)
public void setRequestProperties(TypedProperty newRequestProperties) throws ECApplicationException
setRequestProperties
in interface
CreateReceiptCmd
newRequestProperties
- receipt properties All parameters are
optional (null allowed) for this method, though may be required for the
command.
ECApplicationException
validateParameters()
public boolean isReadyToCallExecute()
isReadyToCallExecute
in class
AbstractECTargetableCommand
public void validateParameters() throws ECException
Checks the information of the receipt to be created. Make sure all the required parameters were passed in, or collected from somewhere. Fields required to be set beforehand
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException
- If mandatory parameters are not passed in, throw ECApplicationException
specifying _ERR_BAD_MISSING_CMD_PARAMETER,
_ERR_DIDNT_SET_MERCHANTpublic void performExecute() throws ECException
If this is an expected inventory receipt, the quantity received and quantity remaining of the corresponding expected inventory record detail will be updated.
If the receipt is created successfully, the receipt identifier will be
returned and the receipt will be made available to the distribution arrangement
by calling
MakeReceiptAvailableCmd
.
Utilizes the following beans
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
-
public void reset()
reset
in class
AbstractECTargetableCommand