Subversion Repositories SmartDukaan

Rev

Rev 375 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 375 Rev 387
Line 1... Line 1...
1
/**
1
/**
2
 * 
2
 * 
3
 */
3
 */
4
package in.shop2020.serving.controllers;
4
package in.shop2020.serving.controllers;
5
 
5
 
-
 
6
 
6
import in.shop2020.serving.pages.PageContentKeys;
7
import in.shop2020.serving.pages.PageContentKeys;
7
import in.shop2020.serving.pages.PageEnum;
8
import in.shop2020.serving.pages.PageEnum;
8
import in.shop2020.serving.pages.PageManager;
9
import in.shop2020.serving.pages.PageManager;
9
 
10
 
10
import java.io.IOException;
11
import java.io.IOException;
Line 51... Line 52...
51
	/**
52
	/**
52
	 * 
53
	 * 
53
	 */
54
	 */
54
	private String id;
55
	private String id;
55
	
56
	
56
	private String sample;
57
	private Map<String,String> htmlSnippets;
57
	
58
	
58
	
59
	
59
	public EntityController(){
60
	public EntityController(){
60
		super();
61
		super();
61
		pageManager = PageManager.getPageManager();
62
		pageManager = PageManager.getPageManager();
Line 64... Line 65...
64
    public HttpHeaders show() throws SecurityException, IOException {
65
    public HttpHeaders show() throws SecurityException, IOException {
65
    	log.info("id=" + id);
66
    	log.info("id=" + id);
66
    	Map<PageContentKeys, String> params = new HashMap<PageContentKeys, String>();
67
    	Map<PageContentKeys, String> params = new HashMap<PageContentKeys, String>();
67
    	params.put(PageContentKeys.ENTITY_ID, id);
68
    	params.put(PageContentKeys.ENTITY_ID, id);
68
    	Map<String,String> contents = pageManager.getPageContents(PageEnum.PRODUCT_PAGE, params);
69
    	Map<String,String> contents = pageManager.getPageContents(PageEnum.PRODUCT_PAGE, params);
69
    	sample = contents.get("SLIDE_GUIDE");
70
    	htmlSnippets = pageManager.getPageContents(PageEnum.PRODUCT_PAGE, params); 
-
 
71
    	
70
    	System.out.println(sample);
72
    	System.out.println(htmlSnippets);
71
    	/*
73
    	/*
72
    	String contextPath = this.servletContext.getContextPath();
74
    	String contextPath = this.servletContext.getContextPath();
73
    	log.info("contextPath=" + contextPath);
75
    	log.info("contextPath=" + contextPath);
74
    	
76
    	
75
    	String realPath = this.servletContext.getRealPath("/");
77
    	String realPath = this.servletContext.getRealPath("/");
Line 111... Line 113...
111
	@Override
113
	@Override
112
	public void setServletContext(ServletContext servletContext) {
114
	public void setServletContext(ServletContext servletContext) {
113
		this.servletContext = servletContext;
115
		this.servletContext = servletContext;
114
	}
116
	}
115
	
117
	
116
	public String getSample(){
118
	public Map<String,String> getHtmlSnippets(){
117
		return sample;
119
		return htmlSnippets;
118
	}
120
	}
119
 
121
 
120
}
122
}