Subversion Repositories SmartDukaan

Rev

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

Rev 2579 Rev 2594
Line 47... Line 47...
47
		try {
47
		try {
48
			CatalogServiceClient catalogServiceClient = new CatalogServiceClient();
48
			CatalogServiceClient catalogServiceClient = new CatalogServiceClient();
49
			Client client = catalogServiceClient.getClient();
49
			Client client = catalogServiceClient.getClient();
50
			
50
			
51
			//Get top 4 best deals 
51
			//Get top 4 best deals 
52
			bestDealCatalogIds = client.getBestDealsCatalogIds(0,4, null, -1);
52
			bestDealCatalogIds = client.getBestDealsCatalogIds(0, 4, null, -1);
53
			
53
			
54
			//Get top 8 best deals b'coz 4 of them may overlap with best deals.
54
			//Get top 8 best deals b'coz 4 of them may overlap with best deals.
55
			bestSellerCatalogIds = client.getBestSellersCatalogIds(0, 8, null, -1);
55
			bestSellerCatalogIds = client.getBestSellersCatalogIds(0, 8, null, -1);
56
			bestSellerCatalogIds.removeAll(bestDealCatalogIds);
56
			bestSellerCatalogIds.removeAll(bestDealCatalogIds);
57
			if(bestSellerCatalogIds.size() < bestSellerCount)
57
			if(bestSellerCatalogIds.size() < bestSellerCount)
Line 78... Line 78...
78
		
78
		
79
    	htmlSnippets.put("MAIN_BANNER", pageLoader.getMainBannerHtml());
79
    	htmlSnippets.put("MAIN_BANNER", pageLoader.getMainBannerHtml());
80
    	return "index";
80
    	return "index";
81
    }
81
    }
82
 
82
 
-
 
83
	/**
-
 
84
	 * Returns a list of snippets to be used on the home page corresponding to
-
 
85
	 * the given catalog ids. The snippets are in the same order as the ids in
-
 
86
	 * the input list. In case a snippet is not found for an entity, this method
-
 
87
	 * simply logs the problem and moves on.
-
 
88
	 * 
-
 
89
	 * @param catalogIds
-
 
90
	 *            Ids of the entities which we want to show.
-
 
91
	 * @return The snippet corresponding to each catalog entity
-
 
92
	 */
83
	private List<String> getSnippets(List<Long> catalogIds) {
93
	private List<String> getSnippets(List<Long> catalogIds) {
84
		List<String> snippets = new ArrayList<String>();
94
		List<String> snippets = new ArrayList<String>();
85
		if(catalogIds == null)
95
		if(catalogIds == null)
86
			return snippets;
96
			return snippets;
87
		for(Long item: catalogIds){
97
		for(Long item: catalogIds){