com.ibm.commerce.me.datatype

Class CIQuoteImpl

  • java.lang.Object
    • com.ibm.commerce.me.datatype.CIQuoteImpl
  • All Implemented Interfaces:
    CIQuote, java.io.Serializable


    public class CIQuoteImpl
    extends java.lang.Object
    implements java.io.Serializable, CIQuote
    This is the default implementation for CIQuote. It has setter and getter methods for setting and getting any values related to a quote. It uses the PROCPROTCL and USERREG tables to authenticate the buyer, and retrieves the logon ID and password associated with the buyer from that table.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • CIQuoteImpl

        public CIQuoteImpl()
        The CIQuoteImpl default constructor calls its parents constructor.
    • Method Detail

      • getProtocol

        public java.lang.String getProtocol()
        This method gets the quote protocol.
        Specified by:
        getProtocol in interface CIQuote
        Returns:
        the protocol
      • getShoppingCartItems

        public java.util.Vector getShoppingCartItems()
        This method gets a Vector of all the items from the shopping cart.
        Specified by:
        getShoppingCartItems in interface CIQuote
        Returns:
        the Vector of shopping cart items
      • prepareQuote

        public int prepareQuote(long anOrders_Id,
                                CommandContext cmdContext,
                                RequisitionerSessionData aReqSession)
                         throws ECException
        Populate the quote object with the data from database. This involves hydrating the quote items. This provides the necessary information for the redirect servlet to generate the response.

        Steps:
        1. uses the user ID in the command context to retrieve the organization code for the buyer
        2. setup the buyerCredentials based on the buyer organization code
        3. uses the store ID in the command context to set up supplierCredentials
        4. gets protocol information such as the unit of measure standard and classification domain
        5. fills up the purchaseOrderRequestHeader with information from the orders table
        6. populates the purchaseOrderItems list from the ORDERITEMS table

        Specified by:
        prepareQuote in interface CIQuote
        Parameters:
        anOrders_Id - the order reference number
        cmdContext - the command context used to retrieve the user ID, store ID, and language ID
        aReqSession - the requisitioner session data
        Returns:
        code representing the operation status
        Throws:
        ECException - Raised with message _ERR_FINDER_EXCEPTION, _ERR_CREATE_EXCEPTION, _ERR_NAMING_EXCEPTION, _ERR_REMOTE_EXCEPTION when the EJB encounters any problems
      • setBuyerCredentials

        public void setBuyerCredentials(Credentials newValue)
        This method sets the buyer credential information.
        Parameters:
        newValue - the buyer credential information
        See Also:
        com.ibm.commerce.me.datatype
      • setMarketPlaceCredentials

        public void setMarketPlaceCredentials(Credentials newValue)
        This method sets the marketplace credential information.
        Parameters:
        newValue - the marketplace credential information
        See Also:
        com.ibm.commerce.me.datatype
      • setProtocol

        public void setProtocol(java.lang.String aProtocol)
        This method sets the quote protocol.
        Parameters:
        aProtocol - the new protocol
      • setShoppingCartItems

        public void setShoppingCartItems(java.util.Vector newValue)
        This method sets the Vector of items in the shopping cart.
        Parameters:
        newValue - a Vector of shopping cart items
      • setSupplierCredentials

        public void setSupplierCredentials(Credentials newValue)
        This method sets the supplier credential information
        Parameters:
        newValue - the supplier credential information
        See Also:
        com.ibm.commerce.me.datatype