Subversion Repositories SmartDukaan

Rev

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

Rev 638 Rev 733
Line 74... Line 74...
74
	private String[] xmlTabIndentation = {"", "\t", "\t\t", "\t\t\t", 
74
	private String[] xmlTabIndentation = {"", "\t", "\t\t", "\t\t\t", 
75
			"\t\t\t\t", "\t\t\t\t\t", "\t\t\t\t\t\t"};
75
			"\t\t\t\t", "\t\t\t\t\t", "\t\t\t\t\t\t"};
76
 
76
 
77
	private Map<Long, List<String>> facetIDFacetValues = 
77
	private Map<Long, List<String>> facetIDFacetValues = 
78
		new HashMap<Long, List<String>>();
78
		new HashMap<Long, List<String>>();
-
 
79
 
-
 
80
	CatalogServiceClient catalogServiceClient = null;
-
 
81
	in.shop2020.model.v1.catalog.InventoryService.Client client = null;
79
	
82
	
80
	/**
83
	/**
81
	 * @param args
84
	 * @param args
82
	 * @throws Exception 
85
	 * @throws Exception 
83
	 */
86
	 */
Line 127... Line 130...
127
	}
130
	}
128
	
131
	
129
	/**
132
	/**
130
	 * 
133
	 * 
131
	 * @param categoryID
134
	 * @param categoryID
-
 
135
	 * @throws Exception 
132
	 */
136
	 */
133
	public IR(long categoryID) {
137
	public IR(long categoryID) throws Exception {
134
		this.categoryID = categoryID;
138
		this.categoryID = categoryID;
-
 
139
		catalogServiceClient = new CatalogServiceClient();
-
 
140
		client = catalogServiceClient.getClient();
135
	}
141
	}
136
	
142
	
137
	
143
	
138
	/**
144
	/**
139
	 * 
145
	 * 
Line 413... Line 419...
413
			Catalog.getInstance().getDefinitionsContainer();
419
			Catalog.getInstance().getDefinitionsContainer();
414
		
420
		
415
		EntityContainer ents = 
421
		EntityContainer ents = 
416
			Catalog.getInstance().getEntityContainer();
422
			Catalog.getInstance().getEntityContainer();
417
		
423
		
-
 
424
 
-
 
425
		
418
		// <IRData>
426
		// <IRData>
419
		List<String> entityXMLSnippets = new ArrayList<String>();
427
		List<String> entityXMLSnippets = new ArrayList<String>();
420
		entityXMLSnippets.add("<IRData>");
428
		entityXMLSnippets.add("<IRData>");
421
		
429
		
422
		List<Category> categories = null;
430
		List<Category> categories = null;
Line 452... Line 460...
452
 
460
 
453
			
461
			
454
			//Modified by Rajveer, Now it will search according to each catalog item.
462
			//Modified by Rajveer, Now it will search according to each catalog item.
455
			// For each entity in catalog
463
			// For each entity in catalog
456
			
464
			
457
			CatalogServiceClient catalogServiceClient = new CatalogServiceClient();
-
 
458
			in.shop2020.model.v1.catalog.InventoryService.Client client = catalogServiceClient.getClient();
-
 
-
 
465
			
459
			List<Item> items = client.getAllItems(false);
466
			List<Item> items = client.getAllItems(false);
460
			
467
			
461
			for(Item item : items){
468
			for(Item item : items){
462
				long entityID = item.getCatalogItemId();
469
				long entityID = item.getCatalogItemId();
463
				ExpandedEntity expEntity = 
470
				ExpandedEntity expEntity = 
Line 834... Line 841...
834
 
841
 
835
		Utils.info("expEntity.getID()=" + expEntity.getID());
842
		Utils.info("expEntity.getID()=" + expEntity.getID());
836
		
843
		
837
		// to get the price from services and pass it on to fill in solr
844
		// to get the price from services and pass it on to fill in solr
838
		
845
		
839
		CatalogServiceClient catalogServiceClient = new CatalogServiceClient();
846
//		CatalogServiceClient catalogServiceClient = new CatalogServiceClient();
840
		in.shop2020.model.v1.catalog.InventoryService.Client client = catalogServiceClient.getClient();
847
//		in.shop2020.model.v1.catalog.InventoryService.Client client = catalogServiceClient.getClient();
841
		
848
		
842
		double itemPrice = 0;
849
		double itemPrice = 0;
843
		List<Item> items = client.getItemsByCatalogId(expEntity.getID());
850
		List<Item> items = client.getItemsByCatalogId(expEntity.getID());
844
		for(Item item: items){
851
		for(Item item: items){
845
			if(itemPrice == 0){
852
			if(itemPrice == 0){