com.ibm.commerce.orderquotation.commands

Class OrderQuotationCheckCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderQuotationCheckCmd, 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 OrderQuotationCheckCmdImpl
    extends ControllerCommandImpl
    implements OrderQuotationCheckCmd
    Checks to see if child Orders exist for the specified OrderQuotationRel objects. Re-direct to one of three specified URLs depending on the result of the check.

    Parameter values

    orderQuotationRelId
    Specifies the ID of the OrderQuotationRel objects to be checked. The default value of this parameter is "*initial*parent.", an OrderQuotationRel abbreviation specifying all of the OrderQuotationRel objects. The objects are those whose types are "initial" and whose parents are one of the current pending orders for the current user. (OrderQuotationRel abbreviations are described in more detail in the help for Order Management subsystem URLs.) This parameter can be repeated.
    outOkOrderQuotationRelIdName
    Specifies the name-value pairs that should be added to the redirection URL. The values of the added name-value pairs are the identifiers of the checked OrderQuotationRel objects that have a child order. This parameter can be repeated.
    outTimeoutOrderQuotationRelIdName
    Specifies the name-value pairs that should be added to the redirection URL. The values of the added name-value pairs are the identifiers of the checked OrderQuotationRel objects. The objects are those which do not yet have child orders but whose timeoutTime attribute values are less than the current time. This parameter can be repeated.
    outWaitOrderQuotationRelIdName
    Specifies the name-value pairs that should be added to the redirection URL. The values of the added name-value pairs are the identifiers of the checked OrderQuotationRel objects. The objects are those which do not yet have child orders but whose timeoutTime attribute values are not less than the current time. This parameter can be repeated.
    okURL
    Specifies the redirection URL that is returned if child orders exist for all the checked OrderQuotationRel objects. This parameter is required.
    waitURL
    Specifies the redirection URL that is returned if some of the checked OrderQuotationRel objects do not yet have child orders but none of them has a timeoutTime less than the current time. The value of this parameter defaults to the value of the okURL parameter.
    timeoutURL
    Specifies the redirection URL that is returned if some of the checked OrderQuotationRel objects do not yet have child orders. But they have a timeoutTime less than the current time. The value of this parameter defaults to the value of the waitURL parameter.
    errorURL
    Specifies the redirection URL that is returned if some of the checked OrderQuotationRel objects indicate that an error status was returned from the external system. The external system is requested to provide quotation information less than the current time. This parameter is optional.

    Behavior:

    • If the errorURL parameter was specified and some of the specified OrderQuotationRel objects indicate that an error status was returned from the external system. The external system is requested to provide quotation information. Then redirect to the URL specified by the errorURL parameter.
    • Otherwise, if all the specified OrderQuotationRel objects indicate a child order, redirect to the URL specified by the okURL parameter.
    • Otherwise, if some of the specified OrderQuotationRel objects do not have a child order but have a timeoutTime less than the current time. Redirect to the URL specified by the timeoutURL parameter.
    • Otherwise, redirect to the URL specified by the waitURL parameter.
    • Add name-values pairs to the response properties as specified by the outOkOrderQuotationRelIdName, outTimeoutOrderQuotationRelIdName, and outWaitOrderQuotationRelIdName parameters.
    • If some of the specified OrderQuotationRel objects indicate an error status, add name-value pairs to the response properties. The names of the name-value pairs are "failOrderQuotationRelId", and the values are the identifiers of those OrderQuotationRel objects.

    Exception conditions

    • If the value of the specified input parameter is missing or invalid, the command throws an ECApplicationException with error message _ERR_BAD_MISSING_CMD_PARAMETER and error view GenericApplicationError.
    See Also:
    Serialized Form
    • Constructor Detail

      • OrderQuotationCheckCmdImpl

        public OrderQuotationCheckCmdImpl()
    • Method Detail

      • getOKURL

        public java.lang.String getOKURL()
        Gets the OK URL.
        Returns:
        The OK URL.
      • setOKURL

        public void setOKURL(java.lang.String okURL)
        Sets the OK URL.
        Parameters:
        okURL - The OK URL to set
      • getWaitURL

        public java.lang.String getWaitURL()
        Gets the waitURL.
        Returns:
        The waitURL.
      • setWaitURL

        public void setWaitURL(java.lang.String waitURL)
        Sets the waitURL.
        Parameters:
        waitURL - The waitURL to set.
      • getTimeoutURL

        public java.lang.String getTimeoutURL()
        Gets the timeoutURL.
        Returns:
        The timeoutURL.
      • setTimeoutURL

        public void setTimeoutURL(java.lang.String timeoutURL)
        Sets the timeoutURL.
        Parameters:
        timeoutURL - The timeoutURL to set.
      • reset

        public void reset()
        Resets the command.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • performExecute

        public void performExecute()
                            throws ECException
        Executes the command.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - Raised with message _ERR_CREATE_EXCEPTION if there is a javax.ejb.CreateException, _ERR_FINDER_EXCEPTION if there is a javax.ejb.FinderException, _ERR_NAMING_EXCEPTION if there is a javax.naming.NamingException, _ERR_REMOTE_EXCEPTION if there is a java.rmi.RemoteException.
      • setRequestProperties

        public void setRequestProperties(TypedProperty aRequestProperties)
                                  throws ECException
        Sets the requestProperties for the command.
        Specified by:
        setRequestProperties in interface ControllerCommand
        Overrides:
        setRequestProperties in class ControllerCommandImpl
        Parameters:
        aRequestProperties - The request properties. This parameter includes the following name value pairs:
        orderQuotationRelId (optional, default=*initial*parent. (Initial quotations for the current pending Orders.))
        The OrderQuotationRel objects to be checked. Valid values: list of (OrderQuotationRelId | OrderQuotationRel abbreviation).
        outOkOrderQuotationRelIdName (optional)
        The names of name value pairs that should be added to the redirection URL. The values of the added name value pairs are the identifiers of the checked OrderQuotationRel objects that do have a child Order.
        outTimeoutOrderQuotationRelIdName (optional)
        The names of name value pairs that should be added to the redirection URL. The values of the added name value pairs are the identifiers of the checked OrderQuotationRel objects. The objects are those which do not yet have child Orders, but the timeoutTime attribute values are less than the current time.
        outWaitingOrderQuotationRelIdName (optional)
        The names of name value pairs that should be added to the redirection URL. The values of the added name value pairs are the identifiers of the checked OrderQuotationRel objects. The objects are those which do not yet have child Orders, but the timeoutTime attribute values are not less than the current time.
        okURL
        The redirection URL that is returned if child Orders exist for all the checked OrderQuotationRel objects.
        timeoutURL (default=the value of the waitURL parameter)
        The redirection URL that is returned if some of the checked OrderQuotationRel objects do not yet have child Orders. But have a timeoutTime less than the current time.
        waitURL (default=the value of the okURL parameter)
        The redirection URL that is returned if some of the checked OrderQuotationRel objects do not yet have child Orders. But none of them have a timeoutTime less than the current time.
        Throws:
        ECException - These are allowed to percolate.
      • getOutOkOrderQuotationIdName

        public java.lang.String[] getOutOkOrderQuotationIdName()
        Gets the outOkOrderQuotationIdName.
        Returns:
        An array of names to contain the values of the received quotation order ids.
      • setOutOkOrderQuotationIdName

        public void setOutOkOrderQuotationIdName(java.lang.String[] outOkOrderQuotationIdName)
        Sets the outOkOrderQuotationIdName.
        Parameters:
        outOkOrderQuotationIdName - The outOkOrderQuotationIdName to set
      • getOutTimeoutOrderQuotationIdName

        public java.lang.String[] getOutTimeoutOrderQuotationIdName()
        Gets the outTimeoutOrderQuotationIdName
        Returns:
        An array of names to contain the values of the timed out quotation order ids.
      • setOutTimeoutOrderQuotationIdName

        public void setOutTimeoutOrderQuotationIdName(java.lang.String[] outTimeoutOrderQuotationIdName)
        Sets the outTimeoutOrderQuotationIdName.
        Parameters:
        outTimeoutOrderQuotationIdName - The outTimeoutOrderQuotationIdName to set
      • getOutWaitingOrderQuotationIdName

        public java.lang.String[] getOutWaitingOrderQuotationIdName()
        Gets the outWaitingOrderQuotationIdName.
        Returns:
        An array of names to contain the values of the quotation order ids that have not timed out nor been received.
      • setOutWaitingOrderQuotationIdName

        public void setOutWaitingOrderQuotationIdName(java.lang.String[] outWaitingOrderQuotationIdName)
        Sets the outWaitingOrderQuotationIdName.
        Parameters:
        outWaitingOrderQuotationIdName - The outWaitingOrderQuotationIdName to set
      • getOrderQuotationRelIds

        public java.lang.String[] getOrderQuotationRelIds()
        Gets the orderQuotationRelIds.
        Returns:
        The orderQuotationRelIds.
      • setOrderQuotationRelIds

        public void setOrderQuotationRelIds(java.lang.String[] orderQuotationRelIds)
        Sets the orderQuotationRelIds.
        Parameters:
        orderQuotationRelIds - The orderQuotationRelIds to set
      • getErrorURL

        public java.lang.String getErrorURL()
        Returns the errorURL.
        Returns:
        String
      • setErrorURL

        public void setErrorURL(java.lang.String errorURL)
        Sets the errorURL.
        Parameters:
        errorURL - The errorURL to set.