Subversion Repositories SmartDukaan

Rev

Rev 1034 | Rev 2578 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
507 rajveer 1
package in.shop2020.serving.controllers;
2
 
3
 
4
import java.io.IOException;
5
 
832 rajveer 6
import org.apache.log4j.Logger;
773 rajveer 7
import org.apache.struts2.convention.annotation.Action;
507 rajveer 8
 
9
/**
10
 * 
11
 * @author rajveer
12
 *
13
 */
650 rajveer 14
 
15
public class HomeController extends BaseController {
16
 
1044 chandransh 17
	private static final long serialVersionUID = 5014930578479365580L;
832 rajveer 18
	private static Logger log = Logger.getLogger(Class.class);
507 rajveer 19
 
20
	public HomeController(){
21
		super();
22
	}
23
 
773 rajveer 24
	@Action("/")
650 rajveer 25
    public String index() throws SecurityException, IOException {
555 chandransh 26
    	log.info("userinfo:" + userinfo.toString());
507 rajveer 27
 
650 rajveer 28
    	htmlSnippets.put("MAIN_BANNER", pageLoader.getMainBannerHtml());
29
    	htmlSnippets.put("BEST_DEALS", pageLoader.getBestDealsHtml());
30
    	htmlSnippets.put("BEST_SELLERS", pageLoader.getBestSellersHtml());
31
    	htmlSnippets.put("LATEST_ARRIVALS", pageLoader.getLatestArrivalsHtml());
32
    	return "index";
507 rajveer 33
    }
34
 
35
	public String getMainBannerSnippet(){
36
		return htmlSnippets.get("MAIN_BANNER");
37
	}
38
 
39
	public String getBestDealsSnippet(){
40
		return htmlSnippets.get("BEST_DEALS"); 
41
	}
42
 
43
	public String getLatestArrivalsSnippet(){
44
		return htmlSnippets.get("LATEST_ARRIVALS");
45
	}
46
 
47
	public String getBestSellersSnippet(){
48
		return htmlSnippets.get("BEST_SELLERS");
49
	}
50
}