com.ibm.commerce.orderitems.commands
Class OrderItemDisplayCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.orderitems.commands.OrderItemDisplayCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderItemDisplayCmd, Protectable

public class OrderItemDisplayCmdImpl
extends ControllerCommandImpl
implements OrderItemDisplayCmd

Display a list of order items with pending order status.

Behavior

If the addressId is set, the command only displays order items with this shipping address.

For each order item in the list, the command does the following:

View Task

If the addressId is set, it calls OrderItemDisplayViewShiptoDsp view task, otherwise it calls OrderItemDisplayViewShiptoAssoc view task.


Field Summary
static java.lang.String COPYRIGHT
           
protected  com.ibm.commerce.orderitems.commands.ATPParameters iATPParms
           
protected  java.util.Hashtable ihsATPParmsDefaults
           
protected  java.util.Vector iOrderIdList
           
 
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.orderitems.commands.OrderItemDisplayCmd
defaultCommandClassName, NAME
 
Constructor Summary
OrderItemDisplayCmdImpl()
           
 
Method Summary
protected  java.lang.Long getAddressId()
          Gets the input parameter addressId.
 com.ibm.commerce.fulfillment.commands.ATPParameters getATPParms()
          Gets the input ATP parameters.
protected  java.lang.String[] getOrderIds()
          Return a list of ids of the orders which are displayed.
 AccessVector getResources()
          Gets the access vector accessed by this command.
 boolean isReadyToCallExecute()
          isReadyToCallExecute method is called by the Targettable Command frame work before the execution of the command.
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void reset()
          This method should be called after a command has been executed to reset its states variables.
 void setAddressId(java.lang.Long addressId)
          Sets the id of the address book entry for the items to display (optional).
 void setATPParms(com.ibm.commerce.fulfillment.commands.ATPParameters newATPParms)
          Set the ATP parameters.
 void setOrderId(java.lang.String[] numbers)
          Specifies zero or more order ids (optional).
 void setOutOrderName(java.lang.String[] names)
          Specifies the names of the name-value pairs to be added to the response object passed to the command's view task.
 void setRequestProperties(TypedProperty aRequestProperties)
          The WebController calls this method before invoking the execute method in this command to set the request properties for this command.
 void validateParameters()
          Performs server side parameter checking.
 
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, 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

COPYRIGHT

public static final java.lang.String COPYRIGHT

iATPParms

protected com.ibm.commerce.orderitems.commands.ATPParameters iATPParms

ihsATPParmsDefaults

protected java.util.Hashtable ihsATPParmsDefaults

iOrderIdList

protected java.util.Vector iOrderIdList
Constructor Detail

OrderItemDisplayCmdImpl

public OrderItemDisplayCmdImpl()
Method Detail

getAddressId

protected java.lang.Long getAddressId()
Gets the input parameter addressId.

getATPParms

public com.ibm.commerce.fulfillment.commands.ATPParameters getATPParms()
Gets the input ATP parameters.

getOrderIds

protected java.lang.String[] getOrderIds()
Return a list of ids of the orders which are displayed. These order ids are also appended to redirection url.

getResources

public AccessVector getResources()
                          throws ECException
Description copied from interface: ECCommand
Gets the access vector accessed by this command. The default implementation returns null indicating that no protectable resource is accessed by this command. It is the responsibilities of the command writer to return the protectable primary resource(s) and the corresponding actions accessed by this command.

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

isReadyToCallExecute

public boolean isReadyToCallExecute()
Description copied from class: AbstractECTargetableCommand
isReadyToCallExecute method is called by the Targettable Command frame work before the execution of the command. The default implementation is to return true.

Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Following copied from class: com.ibm.commerce.command.AbstractECTargetableCommand
Returns:
boolean - true if we can execute the command false if we canot execute the command

performExecute

public void performExecute()
                    throws ECException
Description copied from interface: ECCommand
Contains the actual business logic of the command It should be implemented by all the command writer.
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 AbstractECTargetableCommand

setAddressId

public void setAddressId(java.lang.Long addressId)
Sets the id of the address book entry for the items to display (optional).
Specified by:
setAddressId in interface OrderItemDisplayCmd

setATPParms

public void setATPParms(com.ibm.commerce.fulfillment.commands.ATPParameters newATPParms)
Set the ATP parameters.

setOrderId

public void setOrderId(java.lang.String[] numbers)
Specifies zero or more order ids (optional). The order ids can be numbers or one of the special abbreviations ".", "*", ".t", "*t". See OrderItem Commands for a description of these abbreviations. If this parameter is omitted, the default is "*".
Specified by:
setOrderId in interface OrderItemDisplayCmd

setOutOrderName

public void setOutOrderName(java.lang.String[] names)
Specifies the names of the name-value pairs to be added to the response object passed to the command's view task. The values of the added name-value pairs are the ids of the input orders. If no name is specified, it defaults to orderId.
Specified by:
setOutOrderName in interface OrderItemDisplayCmd

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECApplicationException
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 ControllerCommandImpl
Following copied from interface: com.ibm.commerce.command.ControllerCommand
Parameters:
requestProperties - com.ibm.commerce.datatype.TypedProperty
Throws:
com.ibm.commerce.exception.ECException. -  

validateParameters

public void validateParameters()
                        throws ECException
Description copied from interface: ECCommand
Performs server side parameter checking. This method replaces the checkParameters() method in a previous version of the code.

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