com.ibm.commerce.edp.commands

Class PIRemoveCmdImpl

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

    This is the default implementation of the PIRemoveCmdcontroller command.

    Input parameters:

    Name XPath Description
    orderId /XML/orderId The identifier of the order for which the payment method is to be changed. Mandatory.
    URL /XML/URL The URL to be called when the command completes successfully. Mandatory.
    piId /XML/piId The numeric identifier (big integer) of the payment instruction to remove. The piId can be obtained from the EDPPaymentInstructionsDataBean data bean and represents the combination of the payment method, payment amount, and any protocol data. This parameter can be repeated if there are more payment instructions to be removed in this request.
    errorViewName /XML/errorViewName The view name which is redirected to when the execution fails. If this parameter is provided, the default error view name is PaymentInstructionErrorView.

    Output parameters:

    None.

    Behaviour:

    • Validates that the orderId, at least one piId, and a URL are passed as parameters.
    • Validates that an order exists for the orderId.
    • Creates an EDPPaymentInstruction for each PI to be removed with the ID to cancel attribute settings, and adds it to a list of PIs to delete.
    • Calls the EditCmd task command with the orderId, the list of PIs to delete, and the total order amount.
    • Checks the results from the task command and redirects to an error view. Otherwise, it redirects to the URL that was passed as a parameter.

    Task commands called:

    See Also:
    EditCmd, Serialized Form