Subversion Repositories SmartDukaan

Rev

Rev 1044 | Rev 1258 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1044 Rev 1197
Line 30... Line 30...
30
	private static Logger log = Logger.getLogger(Class.class);	
30
	private static Logger log = Logger.getLogger(Class.class);	
31
	/**
31
	/**
32
	 * 
32
	 * 
33
	 */
33
	 */
34
	private String id;
34
	private String id;
35
	
-
 
36
	private long productId;
35
	private long productId;
37
	
36
	
38
	public EntityController(){
37
	public EntityController(){
39
		super();
38
		super();
40
	}
39
	}
Line 46... Line 45...
46
		@Action("/entity")
45
		@Action("/entity")
47
	})
46
	})
48
    public String show() throws SecurityException, IOException {
47
    public String show() throws SecurityException, IOException {
49
    	log.info("id=" + id);
48
    	log.info("id=" + id);
50
 
49
 
-
 
50
    	String pageTitle = pageLoader.getPageTitleHtml(productId);
-
 
51
    	
-
 
52
    	//Extracting Product name from Page Title
-
 
53
    	
-
 
54
    	String[] items = pageTitle.split("\\|");
-
 
55
    	String productName = items[0];
-
 
56
    	
51
    	htmlSnippets.put("PRODUCT_SUMMARY", pageLoader.getProductSummaryHtml(productId));
57
    	htmlSnippets.put("PRODUCT_SUMMARY", pageLoader.getProductSummaryHtml(productId));
52
		htmlSnippets.put("SOCIAL_UTILS", pageLoader.getSocialUtilsHtml(productId));
58
		htmlSnippets.put("SOCIAL_UTILS", pageLoader.getSocialUtilsHtml(productId, productName, request.getRequestURL().toString()));
53
		htmlSnippets.put("SLIDE_GUIDE", pageLoader.getSlideGuideHtml(productId));
59
		htmlSnippets.put("SLIDE_GUIDE", pageLoader.getSlideGuideHtml(productId));
54
		htmlSnippets.put("PAGE_TITLE", pageLoader.getPageTitleHtml(productId));
60
		htmlSnippets.put("PAGE_TITLE", pageTitle);
55
		htmlSnippets.put("PAGE_METADESC", pageLoader.getPageMetaDescriptionHtml(productId));
61
		htmlSnippets.put("PAGE_METADESC", pageLoader.getPageMetaDescriptionHtml(productId));
56
		htmlSnippets.put("PAGE_METAKEYWORDS", pageLoader.getPageMetaKeywordsHtml(productId));
62
		htmlSnippets.put("PAGE_METAKEYWORDS", pageLoader.getPageMetaKeywordsHtml(productId));
57
	
63
	
58
		try {
64
		try {
59
			UserContextServiceClient userServiceClient = new UserContextServiceClient();
65
			UserContextServiceClient userServiceClient = new UserContextServiceClient();
Line 129... Line 135...
129
	
135
	
130
	public String getReviewsSnippet(){
136
	public String getReviewsSnippet(){
131
		return htmlSnippets.get("REVIEWS");
137
		return htmlSnippets.get("REVIEWS");
132
	}
138
	}
133
	
139
	
-
 
140
	public String getProductName()	{
-
 
141
		return htmlSnippets.get("PRODUCT_NAME");
-
 
142
	}
134
}
143
}
135
144