Subversion Repositories SmartDukaan

Rev

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

Rev 2942 Rev 3126
Line 3... Line 3...
3
import org.apache.log4j.Logger;
3
import org.apache.log4j.Logger;
4
 
4
 
5
import in.shop2020.config.ConfigException;
5
import in.shop2020.config.ConfigException;
6
import in.shop2020.model.v1.catalog.InventoryService.Client;
6
import in.shop2020.model.v1.catalog.InventoryService.Client;
7
import in.shop2020.model.v1.catalog.Item;
7
import in.shop2020.model.v1.catalog.Item;
8
import in.shop2020.thrift.clients.CatalogServiceClient;
8
import in.shop2020.thrift.clients.CatalogClient;
9
import in.shop2020.thrift.clients.config.ConfigClient;
9
import in.shop2020.thrift.clients.config.ConfigClient;
10
 
10
 
11
public class Utils {
11
public class Utils {
12
    private static Logger logger = Logger.getLogger(Utils.class);
12
    private static Logger logger = Logger.getLogger(Utils.class);
13
    
13
    
Line 29... Line 29...
29
		}
29
		}
30
		return exportPath;
30
		return exportPath;
31
	}
31
	}
32
	
32
	
33
	public static double getItemPrice(long itemId){
33
	public static double getItemPrice(long itemId){
34
		CatalogServiceClient catalogServiceClient = null;
34
		CatalogClient catalogServiceClient = null;
35
		Client client = null;
35
		Client client = null;
36
		Double itemPrice = 0.0;
36
		Double itemPrice = 0.0;
37
		try {
37
		try {
38
			catalogServiceClient = new CatalogServiceClient();
38
			catalogServiceClient = new CatalogClient();
39
			client = catalogServiceClient.getClient();
39
			client = catalogServiceClient.getClient();
40
			Item item = client.getItem(itemId);
40
			Item item = client.getItem(itemId);
41
			itemPrice = item.getSellingPrice();
41
			itemPrice = item.getSellingPrice();
42
			
42
			
43
		} catch(Exception e){
43
		} catch(Exception e){