Subversion Repositories SmartDukaan

Rev

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

Rev 5664 Rev 5669
Line 293... Line 293...
293
	            // TODO Domain name and destination directory should be read from
293
	            // TODO Domain name and destination directory should be read from
294
	            // properties file
294
	            // properties file
295
            double minPrice = 0d;
295
            double minPrice = 0d;
296
            StringBuilder priceString = new StringBuilder();
296
            StringBuilder priceString = new StringBuilder();
297
            boolean domainOnce = true;
297
            boolean domainOnce = true;
-
 
298
            boolean sourceOnce = true;
298
            for(String domainPath : DOMAINPATHS){
299
            for(String domainPath : DOMAINPATHS){
299
            	String domainName = domainPath;
300
            	String domainName = domainPath;
300
            	String pathName = domainPath.split("\\.")[0].split(":")[0];
301
            	String pathName = domainPath.split("\\.")[0].split(":")[0];
301
            	minPrice = priceInserter.insertPriceInHtml(items, entityId,
302
            	minPrice = priceInserter.insertPriceInHtml(items, entityId,
302
            			domainName, Utils.EXPORT_PATH + "html/entities-" +  pathName + "/", null);
303
            			domainName, Utils.EXPORT_PATH + "html/entities-" +  pathName + "/", null);
Line 304... Line 305...
304
            		priceString.append(
305
            		priceString.append(
305
            				"<field name=\"F_50002\">" + minPrice + "</field>");
306
            				"<field name=\"F_50002\">" + minPrice + "</field>");
306
            		domainOnce = false;
307
            		domainOnce = false;
307
            	}
308
            	}
308
            	if(sources != null){
309
            	if(sources != null){
309
            		boolean sourceOnce = true;
-
 
310
            		for (Source source : sources) {
310
            		for (Source source : sources) {
311
                        minPrice = priceInserter.insertPriceInHtml(items, entityId,
311
                        minPrice = priceInserter.insertPriceInHtml(items, entityId,
312
                                domainName, Utils.EXPORT_PATH + "html/entities-" + pathName + "/",
312
                                domainName, Utils.EXPORT_PATH + "html/entities-" + pathName + "/",
313
                                source);
313
                                source);
314
                        if(sourceOnce){
314
                        if(sourceOnce){
315
                        	priceString.append("<field name=\"F_50002_"
315
                        	priceString.append("<field name=\"F_50002_"
316
                                + source.getId() + "\">" + minPrice + "</field>");
316
                                + source.getId() + "\">" + minPrice + "</field>");
317
                        	sourceOnce = false;
-
 
318
                        }
317
                        }
319
            		}
318
            		}
-
 
319
            		sourceOnce = false;
320
            	}
320
            	}
321
            }
321
            }
322
 
322
 
323
            priceInserter.insertPriceInSolrData(entityId,
323
            priceInserter.insertPriceInSolrData(entityId,
324
                    priceString.toString());
324
                    priceString.toString());