Subversion Repositories SmartDukaan

Rev

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

Rev 6838 Rev 12523
Line 32... Line 32...
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_READONLY = 1, ROLE_PRODUCTION = 2;
34
    public static final int ROLE_STAGING = 0, ROLE_READONLY = 1, ROLE_PRODUCTION = 2;
35
    private static boolean entityIdMandatory = false;
35
    private static boolean entityIdMandatory = false;
36
    
36
    
37
    private static Map<Long, String> vendors, warehouses, sources, voucherType;
37
    private static Map<Long, String> vendors, warehouses, sources, voucherType, categoriesMap, stateMap;
38
    private static List<String> categories, brands;
38
    private static List<String> categories, brands;
39
    
39
    
40
    private static final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
40
    private static final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
41
    
41
    
42
    private static List<ItemWarehouse> ignoredInventoryUpdateItemsIdsWarehouseIds;
42
    private static List<ItemWarehouse> ignoredInventoryUpdateItemsIdsWarehouseIds;
Line 83... Line 83...
83
            @Override
83
            @Override
84
            public void onFailure(Throwable caught) {
84
            public void onFailure(Throwable caught) {
85
                caught.printStackTrace();
85
                caught.printStackTrace();
86
            }
86
            }
87
        });
87
        });
-
 
88
        
88
 
89
 
-
 
90
    	
-
 
91
        catalogService.getAllStatesMap(new AsyncCallback<Map<Long,String>>() {
-
 
92
            @Override
-
 
93
            public void onSuccess(Map<Long, String> result) {
-
 
94
                stateMap = result;
-
 
95
            }
-
 
96
            @Override
-
 
97
            public void onFailure(Throwable caught) {
-
 
98
                caught.printStackTrace();
-
 
99
            }
-
 
100
        });
-
 
101
        
-
 
102
        
89
        catalogService.getAllWarehouses(new AsyncCallback<Map<Long,String>>() {
103
        catalogService.getAllWarehouses(new AsyncCallback<Map<Long,String>>() {
90
            @Override
104
            @Override
91
            public void onSuccess(Map<Long, String> result) {
105
            public void onSuccess(Map<Long, String> result) {
92
                warehouses = result;
106
                warehouses = result;
93
            }
107
            }
Line 109... Line 123...
109
        });
123
        });
110
        
124
        
111
        catalogService.getAllCategories(new AsyncCallback<List<String>>() {
125
        catalogService.getAllCategories(new AsyncCallback<List<String>>() {
112
            @Override
126
            @Override
113
            public void onSuccess(List<String> result) {
127
            public void onSuccess(List<String> result) {
114
            	categories = result;
128
            	categories = result; 
-
 
129
            }
-
 
130
            @Override
-
 
131
            public void onFailure(Throwable caught) {
-
 
132
                caught.printStackTrace();
-
 
133
            }
-
 
134
        });
-
 
135
        
-
 
136
 
-
 
137
        catalogService.getAllCategoriesMap(new AsyncCallback<Map<Long, String>>() {
-
 
138
            @Override
-
 
139
            public void onSuccess(Map<Long, String> result) {
-
 
140
            	categoriesMap = result;
115
            }
141
            }
116
            @Override
142
            @Override
117
            public void onFailure(Throwable caught) {
143
            public void onFailure(Throwable caught) {
118
                caught.printStackTrace();
144
                caught.printStackTrace();
119
            }
145
            }
Line 168... Line 194...
168
 
194
 
169
    public static List<String> getAllCategories() {
195
    public static List<String> getAllCategories() {
170
        return categories;
196
        return categories;
171
    }
197
    }
172
    
198
    
-
 
199
 
-
 
200
    public static Map<Long, String> getAllCategoriesMap() {
-
 
201
        return categoriesMap;
-
 
202
    }
-
 
203
    
173
    public static List<String> getAllBrands() {
204
    public static List<String> getAllBrands() {
174
        return brands;
205
        return brands;
175
    }
206
    }
176
    
207
    
177
    public static String getVendorDesc(long id) {
208
    public static String getVendorDesc(long id) {
Line 353... Line 384...
353
	}
384
	}
354
 
385
 
355
	public static Map<Long, String> getVoucherType() {
386
	public static Map<Long, String> getVoucherType() {
356
		return voucherType;
387
		return voucherType;
357
	}
388
	}
-
 
389
	
-
 
390
	public static Map<Long, String> getStateMap() {
-
 
391
		return stateMap;
-
 
392
	}
358
}
393
}