java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.me.commands.BatchOrderRequestCmdImpl
This controller command will receive a PurchaseOrderRequest message from a buyer organization using procurement system and creates an order.
Field Summary | |
---|---|
protected
java.lang.Integer |
authType |
protected
java.lang.Long |
btAddressId |
protected
long |
buyerId |
protected
java.lang.Long |
catalogId |
protected
CIData |
ciData |
protected
java.lang.Long |
contractId |
protected
java.lang.Long |
memberGroupId |
protected
java.lang.Long |
oldOrderId |
protected
java.util.Vector |
oldQuotes |
protected
java.lang.Long |
orderId |
protected
java.lang.Long |
organizationUnitId |
protected
ProcurementProtocolAccessBean |
protocolBean |
protected
java.lang.Integer |
protocolId |
protected
java.lang.String |
requisitionerId |
protected
boolean |
solicitedOrder indicate whether order is solicited, default to false |
protected
java.lang.Long |
stAddressId |
protected
java.lang.Integer |
storeId |
protected
long |
supplierId |
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.me.commands. BatchOrderRequestCmd |
COPYRIGHT,
CREATE_MODE,
defaultCommandClassName,
DELETE_MODE,
messageName,
NAME,
UPDATE_MODE |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Constructor Summary | |
---|---|
BatchOrderRequestCmdImpl() Default Constructor |
Method Summary | |
---|---|
protected
void |
checkRegistration() Check the user registration. |
protected
void |
createOrderMessagingExtensionRecord(java.lang.Long orderRn) Creates an order extension record. |
protected
void |
doProcess() The main business logic, processes the PurchaseOrderRequest message from the buyer organization using procurement system and creates an order. |
java.lang.Integer |
getAuthType() Gets the authentication type |
java.lang.Long |
getBuyerId() Gets the buyer id |
java.lang.Long |
getContractId() Gets the contract id |
java.lang.Long |
getOrganizationUnitId() Gets the organization unit id |
java.lang.Integer |
getProtocolId() Gets the protocol id |
java.lang.String |
getRequisitionerId() Gets the requisitioner id |
java.lang.Integer |
getStoreId() Gets the store id |
java.lang.Long |
getSupplierId() Gets the supplier id |
protected
void |
initializeInputData() Initializes the input data |
boolean |
isGeneric() A user is generic till he logs on, so return true |
boolean |
isRetriable() Check to see if this command is retriable on transaction rollback exception. |
protected
boolean |
isValidCredentials() check the credentials of the user who has submitted this order. |
void |
performExecute() If the checkParamateres are OK, authenticate the buyer and supplier credentials. |
protected
void |
processOrderItems() Process the shopping cart items |
protected
void |
retrieveUserInfo(java.lang.Long shoppingCartId) Changes the Shopping cart status from "I" to "H" i.e., requested status. |
void |
setAuthType(java.lang.Integer authType) Sets the authentication type |
void |
setBuyerId(java.lang.Long buyerId) Sets the buyer organization id |
protected
void |
setBuyerRequestProperties() Sets the buyer request properties based on the protocol id and buyer id |
void |
setContractId(java.lang.Long contractId) Sets the contract id |
void |
setOrganizationUnitId(java.lang.Long orgUnit) Sets the organization unit id |
void |
setProtocolId(java.lang.Integer protocolId) Sets the protocol id |
void |
setRequestProperties(
TypedProperty p) The WebController calls the setRequestProperties method before invoking the execute method in this command. |
void |
setRequisitionerId(java.lang.String requisitionerId) Sets the requisitioner id |
void |
setStoreId(java.lang.Integer storeId) Sets the store id |
void |
setSupplierId(java.lang.Long supplierId) Sets the supplier id |
void |
validateParameters() Validate parameters, the validation includes checking whether buyer credential is null or empty and whether the prtocol valid. |
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl |
checkPermission,
fulfills,
getForUserId,
getGeneric,
getOwner,
getRequestProperties,
getResolvedRequestProperties,
getResourceOwners,
getResponseProperties,
getRetriable,
getViewInputProperties,
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,
getResources,
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,
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,
getResources,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Field Detail |
---|
protected long buyerId
protected long supplierId
protected java.lang.Integer storeId
protected java.lang.Long orderId
protected java.lang.Long btAddressId
protected java.lang.Long stAddressId
protected CIData ciData
protected ProcurementProtocolAccessBean protocolBean
protected java.lang.Integer protocolId
protected java.lang.Integer authType
protected java.lang.Long contractId
protected java.lang.Long catalogId
protected java.lang.Long memberGroupId
protected java.lang.Long oldOrderId
protected java.lang.String requisitionerId
protected java.lang.Long organizationUnitId
protected boolean solicitedOrder
protected java.util.Vector oldQuotes
Constructor Detail |
---|
public BatchOrderRequestCmdImpl()
Method Detail |
---|
protected void checkRegistration() throws ECException
ECException
- Raised when error occurs during the command creation and execution
stagesprotected void createOrderMessagingExtensionRecord(java.lang.Long orderRn) throws ECException
orderRn
- Order reference number (key for the order extension
record)ECException
- Raised when the ejb encounters any problemsprotected void doProcess() throws ECException
ECException
public java.lang.Integer getAuthType()
public java.lang.Long getBuyerId()
public java.lang.Long getContractId()
public java.lang.Long getOrganizationUnitId()
public java.lang.Integer getProtocolId()
public java.lang.String getRequisitionerId()
public java.lang.Integer getStoreId()
getStoreId
in interface
ECCommand
getStoreId
in class
AbstractECTargetableCommand
public java.lang.Long getSupplierId()
protected void initializeInputData()
public boolean isGeneric()
isGeneric
in interface
ControllerCommand
isGeneric
in class
ControllerCommandImpl
public boolean isRetriable()
isRetriable
in interface
ControllerCommand
isRetriable
in class
ControllerCommandImpl
protected boolean isValidCredentials() throws ECException
ECException
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
CommandException.
ECException
protected void processOrderItems() throws ECException
ECException
protected void retrieveUserInfo(java.lang.Long shoppingCartId) throws ECException
shoppingCartId
- id identifying a shopping cart sessionECException
public void setAuthType(java.lang.Integer authType)
authType
- type of authentication modepublic void setBuyerId(java.lang.Long buyerId)
buyerId
- the buyer idprotected void setBuyerRequestProperties()
public void setContractId(java.lang.Long contractId)
contractId
- the contract idpublic void setOrganizationUnitId(java.lang.Long orgUnit)
orgUnit
- the organization unit idpublic void setProtocolId(java.lang.Integer protocolId)
protocolId
- the protocol idpublic void setRequestProperties(TypedProperty p) throws ECException
POData
by calling
setPOData()
passing requestProperties.
setRequestProperties
in interface
ControllerCommand
setRequestProperties
in class
ControllerCommandImpl
p
- request propertiesECException
public void setRequisitionerId(java.lang.String requisitionerId)
requisitionerId
- the requisitioner idpublic void setStoreId(java.lang.Integer storeId)
storeId
- the store idpublic void setSupplierId(java.lang.Long supplierId)
supplierId
- the supplier idpublic void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException.
ECException