com.ibm.commerce.payment.beans
Class UsablePaymentTCListDataBean

com.ibm.commerce.payment.beans.UsablePaymentTCListDataBean
All Implemented Interfaces:
Delegator

public class UsablePaymentTCListDataBean
implements Delegator

This DataBean, when populated, gives a list of PaymentTCInfo bean representing payment terms and conditions that could be used to pay for the Order specified as input parameter before the DataBean is activated.

See Also:
PaymentTCInfo

Field Summary
protected  java.util.Hashtable ihshPaymentTCInfoByTradingId
           
protected  java.util.Vector ivecCommonPaymentTCInfo
           
protected  java.util.Vector ivecIdsOfTAWithNoPaymentTC
           
protected  java.util.Vector ivecTradingIds
           
protected  java.util.Vector ivecUsablePaymentTCInfo
           
 
Fields inherited from interface com.ibm.commerce.security.Delegator
COPYRIGHT
 
Constructor Summary
UsablePaymentTCListDataBean()
          UsablePaymentTCListDataBean default constructor.
 
Method Summary
protected  void completeCommonPaymentTCInfo()
          Completes the properties in the common PaymentTCInfo bean.
protected  java.util.Vector createDefaultPaymentTCInfoFromStoreSupportedPolicies()
          Returns a Vector of PaymentTCInfo Beans created from the set of Supported Payment Policies for the Store.
protected  void findCommonPaymentTCForOrderItems()
          Finds the common PaymentTCs from all the PaymentTCs specified by the various Trading Agreements used by the order items in the Order.
protected  void findPaymentTCInfoByTAFromOrderItems()
          Fills the Hashtable containing vectors of PaymentTCInfo beans keyed by Trading Agreement ID for the order items in the Order.
protected  void findUsablePaymentTCFromCommon()
          Finds the usable PaymentTCs from the vector of common PaymentTCs that the Trading Agreements of order items specify.
 Protectable getDelegate()
          Retrieves its delegatee.
 java.lang.String getMessage()
          Returns the message property of the Bean.
protected  OrderAccessBean getOrderAccessBean()
          Returns the OrderAccessBean representing the Order specified by the orderId input parameter.
protected  OrderDataBean getOrderDataBean()
          Returns the OrderDataBean representing the Order specified by the orderId input parameter.
protected  java.util.Hashtable getPaymentPolicyInfoForCurrencyBySupportedCassette()
          Returns a Hashtable containing vectors of PaymentPolicyInfo beans keys by supported Cassette.
 java.lang.Exception getPaymentSystemException()
          Returns a null or any Exception thrown by the Payment System client during the activation of the DataBean.
 PaymentTCInfo[] getPaymentTCInfo()
          Returns an array of PaymentTCInfo bean representing payment terms and conditions that could be used to pay for the specified Order.
 int getPrimaryRC()
          Returns the primary return code as returned from the Payment Manager QueryAccounts command.
 int getSecondaryRC()
          Returns the secondary return code as returned from the Payment Manager QueryAccounts command.
protected  java.lang.Integer getStoreIdFromOrder()
          Returns the Store Entity ID from the Order specified as input parameter for the activation of this DataBean.
 void populate()
          Populate the Bean Properties.
protected  void setLanguageId(java.lang.Integer aLanguageId)
          Sets the languageId property of the Bean
protected  void setMessage(java.lang.String astrMessage)
          Sets the message property of the Bean.
 void setOrderId(java.lang.Long aOrderId)
          Sets the orderId property of the Bean.
protected  void setPaymentSystemException(java.lang.Exception exc)
          Saves the Exception object returned by the Payment System client during the activation of this DataBean.
protected  void setPrimaryRC(int anPrimaryRC)
          Sets the primary return code as returned from the Payment Manager QueryOrders command.
protected  void setSecondaryRC(int anSecondaryRC)
          Sets the secondary return code as returned from the Payment Manager QueryOrders command.
 

Field Detail

ihshPaymentTCInfoByTradingId

protected java.util.Hashtable ihshPaymentTCInfoByTradingId

ivecCommonPaymentTCInfo

protected java.util.Vector ivecCommonPaymentTCInfo

ivecIdsOfTAWithNoPaymentTC

protected java.util.Vector ivecIdsOfTAWithNoPaymentTC

ivecTradingIds

protected java.util.Vector ivecTradingIds

ivecUsablePaymentTCInfo

protected java.util.Vector ivecUsablePaymentTCInfo
Constructor Detail

UsablePaymentTCListDataBean

public UsablePaymentTCListDataBean()
UsablePaymentTCListDataBean default constructor.
Method Detail

completeCommonPaymentTCInfo

protected void completeCommonPaymentTCInfo()
                                    throws ECException
Completes the properties in the common PaymentTCInfo bean. When the bean was instantiated some of the properties were not filled in to save time as the bean may not be needed unless it represents one of the common PaymentTCs.
Throws:
ECException. -  

createDefaultPaymentTCInfoFromStoreSupportedPolicies

protected java.util.Vector createDefaultPaymentTCInfoFromStoreSupportedPolicies()
                                                                         throws ECException
Returns a Vector of PaymentTCInfo Beans created from the set of Supported Payment Policies for the Store.
Returns:
java.util.Vector
Throws:
ECException. -  

findCommonPaymentTCForOrderItems

protected void findCommonPaymentTCForOrderItems()
                                         throws ECException
Finds the common PaymentTCs from all the PaymentTCs specified by the various Trading Agreements used by the order items in the Order.
Throws:
ECException. -  

findPaymentTCInfoByTAFromOrderItems

protected void findPaymentTCInfoByTAFromOrderItems()
                                            throws ECException
Fills the Hashtable containing vectors of PaymentTCInfo beans keyed by Trading Agreement ID for the order items in the Order.
Throws:
ECException. -  

findUsablePaymentTCFromCommon

protected void findUsablePaymentTCFromCommon()
                                      throws ECException
Finds the usable PaymentTCs from the vector of common PaymentTCs that the Trading Agreements of order items specify.
Throws:
ECException. -  

getDelegate

public Protectable getDelegate()
                        throws java.lang.Exception
Retrieves its delegatee. This method is called by the Access Control Framework.

For the UsablePaymentTCListDataBean, the getDelegate() method returns the OrderDataBean specified by the orderId.

Specified by:
getDelegate in interface Delegator
Returns:
com.ibm.commerce.security.Protectable
Throws:
java.lang.Exception -  

getMessage

public java.lang.String getMessage()
Returns the message property of the Bean. The message property stores any message received during population of the Bean. It may be the empty String if no message has been received.

This is mainly for diagnostics purposes.

Returns:
any String message received during population of the DataBean or the empty String if no message has been received.

getOrderAccessBean

protected OrderAccessBean getOrderAccessBean()
                                      throws ECException
Returns the OrderAccessBean representing the Order specified by the orderId input parameter.
Returns:
the OrderAccessBean

getOrderDataBean

protected OrderDataBean getOrderDataBean()
                                  throws ECException
Returns the OrderDataBean representing the Order specified by the orderId input parameter.
Returns:
the OrderDataBean.

getPaymentPolicyInfoForCurrencyBySupportedCassette

protected java.util.Hashtable getPaymentPolicyInfoForCurrencyBySupportedCassette()
                                                                          throws ECException
Returns a Hashtable containing vectors of PaymentPolicyInfo beans keys by supported Cassette. Payment Policies that are known to not support the currency specified by the Order are excluded.
Returns:
java.util.Hashtable
Throws:
ECException. -  

getPaymentSystemException

public java.lang.Exception getPaymentSystemException()
Returns a null or any Exception thrown by the Payment System client during the activation of the DataBean.

This is useful for diagnostics or for determining whether to display a user-friendly message to the customer when an empty list of PaymentTCInfo bean is returned by the getPaymentTCInfo() method.

One possible Exception returned is the com.ibm.etill.framework.clientapi.PaymentServerCommunicationException which indicates a failure to communicate with the Payment Manager.

Returns:
the java.lang.Exception object thrown by the Payment System client or null if none was thrown during the activation of the DataBean.

getPaymentTCInfo

public PaymentTCInfo[] getPaymentTCInfo()
Returns an array of PaymentTCInfo bean representing payment terms and conditions that could be used to pay for the specified Order.
Returns:
an array of PaymentTCInfo bean.
See Also:
PaymentTCInfo

getPrimaryRC

public int getPrimaryRC()
Returns the primary return code as returned from the Payment Manager QueryAccounts command.

This is mainly for diagnostics purposes.

Returns:
the primary return code from the Payment Manager QueryAccounts command or -1 if an error occurred before the QueryAccounts command was issued.

getSecondaryRC

public int getSecondaryRC()
Returns the secondary return code as returned from the Payment Manager QueryAccounts command.

This is mainly for diagnostics purposes.

Returns:
the secondary return code from the Payment Manager QueryAccounts command or -1 if an error occurred before the QueryAccounts command was issued.

getStoreIdFromOrder

protected java.lang.Integer getStoreIdFromOrder()
                                         throws ECException
Returns the Store Entity ID from the Order specified as input parameter for the activation of this DataBean.
Returns:
the Store Entity ID.
Throws:
ECException. -  

populate

public void populate()
              throws java.lang.Exception
Populate the Bean Properties. This method is called by the DataBeanManager during DataBean activation.
Throws:
Exception. -  

setLanguageId

protected void setLanguageId(java.lang.Integer aLanguageId)
Sets the languageId property of the Bean
Parameters:
aLanguageId - the Integer representing the Reference Number of the preferred Language of the requester.

setMessage

protected void setMessage(java.lang.String astrMessage)
Sets the message property of the Bean. The message property stores any message received during population of the Bean. It may be null.
Parameters:
astrMessage - the String used to set the message property of the Bean.

setOrderId

public void setOrderId(java.lang.Long aOrderId)
Sets the orderId property of the Bean. The orderId is the reference number of the customer order.
Parameters:
aOrderId - the reference number of the customer order.

setPaymentSystemException

protected void setPaymentSystemException(java.lang.Exception exc)
Saves the Exception object returned by the Payment System client during the activation of this DataBean. The Payment System is the WebSphere Payment Manager in this case.
Parameters:
exc - the Exception object returned by the Payment System client.

setPrimaryRC

protected void setPrimaryRC(int anPrimaryRC)
Sets the primary return code as returned from the Payment Manager QueryOrders command.
Parameters:
anPrimaryRC - the primary return code as returned from the Payment Manager QueryOrders command.

setSecondaryRC

protected void setSecondaryRC(int anSecondaryRC)
Sets the secondary return code as returned from the Payment Manager QueryOrders command.
Parameters:
anSecondaryRC - the secondary return code as returned from the Payment Manager QueryOrders command.