}
public Vector<Hashtable<String, Object>> getTopNProducts(int n,
Hashtable<String, Object> productTypeHash)
throws CatalogException {
ProductType type = XmlRpcStructFactory
.getProductTypeFromXmlRpc(productTypeHash);
List<Product> topNProducts = null;
try {
topNProducts = catalog.getTopNProducts(n, type);
return XmlRpcStructFactory.getXmlRpcProductList(topNProducts);
} catch (Exception e) {
e.printStackTrace();
LOG.log(Level.WARNING,
"Exception when getting topN products by product type: ["
+ type.getProductTypeId() + "]: Message: "
+ e.getMessage());
throw new CatalogException(e.getMessage());
}
}