Subversion Repositories SmartDukaan

Rev

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

Rev 5118 Rev 5384
Line 31... Line 31...
31
    // role column in helper.catalogdashboarduser table. role specifies 
31
    // role column in helper.catalogdashboarduser table. role specifies 
32
    // the username-pwd pair for staging or for production.
32
    // the username-pwd pair for staging or for production.
33
    // production password is needed while updating item on production server.
33
    // production password is needed while updating item on production server.
34
    public static final int ROLE_STAGING = 0, ROLE_PRODUCTION = 1;
34
    public static final int ROLE_STAGING = 0, ROLE_PRODUCTION = 1;
35
    
35
    
36
    private static Map<Long, String> vendors, warehouses, sources, shippingWarehouses;
36
    private static Map<Long, String> vendors, warehouses, sources;
37
    private static List<String> categories, brands;
37
    private static List<String> categories, brands;
38
    
38
    
39
    private static final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
39
    private static final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
40
    
40
    
41
    static {
41
    static {
Line 48... Line 48...
48
            public void onFailure(Throwable caught) {
48
            public void onFailure(Throwable caught) {
49
                caught.printStackTrace();
49
                caught.printStackTrace();
50
            }
50
            }
51
        });
51
        });
52
 
52
 
53
        catalogService.getShippingWarehouses(new AsyncCallback<Map<Long,String>>() {
-
 
54
            @Override
-
 
55
            public void onSuccess(Map<Long, String> result) {
-
 
56
                shippingWarehouses = result;
-
 
57
            }
-
 
58
            @Override
-
 
59
            public void onFailure(Throwable caught) {
-
 
60
                caught.printStackTrace();
-
 
61
            }
-
 
62
        });
-
 
63
 
-
 
64
        catalogService.getAllWarehouses(new AsyncCallback<Map<Long,String>>() {
53
        catalogService.getAllWarehouses(new AsyncCallback<Map<Long,String>>() {
65
            @Override
54
            @Override
66
            public void onSuccess(Map<Long, String> result) {
55
            public void onSuccess(Map<Long, String> result) {
67
                warehouses = result;
56
                warehouses = result;
68
            }
57
            }
Line 117... Line 106...
117
    
106
    
118
    public static Map<Long, String> getAllWarehouses() {
107
    public static Map<Long, String> getAllWarehouses() {
119
        return warehouses;
108
        return warehouses;
120
    }
109
    }
121
 
110
 
122
    public static Map<Long, String> getAllShippingWarehouses() {
-
 
123
        return shippingWarehouses;
-
 
124
    }
-
 
125
    
-
 
126
    public static List<String> getAllCategories() {
111
    public static List<String> getAllCategories() {
127
        return categories;
112
        return categories;
128
    }
113
    }
129
    
114
    
130
    public static List<String> getAllBrands() {
115
    public static List<String> getAllBrands() {