com.ibm.commerce.requisitionlist.commands
Class RequisitionListCopyCmdImpl

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

public class RequisitionListCopyCmdImpl
extends RequisitionListBaseCmdImpl
implements RequisitionListCopyCmd

Copy an existing order (or requisition list) and creates a new requisition list.


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.RequisitionListCopyCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command.ECTargetableCommand
COPYRIGHT
 
Constructor Summary
RequisitionListCopyCmdImpl()
           
 
Method Summary
protected  void action()
          The main action of the command.
 java.lang.Long getRequisitionListId()
          Returns the newly created requisition list id.
 AccessVector getResources()
          It returns the store access bean and the order access bean.
 void performExecute()
          The main execution of the command.
 void setName(java.lang.String name)
          Specifies the name of the created requisition list.
 void setOrderId(java.lang.Long id)
          Specifies the source order or requisition list id.
 void setStatus(java.lang.String status)
          Specifies the status of the created requisition list.
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, copyOrder, copyOrderAccessBean, copyOrderItemAccessBean, copyOrderPayInfo, getName, getOrderId, getStatus, reset, setDefaultRequisitionListStatus, setRequestProperties, setRequisitionListId
 
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, setRequestProperties, 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
 

Constructor Detail

RequisitionListCopyCmdImpl

public RequisitionListCopyCmdImpl()
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 calls copyOrder() to copy the order.


getRequisitionListId

public java.lang.Long getRequisitionListId()
Description copied from interface: RequisitionListCopyCmd
Returns the newly created requisition list id.
Specified by:
getRequisitionListId in interface RequisitionListCopyCmd
Overrides:
getRequisitionListId in class RequisitionListBaseCmdImpl

getResources

public AccessVector getResources()
                          throws ECException
It returns the store access bean and 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

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.

setName

public void setName(java.lang.String name)
Description copied from interface: RequisitionListCopyCmd
Specifies the name of the created requisition list.
Specified by:
setName in interface RequisitionListCopyCmd
Overrides:
setName in class RequisitionListBaseCmdImpl

setOrderId

public void setOrderId(java.lang.Long id)
Description copied from interface: RequisitionListCopyCmd
Specifies the source order or requisition list id.
Specified by:
setOrderId in interface RequisitionListCopyCmd
Overrides:
setOrderId in class RequisitionListBaseCmdImpl

setStatus

public void setStatus(java.lang.String status)
Description copied from interface: RequisitionListCopyCmd
Specifies the status of the created requisition list. If it is not specified, the default value is 'Y', a shareable requisition list.
Specified by:
setStatus in interface RequisitionListCopyCmd
Overrides:
setStatus in class RequisitionListBaseCmdImpl

updateResponseView

protected void updateResponseView()
Sets the response view - Redirect View. It also sets the output parameter requisitionListId.
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. -