com.ibm.commerce.requisitionlist.commands

Class RequisitionListUpdateCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, RequisitionListUpdateCmd, 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 RequisitionListUpdateCmdImpl
    extends RequisitionListBaseCmdImpl
    implements RequisitionListUpdateCmd
    This is the default implementation of the RequisitionListUpdateCmd controller command.

    Input parameters:

    NameTypeRequirementDescription
    requisitionListIdLongmandatoryThe id of the requisition list to be updated.
    nameStringoptionalThe name of the requisition list
    statusCharoptionalThe status of the requisition list. The valid values are 'Y' and 'Z'.
    typeCharoptionalThe type of the requisition list. The valid values are 'PRL' and 'SRL'.
    billtoAddressIdLongoptionalThe billing address id for the requisition list.
    ...StringoptionalSome optional payment name value pairs.

    Output parameters: None.

    Behavior:

    • It updates the requisition list with all information specified in the input parameters. It can do the following:
      • Change a requisition list status from private to shareable or from shareable to private.
      • Change the name of the requisition list.
      • Update the billing address.
      • Update the payment information. The input name value pairs for payment are similar to OrderProcess command.

    View:

    • RedirectView.
    This command uses the following AccessBeans:
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • RequisitionListUpdateCmdImpl

        public RequisitionListUpdateCmdImpl()
        Default constructor
    • Method Detail

      • reset

        public void reset()
        This method resets all instance variables.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class RequisitionListBaseCmdImpl
      • setBilltoAddressId

        public void setBilltoAddressId(java.lang.Long id)
        This method updates the billing address of the requisition list to the new address id.
        Specified by:
        setBilltoAddressId in interface RequisitionListUpdateCmd
        Parameters:
        id - address id
      • setName

        public void setName(java.lang.String name)
        This method updates the name of the requisition list to the new name.
        Specified by:
        setName in interface RequisitionListUpdateCmd
        Parameters:
        name - requisition list name
      • setRequisitionListId

        public void setRequisitionListId(java.lang.Long id)
        This method specifies the requisition list id to be updated.
        Specified by:
        setRequisitionListId in interface RequisitionListUpdateCmd
        Parameters:
        id - requisition list id
      • setStatus

        public void setStatus(java.lang.String status)
        This method updates the status of the requisition list to the new status.
        Specified by:
        setStatus in interface RequisitionListUpdateCmd
        Parameters:
        status - the status of the requisition list
      • validateParameters

        public void validateParameters()
                                throws ECException
        This method validates the input parameters.

        It checks the following mandatory parameters:

        • requisitionListId
        It also checks the validation of the following parameter values:
        • status
        • requisitionListId

        Exception:

        • It throws an ECApplicationException with the message key _ERR_BAD_MISSING_CMD_PARAMETER, if the input parameter requisitionListId is not found.
        • It throws an ECApplicationException with the message key _ERR_INVALID_INPUT, if the input parameter status is not 'Y' or 'Z'. It also throws the exception if the input parameter status is 'Z' or type is "SRL" and the user is a B2C user.
        • It throws an ECApplicationException with the message key _ERR_INVALID_ORDER_REFNUM, if the input parameter requisitionListId is not a valid order id.
        Specified by:
        validateParameters in interface ECCommand
        Overrides:
        validateParameters in class AbstractECTargetableCommand
        Throws:
        ECException
      • setType

        public void setType(java.lang.String type)
        This method updates the type of the requisition list to the new status.
        Specified by:
        setType in interface RequisitionListUpdateCmd
        Parameters:
        type - the type of the requisition list.