com.ibm.commerce.returns.commands
Class ReturnItemAddCmdImpl
java.lang.Object
|
+--CacheableCommandImpl
|
+--com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.returns.commands.ReturnItemBaseCmdImpl
|
+--com.ibm.commerce.returns.commands.ReturnItemAddCmdImpl
- All Implemented Interfaces:
-
AccCommand,
ControllerCommand,
ECCommand,
ECTargetableCommand,
ReturnItemAddCmd,
ReturnItemUpdateCmd
- public class ReturnItemAddCmdImpl
- extends
ReturnItemBaseCmdImpl
- implements
ReturnItemAddCmd
Default implementation of the controller command
ReturnItemAddCmdS
interface. Add a item to an return mechandise
authorization (RMA). This command can be called with a list of order items and
cat entries. Each will be processed in the following way:
- if order item to be added to RMA then
- Call CheckReturnItemAccess task command to see if the user of the command
has access to the order item (i.e. owns the order item) and the RMA (if it
already exists). If not, error.
- If RMA id is supplied, check to see if it exists. If not, return an error.
If '**' is supplied as the RMA id, create a new RMA.
- Check that currency of order item is the same as the currency of the order
item for other RMA items already on the RMA. If not, return a currency
inconsistency error.
- Add item to RMA. Explode RMA item into RMA item component based on order
shipping history.
- Call task command CalculateReturnItemCredit to calculate default credit
amount. Set credit amount on RMA item.
- else cateEntry to be added to RMA
- resolve catEntryId to itemSpecId and add itemSpecId to RMA.
- Call task command CalculateReturnItemCreditForCatEntry.
- Call task command AutoApproveReturnItem to see if item is automatically
approved. Mark rmaItem as either "system-approved" or "approval
pending" depending on result from task command.
- See Also:
com.ibm.commerce.returns.commands.ReturnBaseItemCmdImpl
,
Serialized
Form
Fields inherited from class
com.ibm.commerce.returns.commands.
ReturnItemBaseCmdImpl |
ihshAttr_name,
ihshAttr_value,
ihshCatentry_id,
ihshComment,
ihshCreditAdjustment,
ihshKey,
ihshOrderitem_id,
ihshQuantity,
ihshReason,
ihshReasonId,
ihshReceive,
ihshRMAItem_id,
ihshUom,
STR_ATTR_NAME,
STR_ATTR_VALUE,
STR_CATENTRY_ID |
Method Summary |
protected
boolean |
doAdd()
This method is reserved for IBM internal use only. |
protected
boolean |
doUpdate()
This method is reserved for IBM internal use only. |
protected
void |
extendCommand()
Extend the command here. |
protected
int |
getMe()
This method is reserved for IBM internal use only. |
AccessVector |
getResources()
Gets the vector of resources accessed by this
command. |
Methods inherited from class
com.ibm.commerce.returns.commands.
ReturnItemBaseCmdImpl |
getAttributeNVP,
getCatEntryId,
getCreditAdjustment,
getNormalizedQuantity,
getOrderItemAB,
getOrderItemId,
getOrderList,
getQuantity,
getReason,
getReasonId,
getReceive,
getRMA,
getRMAItemId,
getUOM,
getUpdateRMA,
isAdminCommand,
isCatEntryWithoutOrderItemReturnAllowedForShopper,
isNewRMA,
performExecute,
reset,
setRequestProperties,
validateParameters |
Methods inherited from class
com.ibm.commerce.command.
ControllerCommandImpl |
checkPermission,
fulfills,
getForUserId,
getGeneric,
getOwner,
getRequestProperties,
getResolvedRequestProperties,
getResourceOwners,
getResponseProperties,
getRetriable,
getViewInputProperties,
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,
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.
ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getStoreId,
getUser,
getUserId,
performExecute,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
ReturnItemAddCmdImpl
public ReturnItemAddCmdImpl()
- ReturnItemAddCmdImpl constructor.
doAdd
protected boolean doAdd()
- This method is reserved for IBM internal use only.
-
- Specified by:
-
doAdd
in class
ReturnItemBaseCmdImpl
-
- Returns:
- Always returns true because running
ReturnItemAddCmdImpl.
doUpdate
protected boolean doUpdate()
- This method is reserved for IBM internal use only.
-
- Specified by:
-
doUpdate
in class
ReturnItemBaseCmdImpl
-
- Returns:
- Always returns false because not running
ReturnItemUpdateCmdImpl.false.
extendCommand
protected void extendCommand()
throws ECException
- Extend the command here. This implementation calls the task command
ExtendReturnItemAddCmd.
-
- Specified by:
-
extendCommand
in class
ReturnItemBaseCmdImpl
-
-
ECException
getMe
protected int getMe()
- This method is reserved for IBM internal use only.
-
- Specified by:
-
getMe
in class
ReturnItemBaseCmdImpl
-
- Returns:
- Identifies if a CSR or a customer issued the command
getResources
public AccessVector getResources()
throws ECException
- Gets the vector of resources accessed by this command.
-
- Specified by:
-
getResources
in interface
ECCommand
- Overrides:
-
getResources
in class
AbstractECTargetableCommand
-
- Returns:
- The vector of resource action pairs - If a new RMA is being created then
return the store access bean; otherwise return the RMA access bean. Also return
all order access beans that are used.
-
ECException