com.ibm.commerce.quote.commands

Class QuoteGenerateOrderCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, QuoteGenerateOrderCmd, 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 QuoteGenerateOrderCmdImpl
    extends com.ibm.commerce.quote.commands.QuoteBaseCmdImpl
    implements QuoteGenerateOrderCmd
    This is the default implementation of the QuoteGenerateOrderCmd controller Command.

    Behaviour

    1. Generates an Order from an existing quote (only with status = RDY).
    2. Calls QuoteCopyCmd to copy the quote from which Order must be generated.
    3. Sets TYPE = ORD and STATUS = NEW for the new resulting quote, transforming it to an order.
    4. Checks Expiredate on original Quote. If the quote has not expired, then set PrepareFlags SKIP_REPRICING for order items.
    5. Calls PrepareOrderCmd for the new order. If the SKIP_REPRICING flags are turned on, then the PrepareOrderCmd protects those prices to ensure the quoted prices.
      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

        • QuoteGenerateOrderCmdImpl

          public QuoteGenerateOrderCmdImpl()
      • Method Detail

        • setQuote

          public void setQuote(OrderAccessBean abQuote)
          Sets the quote to generate an order and adds it to the list of quotes to be processed.
          Specified by:
          setQuote in interface QuoteGenerateOrderCmd
          Parameters:
          abQuote - Quote access bean.
        • getSensitiveInfoCopyFlag

          public java.lang.String getSensitiveInfoCopyFlag()
          Gets the sensitive info copy flag.
          Returns:
          sensitive info copy flag
        • setSensitiveInfoCopyFlag

          public void setSensitiveInfoCopyFlag(java.lang.String senInfoCopyFlag)
          Sets the sensitive info copy flag.
          Specified by:
          setSensitiveInfoCopyFlag in interface QuoteGenerateOrderCmd
          Parameters:
          senInfoCopyFlag - sensitive info copy flag
        • getBlockInfoCopyFlag

          public java.lang.String getBlockInfoCopyFlag()
          Gets the block info copy flag.
          Returns:
          block info copy flag
        • setBlockInfoCopyFlag

          public void setBlockInfoCopyFlag(java.lang.String blInfoCopyFlag)
          Sets the block info copy flag.
          Specified by:
          setBlockInfoCopyFlag in interface QuoteGenerateOrderCmd
          Parameters:
          blInfoCopyFlag - block info copy flag
        • getDescription

          public java.lang.String getDescription()
          Gets the description of the Order that must be generated from the quote.
          Returns:
          description of Order
        • setDescription

          public void setDescription(java.lang.String desc)
          Sets the description of the Order to be generated from the quote.
          Specified by:
          setDescription in interface QuoteGenerateOrderCmd
          Parameters:
          desc - description of Order
        • getGenOrderId

          public java.lang.String getGenOrderId()
          Gets the Id of the generated order.
          Specified by:
          getGenOrderId in interface QuoteGenerateOrderCmd
          Returns:
          Id of the generated Order
        • setRequestProperties

          public void setRequestProperties(TypedProperty aReqParms)
                                    throws ECException
          Overrides the base class method to retrieve the sensitive and block information flags
          Specified by:
          setRequestProperties in interface ControllerCommand
          Overrides:
          setRequestProperties in class com.ibm.commerce.quote.commands.QuoteBaseCmdImpl
          Parameters:
          aReqParms - request properties.
          Throws:
          ECException
        • performExecute

          public void performExecute()
                              throws ECException
          Performs the main business logic. Generates an order from the quote by invoking QuoteCopyCmd on the quote. Checks the quote for its expiry status. If the quote has not expired, then sets the SKIP_REPRICING. Prepare flags on all the items in the generated order. Finally, invoke PrepareOrderCmd on the generated order.
          Specified by:
          performExecute in interface ECCommand
          Specified by:
          performExecute in interface com.ibm.websphere.command.TargetableCommand
          Specified by:
          performExecute in class com.ibm.commerce.quote.commands.QuoteBaseCmdImpl
          Throws:
          ECException
          See Also:
          QuoteCopyCmd, InventoryManagementHelper
        • getResources

          public AccessVector getResources()
                                    throws ECException
          Gets resources. Used to implement access control. Overrides base class method.
          Specified by:
          getResources in interface ECCommand
          Overrides:
          getResources in class com.ibm.commerce.quote.commands.QuoteBaseCmdImpl
          Returns:
          resources access vector.
          Throws:
          ECException
        • reset

          public void reset()
          This method should be called after a command has been executed to reset its states variables.
          Specified by:
          reset in interface com.ibm.websphere.command.Command
          Overrides:
          reset in class com.ibm.commerce.quote.commands.QuoteBaseCmdImpl