com.ibm.commerce.edp.commands

Class PICopyCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, AEDPCtrlCmd, PICopyCmd, 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 PICopyCmdImpl
    extends AEDPPIEditCtrlCmdImpl
    implements PICopyCmd

    This is the default implementation of the PICopyCmdcontroller command.

    Input parameters:

    Name XPath Description
    orderId /XML/orderId The identifier of the order from which payment methods should be copied (the source order). Mandatory.
    toOrderId /XML/toOrderId The identifier of the order from which payment methods should be copied (the source order). Mandatory.
    URL /XML/URL The URL to be called when the command completes successfully.

    Output parameters:

    None.

    Behaviour:

    • Validates that the required parameters are passed: orderId, toOrderId, and URL.
    • Queries payment methods from the order with identifier specified by OrderId by invoking the QueryPIsCmd task command.
    • Calls the EditCmd task command with the list of active payment methods obtained, the total order amount (calculated from all the payment methods) and the orderId.

    Task commands called:

    See Also:
    QueryPIsCmd, EditCmd, Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • PICopyCmdImpl

        public PICopyCmdImpl()
        The default constructor.
    • Method Detail

      • getToOrderID

        public java.lang.Long getToOrderID()
        This method gets the ID of the order to be copied to.
        Returns:
        iToOrderID the ID of the order to be copied to
      • setToOrderId

        public void setToOrderId(java.lang.Long anToOrderId)
        This method sets the ID of the order to be copied to
        Specified by:
        setToOrderId in interface PICopyCmd
        Parameters:
        anToOrderId - the ID of the order to be copied to
      • reset

        public void reset()

        This method resets the command fields.

        After this method is invoked, and proper attributes are set, the command can be executed again.

        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AEDPPIEditCtrlCmdImpl