Subversion Repositories SmartDukaan

Rev

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

Rev 2202 Rev 2204
Line 196... Line 196...
196
		// a particular entity are always downloaded from the same location.
196
		// a particular entity are always downloaded from the same location.
197
		String staticurl = "http://static" + entity.getID()%3 + "." + domain;
197
		String staticurl = "http://static" + entity.getID()%3 + "." + domain;
198
		
198
		
199
		templateFile= Utils.VTL_SRC_PATH + "product_summary.vm";
199
		templateFile= Utils.VTL_SRC_PATH + "product_summary.vm";
200
		getProductSummaryHtml(expEntity, items, templateFile, exportPath);
200
		getProductSummaryHtml(expEntity, items, templateFile, exportPath);
201
		FileUtils.writeStringToFile(new File("ProductDetail.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File("ProductDetail.html"))));
201
		FileUtils.writeStringToFile(new File(exportPath + catalogId + File.separator + "ProductDetail.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File(exportPath + catalogId + File.separator + "ProductDetail.html"))));
202
		
202
		
203
		
203
		
204
		templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_widget.vm";
204
		templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_widget.vm";
205
		getEntityWidgetSnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
205
		getEntityWidgetSnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
206
		FileUtils.writeStringToFile(new File("WidgetSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File("WidgetSnippet.html"))));
206
		FileUtils.writeStringToFile(new File(exportPath + catalogId + File.separator + "WidgetSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File(exportPath + catalogId + File.separator + "WidgetSnippet.html"))));
207
		
207
		
208
		
208
		
209
		templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_homepage.vm";
209
		templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_homepage.vm";
210
		getEntityHomeSnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
210
		getEntityHomeSnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
211
		FileUtils.writeStringToFile(new File("HomeSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File("HomeSnippet.html"))));
211
		FileUtils.writeStringToFile(new File(exportPath + catalogId + File.separator + "HomeSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File(exportPath + catalogId + File.separator + "HomeSnippet.html"))));
212
		
212
		
213
		
213
		
214
		templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_searchpage.vm";
214
		templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_searchpage.vm";
215
		getEntitySearchSnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
215
		getEntitySearchSnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
216
		FileUtils.writeStringToFile(new File("SearchSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File("SearchSnippet.html"))));
216
		FileUtils.writeStringToFile(new File(exportPath + catalogId + File.separator + "SearchSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File(exportPath + catalogId + File.separator + "SearchSnippet.html"))));
217
		
217
		
218
		
218
		
219
		templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_categorypage.vm";
219
		templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_categorypage.vm";
220
		getEntityCategorySnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
220
		getEntityCategorySnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
221
		FileUtils.writeStringToFile(new File("CategorySnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File("CategorySnippet.html"))));
221
		FileUtils.writeStringToFile(new File(exportPath + catalogId + File.separator + "CategorySnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File(exportPath + catalogId + File.separator + "CategorySnippet.html"))));
222
		
222
		
223
		
223
		
224
		templateFile= Utils.VTL_SRC_PATH + "slideguide_img_video.vm";
224
		templateFile= Utils.VTL_SRC_PATH + "slideguide_img_video.vm";
225
		getEntitySlideGuideHtml(expEntity, templateFile, domain, exportPath);
225
		getEntitySlideGuideHtml(expEntity, templateFile, domain, exportPath);
226
		FileUtils.writeStringToFile(new File("SlideGuide.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File("SlideGuide.html"))));
226
		FileUtils.writeStringToFile(new File(exportPath + catalogId + File.separator + "SlideGuide.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File(exportPath + catalogId + File.separator + "SlideGuide.html"))));
227
		
227
		
228
		templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_phones_i_own.vm";
228
		templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_phones_i_own.vm";
229
		getEntityPhonesIOwnSnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
229
		getEntityPhonesIOwnSnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
230
		FileUtils.writeStringToFile(new File("PhonesIOwnSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File("PhonesIOwnSnippet.html"))));
230
		FileUtils.writeStringToFile(new File(exportPath + catalogId + File.separator + "PhonesIOwnSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File(exportPath + catalogId + File.separator + "PhonesIOwnSnippet.html"))));
231
		
231
		
232
		if(expEntity.getCategory().getParentCategory().getID() == Utils.MOBILE_PHONES_CATAGOEY){
232
		if(expEntity.getCategory().getParentCategory().getID() == Utils.MOBILE_PHONES_CATAGOEY){
233
		    
233
		    
234
		    templateFile= Utils.VTL_SRC_PATH + "slideguide_for_comparison.vm";
234
		    templateFile= Utils.VTL_SRC_PATH + "slideguide_for_comparison.vm";
235
	        getEntitySnippetForComparison(expEntity, templateFile, domain, exportPath);
235
	        getEntitySnippetForComparison(expEntity, templateFile, domain, exportPath);
236
	        FileUtils.writeStringToFile(new File("ComparisonSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File("ComparisonSnippet.html"))));
236
	        FileUtils.writeStringToFile(new File(exportPath + catalogId + File.separator + "ComparisonSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File(exportPath + catalogId + File.separator + "ComparisonSnippet.html"))));
237
	        
237
	        
238
	        templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_comparisonpage.vm";
238
	        templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_comparisonpage.vm";
239
	        getEntityCompareSnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
239
	        getEntityCompareSnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
240
	        FileUtils.writeStringToFile(new File("CompareProductSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File("CompareProductSnippet.html"))));
240
	        FileUtils.writeStringToFile(new File(exportPath + catalogId + File.separator + "CompareProductSnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File(exportPath + catalogId + File.separator + "CompareProductSnippet.html"))));
241
	        
241
	        
242
            templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_comparisonpage_summary.vm";
242
            templateFile= Utils.VTL_SRC_PATH + "entity_snippet_for_comparisonpage_summary.vm";
243
            getEntityCompareSummarySnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
243
            getEntityCompareSummarySnippetHtml(expEntity, items, templateFile, staticurl, exportPath);
244
            FileUtils.writeStringToFile(new File("CompareProductSummarySnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File("CompareProductSummarySnippet.html"))));
244
            FileUtils.writeStringToFile(new File(exportPath + catalogId + File.separator + "CompareProductSummarySnippet.html"), StringEscapeUtils.escapeHtml(FileUtils.readFileToString(new File(exportPath + catalogId + File.separator + "CompareProductSummarySnippet.html"))));
245
            
245
            
246
            getSlidenamesSnippet(expEntity, exportPath);
246
            getSlidenamesSnippet(expEntity, exportPath);
247
		}
247
		}
248
		
248
		
249
		getEntityTitleSnippetHtml(expEntity, exportPath);
249
		getEntityTitleSnippetHtml(expEntity, exportPath);