Rev 5214 | Blame | Compare with Previous | Last modification | View Log | RSS feed
package in.shop2020.serving.controllers;import in.shop2020.serving.controllers.BaseController;import in.shop2020.thrift.clients.CatalogClient;import org.apache.log4j.Logger;@SuppressWarnings("serial")public class ProductNotificationController extends BaseController{private static Logger log = Logger.getLogger(ProductNotificationController.class);private String emailId = null;private long itemId = 0;public ProductNotificationController(){super();}public String create() {try {emailId = this.request.getParameter("emailId");itemId = Long.parseLong(this.request.getParameter("itemId"));CatalogClient catalogClientService;catalogClientService = new CatalogClient();in.shop2020.model.v1.catalog.CatalogService.Client client = catalogClientService.getClient();client.addProductNotification(itemId, emailId);} catch (Exception e) {log.error("Exception while adding product notification for item: " + itemId + " and email: " + emailId, e);}log.debug("Got product notification for product: " + itemId + " from user: " + emailId );return "show";}}