com.ibm.commerce.requisitionlist.commands

Class RequisitionListCreateCmdImpl

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

    Input parameters:

    NameTypeRequirementDescription
    nameStringoptionalThe name of the created requisition list
    status/type(CO)CharoptionalThe status/type(CO) of the created requisition list. The valid values are 'Y' and 'Z'/"PRL" and "SRL". The default value is 'Y'/"PRL"

    Output parameters:

    NameTypeDescription
    requisitionListIdLongthe newly created requisition list id

    Behavior:

    • It creates an empty requisition list.

    View:

    • RedirectView.
    This command calls the following TaskCommands: 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

      • RequisitionListCreateCmdImpl

        public RequisitionListCreateCmdImpl()
        Default constructor
    • Method Detail

      • getRequisitionListId

        public java.lang.Long getRequisitionListId()
        This method returns the newly created requisition list id.
        Specified by:
        getRequisitionListId in interface RequisitionListCreateCmd
        Returns:
        requisition list id.
      • performExecute

        public void performExecute()
                            throws ECException
        This method is the main execution of the command. It calls the following methods:
        • setDefaultRequisitionListStatus()
        • action()
        • updateResponseView()
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException
      • setName

        public void setName(java.lang.String name)
        This method specifies the name of the created requisition list.
        Specified by:
        setName in interface RequisitionListCreateCmd
        Parameters:
        name - requisition list name
      • setStatus

        public void setStatus(java.lang.String status)
        This method sets the status of the created requisition list.
        Specified by:
        setStatus in interface RequisitionListCreateCmd
        Parameters:
        status - the status of the created requisition list.
      • validateParameters

        public void validateParameters()
                                throws ECException
        This method validates the input parameters of this command implementation.

        It checks the following mandatory parameters:

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

        Exception:

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

        public void setType(java.lang.String type)
        This method specifies the type of the created requisition list. If it is not specified, the default value is 'PRL', a shareable requisition list.
        Specified by:
        setType in interface RequisitionListCreateCmd
        Parameters:
        type - the type of the created requisition list.