Subversion Repositories SmartDukaan

Rev

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

Rev 6623 Rev 6842
Line 316... Line 316...
316
        	}
316
        	}
317
        	
317
        	
318
        }
318
        }
319
        PriceInsertor priceInserter = new PriceInsertor();
319
        PriceInsertor priceInserter = new PriceInsertor();
320
 
320
 
-
 
321
        Map<Long,List<String>> entityTags = client.getAllEntityTags();
321
        for (Map.Entry<Long, List<Item>> entry : entityIdItemMap.entrySet()) {
322
        for (Map.Entry<Long, List<Item>> entry : entityIdItemMap.entrySet()) {
322
            long entityId = entry.getKey();
323
            long entityId = entry.getKey();
323
            List<Item> items = entry.getValue();
324
            List<Item> items = entry.getValue();
324
	            // TODO Domain name and destination directory should be read from
325
	            // TODO Domain name and destination directory should be read from
325
	            // properties file
326
	            // properties file
Line 342... Line 343...
342
            	minPrice = priceInserter.insertPriceInHtml(items, entityId,
343
            	minPrice = priceInserter.insertPriceInHtml(items, entityId,
343
            			domainName, Utils.EXPORT_PATH + "html/entities-" +  pathName + "/", null);
344
            			domainName, Utils.EXPORT_PATH + "html/entities-" +  pathName + "/", null);
344
            	if(domainOnce){
345
            	if(domainOnce){
345
            		priceString.append("<field name=\"F_50002\">" + minPrice + "</field>");
346
            		priceString.append("<field name=\"F_50002\">" + minPrice + "</field>");
346
            		availabilityString.append("<field name=\"F_50028\">" + availability + "</field>");
347
            		availabilityString.append("<field name=\"F_50028\">" + availability + "</field>");
-
 
348
            		if(entityTags.containsKey(entityId)) {
-
 
349
            			List<String> tags = entityTags.get(entityId);
-
 
350
            			for(String tag: tags){
-
 
351
            				availabilityString.append("\n<field name=\"F_50029\">" + tag + "</field>");
-
 
352
            			}
-
 
353
            		}
347
            		domainOnce = false;
354
            		domainOnce = false;
348
            	}
355
            	}
349
            	if(sources != null){
356
            	if(sources != null){
350
            		for (Source source : sources) {
357
            		for (Source source : sources) {
351
                        minPrice = priceInserter.insertPriceInHtml(items, entityId,
358
                        minPrice = priceInserter.insertPriceInHtml(items, entityId,
352
                                domainName, Utils.EXPORT_PATH + "html/entities-" + pathName + "/",
359
                                domainName, Utils.EXPORT_PATH + "html/entities-" + pathName + "/",
353
                                source);
360
                                source);
354
                        if(sourceOnce){
361
                        if(sourceOnce){
355
                        	priceString.append("<field name=\"F_50002_"
362
                        	priceString.append("<field name=\"F_50002_"
356
                                + source.getId() + "\">" + minPrice + "</field>");
363
                                + source.getId() + "\">" + minPrice + "</field>");
357
                        	availabilityString.append("<field name=\"F_50028_"
-
 
358
                        			+ source.getId() + "\">" + availability + "</field>");
-
 
359
                        }
364
                        }
360
            		}
365
            		}
361
            		sourceOnce = false;
366
            		sourceOnce = false;
362
            	}
367
            	}
363
            }
368
            }