com.ibm.commerce.requisitionlist.commands
Class RequisitionListUpdateCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.requisitionlist.commands.RequisitionListBaseCmdImpl
              |
              +--com.ibm.commerce.requisitionlist.commands.RequisitionListUpdateCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, RequisitionListUpdateCmd

public class RequisitionListUpdateCmdImpl
extends RequisitionListBaseCmdImpl
implements RequisitionListUpdateCmd

Update information for a requisition list.


Field Summary
protected  java.lang.Long iBilltoAddressId
          The bill to address id.
 
Fields inherited from class com.ibm.commerce.requisitionlist.commands.RequisitionListBaseCmdImpl
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.RequisitionListUpdateCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command.ECTargetableCommand
COPYRIGHT
 
Constructor Summary
RequisitionListUpdateCmdImpl()
           
 
Method Summary
protected  void action()
          The main action of the command.
protected  java.lang.Long getBilltoAddressId()
          Return the billing address id.
protected  TypedProperty getPayNVPsFromRequestProperties()
          This is a helper method that merges the ShopperPay information
 AccessVector getResources()
          It returns the order access bean.
protected  void mergeNVPs(TypedProperty hshFrom, TypedProperty hshTo)
           
protected  void mergeShopperPayInfo(OrderAccessBean aabOrder)
          This is a helper method that merges the ShopperPay information
 void performExecute()
          The main execution of the command.
 void reset()
          This method should be called after a command has been executed to reset its states variables.
 void setBilltoAddressId(java.lang.Long id)
          Updates the billing address of the requisition list to the new address id.
 void setName(java.lang.String name)
          Updates the name of the requisition list to the new name.
 void setRequestProperties(TypedProperty reqProperties)
          The WebController calls this method before invoking the execute method in this command to set the request properties for this command.
 void setRequisitionListId(java.lang.Long id)
          Specifies the requisition list id to be updated.
 void setStatus(java.lang.String status)
          Updates the status of the requisition list to the new status.
protected  void updateResponseView()
          Sets the default response view - Redirect View.
 void validateParameters()
          Validate the input parameters.
 
Methods inherited from class com.ibm.commerce.requisitionlist.commands.RequisitionListBaseCmdImpl
copyOrder, copyOrder, copyOrderAccessBean, copyOrderItemAccessBean, copyOrderPayInfo, getName, getOrderId, getRequisitionListId, getStatus, setDefaultRequisitionListStatus, setOrderId
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, 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, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
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.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

iBilltoAddressId

protected java.lang.Long iBilltoAddressId
The bill to address id.
Constructor Detail

RequisitionListUpdateCmdImpl

public RequisitionListUpdateCmdImpl()
Method Detail

action

protected void action()
               throws java.sql.SQLException,
                      javax.ejb.CreateException,
                      javax.ejb.FinderException,
                      javax.naming.NamingException,
                      java.rmi.RemoteException,
                      ECException
The main action of the command.

It updates the requisition list and calls mergeShopperPayInfo() to update the order pay info.


getBilltoAddressId

protected java.lang.Long getBilltoAddressId()
Return the billing address id.

getPayNVPsFromRequestProperties

protected TypedProperty getPayNVPsFromRequestProperties()
This is a helper method that merges the ShopperPay information
Parameters:
anOrderRn - Order reference number

getResources

public AccessVector getResources()
                          throws ECException
It returns the order access bean.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Returns:
AccessVector - a vector of resource action pairs

mergeNVPs

protected void mergeNVPs(TypedProperty hshFrom,
                         TypedProperty hshTo)
                  throws ParameterNotFoundException,
                         InvalidParameterValueException

mergeShopperPayInfo

protected void mergeShopperPayInfo(OrderAccessBean aabOrder)
                            throws ECApplicationException,
                                   ECException,
                                   javax.naming.NamingException,
                                   javax.ejb.FinderException,
                                   java.rmi.RemoteException,
                                   javax.ejb.CreateException
This is a helper method that merges the ShopperPay information
Parameters:
anOrderRn - Order reference number

performExecute

public void performExecute()
                    throws ECException
The main execution of the command. It calls the follwoing methods:
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
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 RequisitionListBaseCmdImpl

setBilltoAddressId

public void setBilltoAddressId(java.lang.Long id)
Description copied from interface: RequisitionListUpdateCmd
Updates the billing address of the requisition list to the new address id.
Specified by:
setBilltoAddressId in interface RequisitionListUpdateCmd

setName

public void setName(java.lang.String name)
Description copied from interface: RequisitionListUpdateCmd
Updates the name of the requisition list to the new name.
Specified by:
setName in interface RequisitionListUpdateCmd
Overrides:
setName in class RequisitionListBaseCmdImpl

setRequestProperties

public void setRequestProperties(TypedProperty reqProperties)
                          throws ECException
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 RequisitionListBaseCmdImpl
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: RequisitionListUpdateCmd
Specifies the requisition list id to be updated.
Specified by:
setRequisitionListId in interface RequisitionListUpdateCmd
Overrides:
setRequisitionListId in class RequisitionListBaseCmdImpl

setStatus

public void setStatus(java.lang.String status)
Description copied from interface: RequisitionListUpdateCmd
Updates the status of the requisition list to the new status.
Specified by:
setStatus in interface RequisitionListUpdateCmd
Overrides:
setStatus in class RequisitionListBaseCmdImpl

updateResponseView

protected void updateResponseView()
Description copied from class: RequisitionListBaseCmdImpl
Sets the default response view - Redirect View.
Overrides:
updateResponseView in class RequisitionListBaseCmdImpl

validateParameters

public void validateParameters()
                        throws ECException
Validate the input parameters.

It checks the following mandatory parameters:

It also checks the validation of the follwoing parameter values:

Exception:

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
ECException. -