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 uses PROCPROTCL and USERREG table to authenticate the buyer, and retrives the logon_id, password associated with the buyer from that table.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM Copyright field
 
Constructor Summary
CIQuoteImpl()
          CIQuoteImpl default constructor
 
Method Summary
  Credentials getBuyerCredentials()
          Gets the buyer credential information
  Credentials getMarketPlaceCredentials()
          Gets the buyer marketplace information
 java.lang.String getProtocol()
          Gets the protocol
  PurchaseOrderRequestHeader getPurchaseOrderRequestHeader()
          Gets the purchase order request header
  RequisitionerSessionData getRequisitionerSessionData()
          Gets the requisitioner session data
 java.util.Vector getShoppingCartItems()
          Gets the list of items from the shopping cart
  Credentials getSupplierCredentials()
          Get the supplier credential information
 int prepareQuote(long orders_Id, CommandContext cmdContext, RequisitionerSessionData reqSession)
          Populate the quote object with the data from database.
 void setBuyerCredentials( Credentials newValue)
          Sets the buyer credential information
 void setMarketPlaceCredentials( Credentials newValue)
          Set the buyer credential information
 void setProtocol(java.lang.String protocol)
          Sets the protocol
 void setPurchaseOrderRequestHeader( PurchaseOrderRequestHeader newValue)
          Sets the purchase order request header
 void setRequisitionerSessionData( RequisitionerSessionData reqSession)
          Sets Requisitioner session data
 void setShoppingCartItems(java.util.Vector newValue)
          Sets the list of items in the shopping cart
 void setSupplierCredentials( Credentials newValue)
          Set the supplier credential information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

CIQuoteImpl

public CIQuoteImpl()
CIQuoteImpl default constructor
Method Detail

getBuyerCredentials

public Credentials getBuyerCredentials()
Gets the buyer credential information
Specified by:
getBuyerCredentials in interface CIQuote
Returns:
the buyer credential information

getMarketPlaceCredentials

public Credentials getMarketPlaceCredentials()
Gets the buyer marketplace information
Specified by:
getMarketPlaceCredentials in interface CIQuote
Returns:
the marketplace credential information

getProtocol

public java.lang.String getProtocol()
Gets the protocol
Specified by:
getProtocol in interface CIQuote
Returns:
the protocol

getPurchaseOrderRequestHeader

public PurchaseOrderRequestHeader getPurchaseOrderRequestHeader()
Gets the purchase order request header
Specified by:
getPurchaseOrderRequestHeader in interface CIQuote
Returns:
the purchase order request header

getRequisitionerSessionData

public RequisitionerSessionData getRequisitionerSessionData()
Gets the requisitioner session data
Specified by:
getRequisitionerSessionData in interface CIQuote
Returns:
the requisitioner session data

getShoppingCartItems

public java.util.Vector getShoppingCartItems()
Gets the list of items from the shopping cart
Specified by:
getShoppingCartItems in interface CIQuote
Returns:
the list of shopping cart items

getSupplierCredentials

public Credentials getSupplierCredentials()
Get the supplier credential information
Specified by:
getSupplierCredentials in interface CIQuote
Returns:
the supplier credential information

prepareQuote

public int prepareQuote(long orders_Id,
CommandContext cmdContext,
RequisitionerSessionData reqSession)
                 throws ECException
Populate the quote object with the data from database. This inturn 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 organization code for the buyer 2. sets up buyerCredentials based on the buyer organization code 3. uses the store_id in the command context to set up supplierCredentials 4. gets protocol info such as uom standard and classification domain 5. fills up purchaseOrderRequestHeader with information from orders table 6. populates the purchaseOrderItems list from ORDERITEMS table
Specified by:
prepareQuote in interface CIQuote
Parameters:
orders_Id - the order refernce number
cmdContext - the command context used to retrive user id, store id, and language id
reqSession - th 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 encoutners any problems

setBuyerCredentials

public void setBuyerCredentials(Credentials newValue)
Sets the buyer credential information
Parameters:
newValue - the buyer credential information

setMarketPlaceCredentials

public void setMarketPlaceCredentials(Credentials newValue)
Set the buyer credential information
Parameters:
newValue - the buyer credential information

setProtocol

public void setProtocol(java.lang.String protocol)
Sets the protocol
Parameters:
protocol - the new protocol

setPurchaseOrderRequestHeader

public void setPurchaseOrderRequestHeader(PurchaseOrderRequestHeader newValue)
Sets the purchase order request header

setRequisitionerSessionData

public void setRequisitionerSessionData(RequisitionerSessionData reqSession)
Sets Requisitioner session data
Specified by:
setRequisitionerSessionData in interface CIQuote
Parameters:
reqSession - the requisitioner session data

setShoppingCartItems

public void setShoppingCartItems(java.util.Vector newValue)
Sets the list of items in the shopping cart
Parameters:
newValue - a list of shopping cart items

setSupplierCredentials

public void setSupplierCredentials(Credentials newValue)
Set the supplier credential information
Parameters:
newValue - the supplier credential information