com.ibm.commerce.me.commands
Class SendShoppingCartCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.me.commands.SendShoppingCartCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, SendShoppingCartCmd

public class SendShoppingCartCmdImpl
extends ControllerCommandImpl
implements SendShoppingCartCmd

The SendShoppingCartCmdImpl class is defined in this file. It prepares the shopping cart Quote to be sent to procurement systems. Actual composition of the response message will be done by the view tasks this command forwards to.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright statement.
 
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. SendShoppingCartCmd
defaultCommandClassName, messageName, NAME
 
Constructor Summary
SendShoppingCartCmdImpl()
           
 
Method Summary
protected  void doProcess()
          Create a new instance of CIQuoteImpl.
 java.lang.Long getBuyerId()
          Gets buyer id.
 java.lang.String getErrorTask()
          Gets error task name
 java.lang.Long getOrderId()
          Gets OrderId
 java.lang.Integer getProtocolId()
          Gets protocol Id
  AccessVector getResources()
          Puts order access beans into AccessVector
 boolean isRetriable()
          Check to see if this command is retriable on transaction rollback exception.
 void performExecute()
          This method contains the business logic for this command.
 void setBuyerId(java.lang.Long aBuyerId)
          Sets buyerId
 void setOrderId(java.lang.Long orderId)
          Sets orderId
 void setProtocolId(java.lang.Integer aProtocolId)
          Sets protocolId
 void setRequestProperties( TypedProperty p)
          The WebController calls the setRequestProperties method before invoking the execute method in this command.
 void validateParameters()
          The default implementation of checkParameters is just a no op.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, 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, 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, isGeneric, 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
public static final java.lang.String COPYRIGHT
Copyright statement.
See Also:
Constant Field Values
Constructor Detail

SendShoppingCartCmdImpl

public SendShoppingCartCmdImpl()
Method Detail

doProcess

protected void doProcess()
                  throws ECException
Create a new instance of CIQuoteImpl.
Throws:
ECException - The exception description.

getBuyerId

public java.lang.Long getBuyerId()
Gets buyer id.
Returns:
buyerId The buyerId.

getErrorTask

public java.lang.String getErrorTask()
Gets error task name
Returns:
errorTask The error task name

getOrderId

public java.lang.Long getOrderId()
Gets OrderId
Returns:
orders_Id The order id

getProtocolId

public java.lang.Integer getProtocolId()
Gets protocol Id
Returns:
protocolId The protocol id.

getResources

public AccessVector getResources()
                          throws ECException
Puts order access beans into AccessVector
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
resurceList The vector with all orderAccessBeans.
Throws:
ECException

isRetriable

public boolean isRetriable()
Check to see if this command is retriable on transaction rollback exception. A retriable command will be retried once on transaction rollback exception.
Specified by:
isRetriable in interface ControllerCommand
Overrides:
isRetriable in class ControllerCommandImpl
Returns:
boolean - true if this command is retriable - false if this command is not retriable

performExecute

public void performExecute()
                    throws ECException
This method contains the business logic for this command. This method will get CIQuote by using orderId an request session, then put the quote and viewname into response properties.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
CommandException.
ECException

setBuyerId

public void setBuyerId(java.lang.Long aBuyerId)
Sets buyerId
Parameters:
aBuyerId - The buyer id

setOrderId

public void setOrderId(java.lang.Long orderId)
Sets orderId
Specified by:
setOrderId in interface SendShoppingCartCmd
Parameters:
orderId - The order id.

setProtocolId

public void setProtocolId(java.lang.Integer aProtocolId)
Sets protocolId
Parameters:
aProtocolId - The protocol id.

setRequestProperties

public void setRequestProperties(TypedProperty p)
                          throws ECException
The WebController calls the setRequestProperties method before invoking the execute method in 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. Three mandatory parameters should be set before calling this command: 1. orderRefNumber 2. userID 3. password
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
p - request properties
Returns:
void
Throws:
com.ibm.commerce.exception.ECException.
ECException

validateParameters

public void validateParameters()
                        throws ECException
The default implementation of checkParameters is just a no op. ControllerCommandImpl calls checkParameter in performExecute. It is the responsibility of the command writers to implements this method if they want to perform server side parameter checking. In this implementation only basic parameter checking is done and the rest is left to each task commands which does the authentication.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException.
ECException