com.ibm.commerce.requisitionlist.commands
Class RequisitionListItemUpdateCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.orderitems.commands.OrderItemBaseCmdImpl
|
+--com.ibm.commerce.orderitems.commands.OrderItemUpdateCmdImpl
|
+--com.ibm.commerce.requisitionlist.commands.RequisitionListItemUpdateCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderItemAddCmd, OrderItemUpdateCmd, Protectable, RequisitionListItemUpdateCmd
- public class RequisitionListItemUpdateCmdImpl
- extends OrderItemUpdateCmdImpl
- implements RequisitionListItemUpdateCmd
Add, update and delete items in a requisition list.
Fields inherited from class com.ibm.commerce.orderitems.commands.OrderItemBaseCmdImpl |
CLASS_NAME, GENERATED_ORDERITEM, iATPParms, iCommandExecuted, ihsATPParmsDefaults, ihshAddress_id, ihshAttr_name, ihshAttr_value, ihshCatentry_id, ihshComment, ihshConfigurationId, ihshContract_id, ihshCorrelationGroup, ihshDescription, ihshField1, ihshField2, ihshKey, ihshMember_id, ihshOffer_id, ihshOrderitem_id, ihshOrderResourceList, ihshOutOrderItemId, ihshPart_number, ihshQuantity, ihshShipmode_id, ihshStoreResourceList, ihshUom, iList_id, iList_order_id, iNew_order_id, iNewQuantity, inItemSpecId, iOrder_desc, iOrderIdProperty, iOut_order_name, iOut_orderitem_name, iResolvedOrderIdList, iResolvedRequestProperties, iResourcelist, iUniqueOrderIdList, iUniqueOrderitemIdList, iUniqueStoreIdList, iValidInputPOrderValues, ivecComponentList, MANUAL_FULFILLMENT_CENTER, MANUAL_PRICE, NORMAL_ORDERITEM, STR_ADDRESS_ID, STR_ATTR_NAME, STR_ATTR_VALUE, STR_CATENTRY_ID, STR_COMMENT, STR_CONFIGURATION_ID, STR_CONTRACT_ID, STR_CORRELATION_GROUP, STR_DESCRIPTION, STR_FIELD1, STR_FIELD2, STR_INVALID_INPUT_ERROR_VIEW, STR_LIST_ID, STR_MEMBER_ID, STR_OFFER_ID, STR_ORDER_DESC, STR_ORDER_ID, STR_ORDERITEM_ID, STR_OUT_ORDER_NAME, STR_OUT_ORDERITEM_NAME, STR_PART_NUMBER, STR_QUANTITY, STR_SHIPMODE_ID, STR_STORE_ID, STR_UOM |
Methods inherited from class com.ibm.commerce.orderitems.commands.OrderItemBaseCmdImpl |
checkBuyable, checkProductEntitlement, createOrder, getAddressId, getATPParms, getAttributeNVP, getCatEntryId, getComment, getConfigurationId, getContractId, getCorrelationGroup, getDescription, getField1, getField2, getItemSpecId, getMemberId, getNewOrderId, getNewOrderItemIds, getOfferId, getOrderDesc, getOrderId, getOrderIds, getOrderItemId, getOrderItemIds, getPartNumber, getQuantity, getResolvedRequestProperties, getRoundedQuantityAmount, getShipModeId, getTheUser, getTheUserId, getTradingId, getUOM, insertAddressId, insertItemSpecId, insertOrderItem, insertOrderItem, insertPartNumber, invalidateAllocation, isReadyToCallExecute, setAddressId, setATPParms, setAttrName, setAttrValue, setCatEntryId, setComment, setConfigurationId, setContractId, setCorrelationGroup, setDescription, setField1, setField2, setItemSpecId, setListId, setMemberId, setOfferId, setOrderDesc, setOrderId, setOrderItemId, setOutOrderItemName, setOutOrderName, setPartNumber, setQuantity, setQuantity, setShipmodeId, setTradingId, setUom, updateAddressId, updateAllShippingAndAddress, updateComponentList, updateCorrelationGroup, updateCurrency, updateItemSpecId, updateOrderItem, updateOutOrderItemId, updateOutOrderItemName, updatePrice, updateQuantity, updateResourceList, updateShipModeId, updateShippingAndAddress |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.orderitems.commands.OrderItemUpdateCmd |
getOrderIds, getOrderItemIds, setAddressId, setAttrName, setAttrValue, setCatEntryId, setComment, setConfigurationId, setContractId, setCorrelationGroup, setDescription, setField1, setField2, setListId, setMemberId, setOfferId, setOrderDesc, setOrderId, setOrderItemId, setOutOrderItemName, setOutOrderName, setPartNumber, setQuantity, setShipmodeId, setTradingId, setUom |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
iRequisitionListId
protected java.lang.Long iRequisitionListId
- The id of the requisition list.
iRequisitionListStatus
protected java.lang.String iRequisitionListStatus
RequisitionListItemUpdateCmdImpl
public RequisitionListItemUpdateCmdImpl()
checkValidStatus
protected void checkValidStatus(OrderAccessBean orderAB)
throws ECException,
javax.ejb.FinderException,
javax.ejb.CreateException,
javax.naming.NamingException,
java.rmi.RemoteException,
java.sql.SQLException
- It checks the validation of the order status. The status can only be 'Y' or 'Z'.
It overwrites the method in the super class.
- Overrides:
checkValidStatus
in class OrderItemBaseCmdImpl
- Following copied from class:
com.ibm.commerce.orderitems.commands.OrderItemBaseCmdImpl
- Throws:
ECApplicationException
- with message key _ERR_ORDER_WRONG_STATUS if the status is not valid.
getRequisitionListId
protected java.lang.Long getRequisitionListId()
- Returns the id of the requisition list.
getResources
public AccessVector getResources()
throws ECException
- It returns the order access bean.
It overwrites the method in the super class.
- Specified by:
getResources
in interface ECCommand
- Overrides:
getResources
in class OrderItemBaseCmdImpl
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Returns:
- AccessVector - a vector of resource action pairs
migrateInterestItemsToOrderItems
protected void migrateInterestItemsToOrderItems()
throws ECException,
javax.ejb.FinderException,
javax.ejb.CreateException,
javax.naming.NamingException,
java.rmi.RemoteException,
java.sql.SQLException
- It does nothing.
It overwrites the method in the super class.
- Overrides:
migrateInterestItemsToOrderItems
in class OrderItemBaseCmdImpl
performExecute
public void performExecute()
throws ECException
- Description copied from interface:
ECCommand
- Contains the actual business logic of the command
It should be implemented by all the command writer.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class OrderItemBaseCmdImpl
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.
reset
public void reset()
- Description copied from class:
AbstractECTargetableCommand
- This method should be called after a command has been executed to reset its states variables.
After the call to reset, we should be able to execute the command again.
- Overrides:
reset
in class OrderItemBaseCmdImpl
resolveOrderId
protected void resolveOrderId()
throws ECException
- It overwrites the method in the super class.
- Overrides:
resolveOrderId
in class OrderItemBaseCmdImpl
setRequestProperties
public void setRequestProperties(TypedProperty reqProperties)
throws ECApplicationException
- Description copied from interface:
ControllerCommand
- The WebController calls this method before invoking the execute method in this command to
set the request properties for this command.
It is the responsibility of the implementer of the ControllerCommand to extract the
required input parameters from the request properties and perform parameter checking.
- Specified by:
setRequestProperties
in interface ControllerCommand
- Overrides:
setRequestProperties
in class OrderItemBaseCmdImpl
- Following copied from interface:
com.ibm.commerce.command.ControllerCommand
- Parameters:
requestProperties
- com.ibm.commerce.datatype.TypedProperty- Throws:
com.ibm.commerce.exception.ECException.
-
setRequisitionListId
public void setRequisitionListId(java.lang.Long id)
- Description copied from interface:
RequisitionListItemUpdateCmd
- Specifies the requisition list id to be updated.
- Specified by:
setRequisitionListId
in interface RequisitionListItemUpdateCmd
setStatus
public void setStatus(java.lang.String status)
- Specified by:
setStatus
in interface RequisitionListItemUpdateCmd
unLockOrder
protected void unLockOrder(java.lang.String orderId)
throws ECException,
javax.ejb.FinderException,
javax.ejb.CreateException,
javax.naming.NamingException,
java.rmi.RemoteException,
java.sql.SQLException
- It unlocks the order.
It overwrites the method in the super class. It does not set the status to 'P'.
- Overrides:
unLockOrder
in class OrderItemBaseCmdImpl
updateFulfillmentCenter
protected void updateFulfillmentCenter()
throws ECException,
javax.ejb.FinderException,
javax.ejb.CreateException,
javax.naming.NamingException,
java.rmi.RemoteException,
java.sql.SQLException
- It does nothing.
It overwrites the method in the super class.
- Overrides:
updateFulfillmentCenter
in class OrderItemBaseCmdImpl
updateOrderItem
protected void updateOrderItem(OrderItemAccessBean orderitemAB,
java.lang.Integer i)
throws ECException,
javax.ejb.FinderException,
javax.ejb.CreateException,
javax.naming.NamingException,
java.rmi.RemoteException,
java.sql.SQLException
- It updates the order item.
It overwrites the method in the super class. It does not update price.
- Overrides:
updateOrderItem
in class OrderItemBaseCmdImpl
updateOutOrderName
protected void updateOutOrderName()
- It adds the order id and the requisition list id to the output response property.
It overwrites the method in the super class.
- Overrides:
updateOutOrderName
in class OrderItemBaseCmdImpl
validateParameters
public void validateParameters()
throws ECException
- Validate the input parameters.
It checks the validation of the follwoing parameter values:
Exception:
- It throws an ECApplicationException with the message key _ERR_INVALID_ORDER_REFNUM, if the input parameter requisitionListId is not a valid order id.
- It also calls super.validateParameters() to do the additional parameters validation.
- If the super class throws exception with error view badPartNumberErrorView, it changes the error view to RLBadPartNumberErrorView.
- If the super class throws exception with error view InvalidInputErrorView, it changes the error view to RLInvalidInputErrorView.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class OrderItemBaseCmdImpl
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
ECException.
-
validateTradingPaymentMethods
protected void validateTradingPaymentMethods()
throws ECException,
javax.ejb.FinderException,
javax.ejb.CreateException,
javax.naming.NamingException,
java.rmi.RemoteException,
java.sql.SQLException
- Does nothing. It overwrites the method in the super class.
- Overrides:
validateTradingPaymentMethods
in class OrderItemBaseCmdImpl