Subversion Repositories SmartDukaan

Rev

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

Rev 637 Rev 650
Line 38... Line 38...
38
	private static Log log = LogFactory.getLog(CategoryController.class);
38
	private static Log log = LogFactory.getLog(CategoryController.class);
39
 
39
 
40
	/**
40
	/**
41
	 * 
41
	 * 
42
	 */
42
	 */
43
	private Map<String,String> htmlSnippets;
-
 
44
	private Map<String, String[]> results;
43
	private Map<String, String[]> results;
45
	private Map<String, String> snippets;
44
	private Map<String, String> snippets;
46
	private Map<String, List<String[]>> facets;
45
	private Map<String, List<String[]>> facets;
47
	private List<String[]> crumbs;
46
	private List<String[]> crumbs;
48
	/**
47
	/**
Line 71... Line 70...
71
	 */
70
	 */
72
    public HttpHeaders show() throws SecurityException, IOException {
71
    public HttpHeaders show() throws SecurityException, IOException {
73
    	log.info("id=" + id);
72
    	log.info("id=" + id);
74
    	this.categoryName = CategoryManager.getCategoryManager().getCategoryLabel(Long.parseLong(id));
73
    	this.categoryName = CategoryManager.getCategoryManager().getCategoryLabel(Long.parseLong(id));
75
    	
74
    	
76
    	
-
 
77
    	htmlSnippets = new HashMap<String, String>();
-
 
78
    	
-
 
79
		htmlSnippets.put("HEADER", pageLoader.getHeaderHtml(userinfo.isLoggedIn(), userinfo.getNameOfUser()));
-
 
80
		htmlSnippets.put("MAIN_MENU", pageLoader.getMainMenuHtml());
-
 
81
		htmlSnippets.put("SEARCH_BAR", pageLoader.getSearchBarHtml(userinfo.getTotalItems(), 10000));
-
 
82
		htmlSnippets.put("CUSTOMER_SERVICE", pageLoader.getCustomerServiceHtml());
-
 
83
		htmlSnippets.put("MY_RESEARCH", pageLoader.getMyResearchHtml(userinfo.getUserId(), userinfo.isLoggedIn()));
-
 
84
		htmlSnippets.put("BROWSE_HISTORY", pageLoader.getBrowseHistoryHtml(userinfo.getUserId(), userinfo.isLoggedIn()));
-
 
85
		htmlSnippets.put("FOOTER",pageLoader.getFooterHtml());
-
 
86
		
-
 
87
		htmlSnippets.put("CATEGORY_HEADER", pageLoader.getCategoryHeaderSnippet());
75
		htmlSnippets.put("CATEGORY_HEADER", pageLoader.getCategoryHeaderSnippet());
88
		htmlSnippets.put("MAIN_BANNER", "");
-
 
89
		htmlSnippets.put("SIDE_BANNER", "");
-
 
90
		htmlSnippets.put("TAB_BUTTONS", "");
-
 
91
		
-
 
92
 
-
 
93
 
76
 
94
		
-
 
95
		String[] facetDefIDs = new String[] {"Category","F_50002","F_50001",  "F_50006", "F_50007" };
77
		String[] facetDefIDs = new String[] {"Category","F_50002","F_50001",  "F_50006", "F_50007" };
96
    	
78
    	
97
    	String[] facetLabels = new String[] {"Category","Price", "Brand", "Data Connectivity", "Camera Resolution" 	};
79
    	String[] facetLabels = new String[] {"Category","Price", "Brand", "Data Connectivity", "Camera Resolution" 	};
98
 
80
 
99
    	String[] fqrys = this.request.getParameterValues("fq");
81
    	String[] fqrys = this.request.getParameterValues("fq");
Line 218... Line 200...
218
    public String getCategoryName() {
200
    public String getCategoryName() {
219
    	return this.categoryName;
201
    	return this.categoryName;
220
    }
202
    }
221
    
203
    
222
    
204
    
223
    public String getHeaderSnippet(){
-
 
224
		return htmlSnippets.get("HEADER");
-
 
225
	}
-
 
226
	
-
 
227
	public String getMainMenuSnippet(){
-
 
228
		return htmlSnippets.get("MAIN_MENU");
-
 
229
	}
-
 
230
	
-
 
231
	public String getSearchBarSnippet(){
-
 
232
		return htmlSnippets.get("SEARCH_BAR");
-
 
233
	}
-
 
234
			
-
 
235
	public String getCustomerServiceSnippet(){
-
 
236
		return htmlSnippets.get("CUSTOMER_SERVICE");
-
 
237
	}
-
 
238
	
-
 
239
	public String getSearchHeaderSnippet(){
205
    public String getSearchHeaderSnippet(){
240
		return htmlSnippets.get("SEARCH_HEADER");
206
		return htmlSnippets.get("SEARCH_HEADER");
241
	}
207
	}
242
	
208
	
243
	public String getSearchDetailsSnippet(){
209
	public String getSearchDetailsSnippet(){
244
		return htmlSnippets.get("SEARCH_DETAILS");
210
		return htmlSnippets.get("SEARCH_DETAILS");
245
	}
211
	}
246
	
212
	
247
	public String getMyResearchSnippet(){
-
 
248
		return htmlSnippets.get("MY_RESEARCH");
-
 
249
	}
-
 
250
	
-
 
251
	public String getBrowseHistorySnippet(){
-
 
252
		return htmlSnippets.get("BROWSE_HISTORY");
-
 
253
	}
-
 
254
	
-
 
255
	public String getFooterSnippet(){
-
 
256
		return htmlSnippets.get("FOOTER");
-
 
257
	}
-
 
258
	
213
	
259
	public String getJsFileSnippet(){
-
 
260
		return htmlSnippets.get("JS_FILES");
-
 
261
	}
-
 
262
	
-
 
263
	public String getCssFileSnippet(){
-
 
264
		return htmlSnippets.get("CSS_FILES");
-
 
265
	}
-
 
266
 
-
 
267
    public String getQuery() {
214
	public String getQuery() {
268
    	return this.query;
215
    	return this.query;
269
    }
216
    }
270
    
217
    
271
    
218
    
272
    public Map<String, String[]> getResults() {
219
    public Map<String, String[]> getResults() {