com.ibm.commerce.requisitionlist.commands

Class RequisitionListDisplayCmdImpl

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

    Input parameters:

    NameTypeRequirementDescription
    requisitionListIdLongoptionalThe id of the requisition list to be displayed.
    status/type(CO)CharoptionalThe status/type(CO) of the requisition list. The valid values are 'Y' and 'Z'/"PRL" and "SRL".
    requisitionListStoreIdLongoptionalThe store id of the requisition list.

    Output parameters:

    NameTypeDescription
    requisitionListIdLong[]the resolved requisition list ids

    Behavior:

    • If the input requisitionListId is specified, it only displays the specified requisition list. The other two parameters status/type(CO) and requisitionListStoreId are ignored. The same requisitionListId will be returned and it forwards to a RequisitionListDetailView view.
    • The parameter status/type(CO) defines a set of requisition lists, say S1.
      • If status/type(CO) = 'Y', S1 contains all private requisition lists.
      • If status/type(CO) = 'Z', S1 contains all shareable requisition lists.
      • If status/type(CO) is missing, S1 contains both types of requisition lists.
    • The parameter requisitionListStoreId defines a set of requisition lists, say S2.
      • If requisitionListStoreId is specified, S2 contains the requisition lists for that store.
      • If requisitionListStoreId= *, S2 contains the requisition lists for all stores.
      • If requisitionListStoreId is not specified, S2 contains the requisition lists for the current store which is in the command context. If there is no current store in the command context, S2 contains the requisition lists for all stores.
    • If the input requisitionListId is missing, it will use the other two parameters status/type(CO) and requisitionListStoreId to return all IDs. These IDs will be in both S1 and S2 and also available to the user. It forwards to a RequisitionListView view.

    View:

    • If requisitionListId is specified, it sets RequisitionListDetailView.
    • If requisitionListId is not specified, it sets RequisitionListView.
    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

      • RequisitionListDisplayCmdImpl

        public RequisitionListDisplayCmdImpl()
    • Method Detail

      • checkIsAllowed

        public void checkIsAllowed(AccessVector resource,
                                   java.lang.String Paraaction)
                            throws ECException
        This method checks for the access control by calling checkIsAllowed() in the super classes
        Parameters:
        resource - AccessVector
        Paraaction - action
        Throws:
        ECException
      • getOutRequisitionListId

        public java.lang.String[] getOutRequisitionListId()
        This method returns the output requisition list ids.
        Returns:
        an array of requisition list ids.
      • 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
      • setRequisitionListId

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

        public void setRequisitionListStoreId(java.lang.String[] id)
        This method specifies the store id of the requisition list to be displayed.
        Specified by:
        setRequisitionListStoreId in interface RequisitionListDisplayCmd
        Parameters:
        id - an array of store ids.
      • setStatus

        public void setStatus(java.lang.String status)
        This method specifies the status of the requisition list to be displayed.
        Specified by:
        setStatus in interface RequisitionListDisplayCmd
        Parameters:
        status - the status of the requisition list to be displayed.
      • validateParameters

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

        It checks the validation of the following parameter values:

        • status
        • requisitionListId

        Exception:

        • It throws an ECApplicationException with the message key _ERR_INVALID_INPUT, if the input parameter status is not 'Y' or 'Z'.
        • 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 specifies the type of the requisition list to be displayed.
        Specified by:
        setType in interface RequisitionListDisplayCmd
        Parameters:
        type - the type of the requisition list to be displayed.