com.theopenstack.rtpdemo.model.adapter
Class WSAdapter

java.lang.Object
  |
  +--com.theopenstack.rtpdemo.model.adapter.WSAdapter
All Implemented Interfaces:
RTPDEMOAdapterIF

public class WSAdapter
extends java.lang.Object
implements RTPDEMOAdapterIF

WS adapter invokes a web service to get products based on the search string. The Service is assumed to return a list of products in a CSV format (Comma separated value). The adapter converts this to the list of ProductVO objects and returns the list.


Constructor Summary
protected WSAdapter()
           
 
Method Summary
 PriceQuoteVO getPrice(ProductVO product, int quantity)
          Get price
 java.util.ArrayList getProducts(java.lang.String nameSearchString)
          Get products
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSAdapter

protected WSAdapter()
Method Detail

getProducts

public java.util.ArrayList getProducts(java.lang.String nameSearchString)
Description copied from interface: RTPDEMOAdapterIF
Get products

Specified by:
getProducts in interface RTPDEMOAdapterIF
Parameters:
nameSearchString -
Returns:
returns the product ArrayList

getPrice

public PriceQuoteVO getPrice(ProductVO product,
                             int quantity)
Description copied from interface: RTPDEMOAdapterIF
Get price

Specified by:
getPrice in interface RTPDEMOAdapterIF
Parameters:
product -
quantity -
Returns:
returns the PriceQuoteVO