java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.requisitionlist.commands.RequisitionListBaseCmdImpl | +--com.ibm.commerce.requisitionlist.commands.RequisitionListSubmitCmdImpl
Submit a requisition list for order processing. This command calls the following TaskCommands:
This command uses the following AccessBeans:
Field Summary | |
---|---|
protected
java.lang.Long[] |
iContractId The contract id. |
protected
java.lang.Long[] |
iOfferId The offer id. |
Fields inherited from class com.ibm.commerce.requisitionlist.commands. RequisitionListBaseCmdImpl |
COPYRIGHT,
iOrderId,
iRequisitionListId,
iRequisitionListName,
iRequisitionListStatus |
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.requisitionlist.commands. RequisitionListSubmitCmd |
COPYRIGHT,
defaultCommandClassName,
NAME |
Constructor Summary | |
---|---|
RequisitionListSubmitCmdImpl() |
Method Summary | |
---|---|
protected
void |
action() The main action of the command. |
void |
addOrderItemNVPs(
TypedProperty req,
OrderItemAccessBean orderItemAB, int i) Add some name value pairs to the req based on the columns in the orderItamAB. |
protected
OrderAccessBean |
copyOrder(
OrderAccessBean fromOrderAB) Copy the OrderAccessBean fromOrderAB and return a new created OrderAccessBean which is a clone of fromOrderAB. |
protected
java.lang.String[] |
getContractId() Return an array of contract ids. |
protected
java.lang.String[] |
getOfferId() Return an array of offer ids. |
java.lang.Long |
getOrderId() Returns the order id. |
AccessVector |
getResources() It returns the store access bean and the order access bean. |
void |
performExecute() The main execution of the command. |
protected
void |
prepareOrder(java.lang.Long orderId) Prepare an order. |
void |
setContractId(java.lang.Long[] id) Specifies an array of contract ids for price calculation. |
void |
setOfferId(java.lang.Long[] id) Specifies an array of offer ids for price calculation. |
void |
setRequestProperties(
TypedProperty reqProperties) Sets the request properties. |
void |
setRequisitionListId(java.lang.Long id) Specifies the requisition list id to be submitted. |
protected
void |
updateResponseView() Sets the response view - Redirect View. |
void |
validateParameters() Validate the input parameters. |
Methods inherited from class com.ibm.commerce.requisitionlist.commands. RequisitionListBaseCmdImpl |
copyOrder,
copyOrderAccessBean,
copyOrderItemAccessBean,
copyOrderPayInfo,
getName,
getRequisitionListId,
getStatus,
reset,
setDefaultRequisitionListStatus,
setName,
setOrderId,
setRequisitionListStatus,
setStatus |
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,
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 |
---|
protected java.lang.Long[] iContractId
protected java.lang.Long[] iOfferId
Constructor Detail |
---|
public RequisitionListSubmitCmdImpl()
Method Detail |
---|
protected void action() throws java.sql.SQLException, CreateException, FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
It calls copyOrder() to copy the requisition list and then calls prepareOrder() to prepare the order.
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
SQLException
public void addOrderItemNVPs(TypedProperty req, OrderItemAccessBean orderItemAB, int i) throws java.sql.SQLException, CreateException, FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
req
- request propertiesorderItemAB
- OrderItemAccessBeani
- intECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
SQLException
protected OrderAccessBean copyOrder(OrderAccessBean fromOrderAB) throws java.sql.SQLException, CreateException, FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
copyOrder
in class
RequisitionListBaseCmdImpl
fromOrderAB
- OrderAccessBeanECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
SQLException
protected java.lang.String[] getContractId()
protected java.lang.String[] getOfferId()
public java.lang.Long getOrderId()
getOrderId
in class
RequisitionListBaseCmdImpl
public AccessVector getResources() throws ECException
getResources
in interface
ECCommand
getResources
in class
AbstractECTargetableCommand
ECException
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
protected void prepareOrder(java.lang.Long orderId) throws java.sql.SQLException, CreateException, FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
orderId
- order idECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
SQLException
public void setContractId(java.lang.Long[] id)
setContractId
in interface
RequisitionListSubmitCmd
id
- an array of contract ids.public void setOfferId(java.lang.Long[] id)
setOfferId
in interface
RequisitionListSubmitCmd
id
- an array of offer ids.public void setRequestProperties(TypedProperty reqProperties) throws ECException
setRequestProperties
in interface
ControllerCommand
setRequestProperties
in class
RequisitionListBaseCmdImpl
reqProperties
- request properties.ECException
public void setRequisitionListId(java.lang.Long id)
setRequisitionListId
in interface
RequisitionListSubmitCmd
setRequisitionListId
in class
RequisitionListBaseCmdImpl
id
- requisition list idprotected void updateResponseView()
updateResponseView
in class
RequisitionListBaseCmdImpl
public void validateParameters() throws ECException
It checks the following mandatory parameters:
Exception:
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException