Subversion Repositories SmartDukaan

Rev

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

Rev 2126 Rev 2208
Line 40... Line 40...
40
            e.printStackTrace();
40
            e.printStackTrace();
41
        }
41
        }
42
        Collections.sort(itemList, new ItemsComparator());
42
        Collections.sort(itemList, new ItemsComparator());
43
        return itemList;
43
        return itemList;
44
    }
44
    }
-
 
45
 
-
 
46
    public List<Item> getAllPhasedOutItems(){
-
 
47
        List<Item> itemList = new ArrayList<Item>();
-
 
48
        
-
 
49
        try {
-
 
50
            CatalogServiceClient catalogServiceClient = new CatalogServiceClient();
-
 
51
            InventoryService.Client catalogClient = catalogServiceClient.getClient();
-
 
52
            
-
 
53
            List<in.shop2020.model.v1.catalog.Item> thriftItems = catalogClient.getAllItemsByStatus(status.PHASED_OUT);
-
 
54
            
-
 
55
            for(in.shop2020.model.v1.catalog.Item thriftItem : thriftItems) {
-
 
56
                //List<in.shop2020.model.v1.catalog.VendorItemPricing> vip = catalogClient.getAllItemPricing(thriftItem.getId());
-
 
57
                itemList.add(getItemFromThriftItem(thriftItem, null, null));
-
 
58
            }
-
 
59
        } catch (Exception e) {
-
 
60
            e.printStackTrace();
-
 
61
        }
-
 
62
        Collections.sort(itemList, new ItemsComparator());
-
 
63
        return itemList;
-
 
64
    }
-
 
65
    
-
 
66
    public List<Item> getAllPausedItems(){
-
 
67
        List<Item> itemList = new ArrayList<Item>();
-
 
68
        
-
 
69
        try {
-
 
70
            CatalogServiceClient catalogServiceClient = new CatalogServiceClient();
-
 
71
            InventoryService.Client catalogClient = catalogServiceClient.getClient();
-
 
72
            
-
 
73
            List<in.shop2020.model.v1.catalog.Item> thriftItems = catalogClient.getAllItemsByStatus(status.PAUSED);
-
 
74
            
-
 
75
            for(in.shop2020.model.v1.catalog.Item thriftItem : thriftItems) {
-
 
76
                //List<in.shop2020.model.v1.catalog.VendorItemPricing> vip = catalogClient.getAllItemPricing(thriftItem.getId());
-
 
77
                itemList.add(getItemFromThriftItem(thriftItem, null, null));
-
 
78
            }
-
 
79
        } catch (Exception e) {
-
 
80
            e.printStackTrace();
-
 
81
        }
-
 
82
        Collections.sort(itemList, new ItemsComparator());
-
 
83
        return itemList;
-
 
84
    }
45
    
85
    
46
    public List<Item> getAllActiveItems(){
86
    public List<Item> getAllActiveItems(){
47
        List<Item> itemList = new ArrayList<Item>();
87
        List<Item> itemList = new ArrayList<Item>();
48
        
88
        
49
        try {
89
        try {