com.ibm.commerce.order.commands

Class ExternalOrderCalculateCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderCalculateCmd, Protectable, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class ExternalOrderCalculateCmdImpl
    extends PromotionEngineOrderCalculateCmdImpl
    implements OrderCalculateCmd
    This is the implementation of the OrderCalculateCmd controller command.
    This command is used to call outbound service to calculate the order.

    Behaviour:

    For each Order specified:
    • compose the Order noun by calling inbound service - get order detail by id
    • call outbound service - ProcessOrder (actionCode = CalculateOrder) to get the calculation results from backend system.
    • save the calculation results into database
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExternalOrderCalculateCmdImpl

        public ExternalOrderCalculateCmdImpl()
        Constructor for ExternalOrderCalculateCmdImpl.
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        Executes the main business logic of the command implementation. it firstly calls the inbound service to get a list of order nouns by order ids. Then for each order it calls the outbound service for calculation and then it calls the updateCalculationInfo method to update the calculation information into database.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class PromotionEngineOrderCalculateCmdImpl
        Throws:
        ECException
        See Also:
        ECCommand#performExecute()
      • getOrdersMap

        public java.util.Hashtable getOrdersMap()
        This method returns the map of the orders.
        Returns:
        Returns the ihshOrders.
      • setOrdersMap

        public void setOrdersMap(java.util.Hashtable hshOrders)
        This method sets the map of the orders Sets the ihshOrders.
        Parameters:
        hshOrders - The ihshOrders to set.
      • setRequestProperties

        public void setRequestProperties(TypedProperty aRequestProperties)
                                  throws ECException
        This method sets the request properties of this command.
        Specified by:
        setRequestProperties in interface ControllerCommand
        Overrides:
        setRequestProperties in class PromotionEngineOrderCalculateCmdImpl
        Parameters:
        aRequestProperties - the request properties.

        The following request properties are recognized:
        • outOrderName an array of names to be added to the response properties. The values for each name are the identifiers of the specified Orders.

        Throws:
        ECException -
        See Also:
        ControllerCommand#setRequestProperties(TypedProperty)
      • reset

        public void reset()
        This method resets instance variables to their initial values.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class PromotionEngineOrderCalculateCmdImpl
      • getExOrderFacadeClient

        public com.ibm.commerce.order.facade.server.external.ExternalOrderFacadeClient getExOrderFacadeClient()
        This method returns ExternalOrderFacadeClient
        Returns:
        Return ExOrderFacadeClient
      • setExOrderFacadeClient

        public void setExOrderFacadeClient(com.ibm.commerce.order.facade.server.external.ExternalOrderFacadeClient exOrderFacadeClient)
        This method sets the ExternalOrderFacadeClient
        Parameters:
        exOrderFacadeClient - The ExternalOrderFacadeClient