com.ibm.commerce.payment.beans
Class PayStatusListPMDataBean

java.lang.Object
  |
  +--com.ibm.commerce.beans.InputDataBeanImpl
        |
        +--com.ibm.commerce.beans.SmartDataBeanImpl
              |
              +--com.ibm.commerce.payment.beans.PayStatusListPMDataBean
All Implemented Interfaces:
DataBean, InputDataBean, java.io.Serializable, SmartDataBean

public class PayStatusListPMDataBean
extends SmartDataBeanImpl

This DataBean, when populated, provides the payment state of the specified orders as known by WebSphere Commerce Payments. No information will be returned if the order is not known to the Payments.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The name of this class.
static java.lang.String COPYRIGHT
          IBM Copyright
 
Fields inherited from class com.ibm.commerce.beans. SmartDataBeanImpl
commandContext
 
Fields inherited from class com.ibm.commerce.beans. InputDataBeanImpl
requestProperties
 
Fields inherited from interface com.ibm.commerce.beans. DataBean
emptyString
 
Constructor Summary
PayStatusListPMDataBean()
          PayStatusListPMDataBean default constructor.
 
Method Summary
 java.lang.String getCommonAVSCode(java.lang.String orderId)
          Returns the commonAVSCode from WebSphere Commerce Payments for the specified Order.
 java.util.Vector getOrderIds()
          Returns the orderIds property of the Bean.
 java.lang.String getPaymentState(java.lang.String orderId)
          Returns the payment state of the order known to WebSphere Commerce Payments.
 int getPrimaryRC()
          Returns the primary return code as returned from the WebSphere Commerce Payments QueryOrders command.
 int getSecondaryRC()
          Returns the secondary return code as returned from the WebSphere Commerce Payments QueryOrders command.
 java.lang.String getStoreId()
          Returns the storeId property of the Bean
 void populate()
          Populate the Bean Properties.
protected  void setCommonAVSCodes(java.lang.String orderId, java.lang.String commonAVSCode)
          Saves the common AVS Code for the specified order.
 void setOrderIds(java.util.Vector vecOrderIds)
          Sets the orderIds property of the Bean.
protected  void setPaymentStates(java.lang.String orderId, java.lang.String paymentState)
          Saves the payment state for the specified order.
protected  void setPrimaryRC(int anPrimaryRC)
          Sets the primary return code as returned from the WebSphere Commerce Payments QueryOrders command.
protected  void setSecondaryRC(int anSecondaryRC)
          Sets the secondary return code as returned from the WebSphere Commerce Payments QueryOrders command.
 void setStoreId(java.lang.String astrStoreId)
          Sets the storeId property of the Bean
 
Methods inherited from class com.ibm.commerce.beans. SmartDataBeanImpl
fulfills, getCommandContext, getResources, setCommandContext
 
Methods inherited from class com.ibm.commerce.beans. InputDataBeanImpl
getRequestProperties, setRequestProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.beans. InputDataBean
getRequestProperties, setRequestProperties
 

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

CLASSNAME

public static final java.lang.String CLASSNAME
The name of this class.
Constructor Detail

PayStatusListPMDataBean

public PayStatusListPMDataBean()
PayStatusListPMDataBean default constructor.
Method Detail

getCommonAVSCode

public java.lang.String getCommonAVSCode(java.lang.String orderId)
Returns the commonAVSCode from WebSphere Commerce Payments for the specified Order.

The commonAVSCode property is the String representation of the the common AVS code set by the payment cassette. The payment cassette maps the payment service specific AVS Results Code returned by the Address Verification Services (AVS) to the WebSphere Commerce Payments defined common AVS code.

Possible values for the common AVS Code are:

Parameters:
orderId - the ID of the order
Returns:
the String representation of the common AVS code If the cassette does not use AVS, an empty String is returned.

getOrderIds

public java.util.Vector getOrderIds()
Returns the orderIds property of the Bean. The orderIds property is a Vector of objects representing the order IDs of customer orders. This is the Vector of objects that the user of the DataBean specified using the setOrderIds() method.
Returns:
the Vector of order IDs

getPaymentState

public java.lang.String getPaymentState(java.lang.String orderId)
Returns the payment state of the order known to WebSphere Commerce Payments.

Possible values for the payment state are defined in the com.ibm.etill.frame.clientapi.PaymentCommandConstants interface.

The constants defined for payment state are:

If there are more than one payment for an order then the payment state of one of the payments will be used if it is not PAYMENTSTATE_VOID.

The value for the PAYMENTSTATE_VOID constant will be returned if and only if all the payments for the order have the payment state equals to the constant in PAYMENTSTATE_VOID.

Parameters:
orderId - java.lang.String
Returns:
the String representing the payment state of the order. It may be the empty string if there is no payment for the order or if an error occurred during the population of this DataBean.

getPrimaryRC

public int getPrimaryRC()
Returns the primary return code as returned from the WebSphere Commerce Payments QueryOrders command.
Returns:
the primary return code from the QueryOrders command or -1 if an error occurred before the command was issued.

getSecondaryRC

public int getSecondaryRC()
Returns the secondary return code as returned from the WebSphere Commerce Payments QueryOrders command.
Returns:
the secondary return code from the QueryOrders command or -1 if an error occurred before the command was issued.

getStoreId

public java.lang.String getStoreId()
Returns the storeId property of the Bean
Returns:
the ID of the Store to which the orders belong.

populate

public void populate()
              throws java.lang.Exception
Populate the Bean Properties. This method is called by the DataBeanManager during DataBean activation.
Specified by:
populate in interface SmartDataBean
Overrides:
populate in class SmartDataBeanImpl
Throws:
java.lang.Exception

setCommonAVSCodes

protected void setCommonAVSCodes(java.lang.String orderId,
                                 java.lang.String commonAVSCode)
Saves the common AVS Code for the specified order.
Parameters:
orderId - the ID of the order
commonAVSCode - the String representation of the common AVS code
See Also:
getCommonAVSCode

setOrderIds

public void setOrderIds(java.util.Vector vecOrderIds)
Sets the orderIds property of the Bean. The orderIds property is a Vector of IDs of customer orders. The objects could be Strings or Integers or Long. The DataBean does not check. It simply pass the Vector to WebSphere Commerce Payments.
Parameters:
vecOrderIds - the Vector containing IDs of customer orders to check

setPaymentStates

protected void setPaymentStates(java.lang.String orderId,
                                java.lang.String paymentState)
Saves the payment state for the specified order.
Parameters:
orderId - the ID of the order
paymentState - the payment state
See Also:
getPaymentStates

setPrimaryRC

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

setSecondaryRC

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

setStoreId

public void setStoreId(java.lang.String astrStoreId)
Sets the storeId property of the Bean
Parameters:
astrStoreId - the ID of the Store to which the orders belong.