Rev 590 | Blame | Last modification | View Log | RSS feed
/****/package in.shop2020.serving.controllers;import in.shop2020.model.v1.widgets.WidgetService.Client;import in.shop2020.serving.pages.PageContentKeys;import in.shop2020.serving.pages.PageEnum;import in.shop2020.serving.pages.PageManager;import in.shop2020.thrift.clients.WidgetServiceClient;import java.io.IOException;import java.util.HashMap;import java.util.Map;import java.util.StringTokenizer;import javax.servlet.ServletContext;import org.apache.juli.logging.Log;import org.apache.juli.logging.LogFactory;import org.apache.struts2.convention.annotation.Action;import org.apache.struts2.convention.annotation.Actions;import org.apache.struts2.convention.annotation.Result;import org.apache.struts2.convention.annotation.Results;import org.apache.struts2.rest.DefaultHttpHeaders;import org.apache.struts2.rest.HttpHeaders;import org.apache.struts2.util.ServletContextAware;import com.opensymphony.xwork2.ModelDriven;/**** @author rajveer**/public class HomeController extends BaseController {/****/private static final long serialVersionUID = 1L;/****/private static Log log = LogFactory.getLog(HomeController.class);public HomeController(){super();}public String index() throws SecurityException, IOException {log.info("userinfo:" + userinfo.toString());htmlSnippets.put("MAIN_BANNER", pageLoader.getMainBannerHtml());htmlSnippets.put("BEST_DEALS", pageLoader.getBestDealsHtml());htmlSnippets.put("BEST_SELLERS", pageLoader.getBestSellersHtml());htmlSnippets.put("LATEST_ARRIVALS", pageLoader.getLatestArrivalsHtml());return "index";}public String getMainBannerSnippet(){return htmlSnippets.get("MAIN_BANNER");}public String getBestDealsSnippet(){return htmlSnippets.get("BEST_DEALS");}public String getLatestArrivalsSnippet(){return htmlSnippets.get("LATEST_ARRIVALS");}public String getBestSellersSnippet(){return htmlSnippets.get("BEST_SELLERS");}}