Class ExternalOrderCalculateCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderCalculateCmd, Protectable,,,,,,

    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.


    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


        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
        performExecute in class PromotionEngineOrderCalculateCmdImpl
        See Also:
      • getOrdersMap

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

        public void setOrdersMap(java.util.Hashtable hshOrders)
        This method sets the map of the orders Sets the ihshOrders.
        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
        setRequestProperties in class PromotionEngineOrderCalculateCmdImpl
        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.

        ECException -
        See Also:
      • reset

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

        public getExOrderFacadeClient()
        This method returns ExternalOrderFacadeClient
        Return ExOrderFacadeClient
      • setExOrderFacadeClient

        public void setExOrderFacadeClient( exOrderFacadeClient)
        This method sets the ExternalOrderFacadeClient
        exOrderFacadeClient - The ExternalOrderFacadeClient