Subversion Repositories SmartDukaan

Rev

Rev 12523 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1961 ankur.sing 1
package in.shop2020.catalog.dashboard.client;
2
 
3
 
18150 kshitij.so 4
import in.shop2020.catalog.dashboard.shared.BulkItemPricing;
1961 ankur.sing 5
import in.shop2020.catalog.dashboard.shared.Item;
4431 phani.kuma 6
import in.shop2020.catalog.dashboard.shared.ItemInventory;
3850 chandransh 7
import in.shop2020.catalog.dashboard.shared.ItemStatus;
6530 vikram.rag 8
import in.shop2020.catalog.dashboard.shared.ItemWarehouse;
12523 amit.gupta 9
import in.shop2020.catalog.dashboard.shared.StateVat;
1961 ankur.sing 10
 
11
import java.util.List;
2066 ankur.sing 12
import java.util.Map;
1961 ankur.sing 13
 
14
import com.google.gwt.user.client.rpc.RemoteService;
15
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
16
 
17
@RemoteServiceRelativePath("catalog")
18
public interface CatalogService extends RemoteService {
2427 ankur.sing 19
 
20
    /**
21
     * Updates all parameters of an item
22
     * @param item
23
     * @return  true if update is successful. 
24
     *       <br>false if any error occurred while updating
25
     */
1992 ankur.sing 26
    boolean updateItem(Item item);
2427 ankur.sing 27
 
28
    /**
29
     * This method calls the update item on production catalog service.
30
     * It updates prices of the item. (MRP, SP, and vendor prices)
31
     * @param item
32
     * @return - String. If any error occurred, then the string contains an error message to be shown to the user
33
     * otherwise it contains the success message 
34
     */
35
    String updateItemOnProduction(Item item);
6096 amit.gupta 36
 
37
	String updateExpectedDelayOnProd(Item item);
2208 ankur.sing 38
 
3850 chandransh 39
    int getItemCountByStatus(boolean useStatus, ItemStatus itemStatus);
2427 ankur.sing 40
 
3850 chandransh 41
    List<Item> getAllItems(int start, int limit);
42
 
2427 ankur.sing 43
    /**
44
     * @return list of PHASED_OUT items.
45
     */
3850 chandransh 46
    List<Item> getAllPhasedOutItems(int start, int limit);
2427 ankur.sing 47
 
48
    /**
49
     * @return list of PAUSED items.
50
     */
3850 chandransh 51
    List<Item> getAllPausedItems(int start, int limit);
2427 ankur.sing 52
 
53
    /**
54
     * @return list of all ACTIVE items.
55
     */
3850 chandransh 56
    List<Item> getAllActiveItems(int start, int limit);
2427 ankur.sing 57
 
58
    /**
59
     * @return list of items with status IN_PROCESS
60
     */
3850 chandransh 61
    List<Item> getAllInProcessItems(int start, int limit);
2427 ankur.sing 62
 
63
    /**
64
     * @return list of items with status CONTENT_COMPLETE 
65
     */
3850 chandransh 66
    List<Item> getAllContentCompleteItems(int start, int limit);
2359 ankur.sing 67
 
2427 ankur.sing 68
    /**
69
     * @return list of items which are also best deals.
70
     */
1961 ankur.sing 71
    List<Item> getBestDeals();
2427 ankur.sing 72
 
73
    /**
74
     * @return list of items which are also best sellers.
75
     */
1961 ankur.sing 76
    List<Item> getBestSellers();
2427 ankur.sing 77
 
78
    /**
79
     * @return list of latest items.
80
     */
1961 ankur.sing 81
    List<Item> getLatestArrivals();
2427 ankur.sing 82
 
83
    /**
84
     * @return list of items flagged as risky.
85
     */
2359 ankur.sing 86
    List<Item> getRiskyItems();
2208 ankur.sing 87
 
2427 ankur.sing 88
    /**
3872 chandransh 89
     * 
90
     * @param searchTerms a list of strings
91
     * @return list of items corresponding to the given search terms
92
     */
93
    List<Item> searchItems(int start, int limit, List<String> searchTerms);
94
 
95
    /**
96
     * 
97
     * @param searchTerms
98
     * @return the number of items this search will return
99
     */
100
    int getSearchResultCount(List<String> searchTerms);
101
 
102
    /**
2427 ankur.sing 103
     * This method makes a fresh call to the service to fetch details for item Id.
104
     * It also gets the vendor pricing details and vendor key mappings
105
     * and sets them as java.util.Map in item object.
106
     * @param itemId
107
     * @return item object containing details of item corresponding to the item id.
108
     *         <br>null if any error occurs while fetching item details.
109
     */
1961 ankur.sing 110
    Item getItem(long itemId);
2066 ankur.sing 111
 
2427 ankur.sing 112
    /**
113
     * return map of all vendors with key-value pairs of vendor Id and vendor name
114
     */
2066 ankur.sing 115
    Map<Long,String> getAllVendors();
2427 ankur.sing 116
 
117
    /**
3558 rajveer 118
     * return map of all sources with key-value pairs of source Id and source name
119
     */
120
    Map<Long,String> getAllSources();
121
 
122
    /**
2427 ankur.sing 123
     * @return map of all warehouses with key-value pairs of warehouse Id and warehouse name
124
     */
2066 ankur.sing 125
    Map<Long,String> getAllWarehouses();
5118 mandeep.dh 126
 
2427 ankur.sing 127
    /**
5118 mandeep.dh 128
     * @return map of all shipping warehouses with key-value pairs of warehouse Id and warehouse name
129
     */
130
    Map<Long,String> getShippingWarehouses();
131
 
132
    /**
2427 ankur.sing 133
     * Changes the status of an item to PHASED_OUT
134
     * @param itemId
135
     */
2105 ankur.sing 136
    void phaseoutItem(long itemId);
2427 ankur.sing 137
 
138
    /**
139
     * Changes the status of an item to ACTIVE
140
     * @param itemId
141
     */
2105 ankur.sing 142
    void activateItem(long itemId);
2427 ankur.sing 143
 
144
    /**
145
     * Changes the status of an item to PAUSED
146
     * @param itemId
147
     */
2126 ankur.sing 148
    void pauseItem(long itemId);
2427 ankur.sing 149
 
150
    /**
151
     * Changes the status of an item to IN_PROCESS
152
     * @param itemId
153
     */
2126 ankur.sing 154
    void markInProcess(long itemId);
2427 ankur.sing 155
 
156
    /**
157
     * Adds a new item to catalog database.
158
     * It also adds the vendor item pricings and vendor keys.
159
     * @param item
160
     * @return Id of the newly added item
161
     */
2105 ankur.sing 162
    long addItem(Item item);
2119 ankur.sing 163
 
2427 ankur.sing 164
    /**
165
     * This method is called while adding a new item.
166
     * This method is used to check if the dashboard user is trying to add an item which exits already.
167
     * If the item already exists, then its id is shown to the user. 
168
     * @param productGroup
169
     * @param brand
170
     * @param modelNumber
171
     * @param color
172
     * @return Id of an item with the same product group, brand, model number and color if exists
173
     *     <br>else 0
174
     */
4725 phani.kuma 175
    long checkSimilarItem(String brand, String modelNumber, String modelName, String color);
2359 ankur.sing 176
 
2427 ankur.sing 177
    /**
178
     * Sets/Resets the risky flag of an item.
179
     * This method will change the flag on the staging server and then on the production server.
180
     * @return true if the flag is changed successfully
181
     * <br> false if any error occurred while changing risky flag on staging and production
182
     */
2359 ankur.sing 183
    boolean changeItemRiskyFlag(long itemId, boolean risky);
4423 phani.kuma 184
 
185
    boolean deleteSimilarItem(long itemId, long catalogItemId);
186
 
187
	Item addSimilarItem(long itemId, long catalogItemId);
4431 phani.kuma 188
 
189
	Map<Long, ItemInventory> getProdItemInventory(long itemId);
4649 phani.kuma 190
 
191
	boolean addAuthorizationLog(long itemId, String username, String message);
192
 
193
	Map<String, String> getConfigdataforPriceCompare();
4957 phani.kuma 194
 
195
	List<String> getAllCategories();
12523 amit.gupta 196
 
197
	Map<Long, String> getAllCategoriesMap();
4957 phani.kuma 198
 
199
	List<String> getAllBrands();
5504 phani.kuma 200
 
5516 phani.kuma 201
	boolean deleteVoucher(Long catalogItemId, Long voucherTypeValue);
5504 phani.kuma 202
 
5516 phani.kuma 203
	boolean addVoucher(Long catalogItemId, Long voucherTypeValue, long voucherAmount);
5504 phani.kuma 204
 
5516 phani.kuma 205
	Map<Long, String> getvoucherTypes();
5586 phani.kuma 206
 
207
	boolean getConfigforentityIdMandatory();
208
 
209
	boolean checkEntityId(long entityId);
6530 vikram.rag 210
 
211
	List<Item> getInventoryOutofSyncItems(int offset, int limit);
212
 
213
	int getInventoryOutofSyncItemsCount();
214
 
215
	List<Long> getMonitoredWarehouseIdsForVendors(List<Long> vendorIds);
216
 
217
	List<ItemWarehouse> getignoredInventoryUpdateItemsIdsWarehouseIds();
218
 
219
	boolean addtoIgnoredInventoryUpdateItemsIdsWarehouseIds(long itemId,
220
			long warehouseId);
221
 
222
	boolean deleteFromIgnoredInventoryUpdateItemsIdsWarehouseIds(
223
			long itemId, long warehouseId);
6838 vikram.rag 224
 
225
	Map<Long,String> getAllInsurers();
11671 vikram.rag 226
 
227
	List<Item> getPrivateDealItems(int offset,int limit);
228
 
12523 amit.gupta 229
	Map<Long, Double> getVatRates(long itemId, long categoryId);
230
 
231
	Map<Long, String> getAllStatesMap();
232
 
11671 vikram.rag 233
	int getPrivateDealItemsCount();
12523 amit.gupta 234
 
235
	boolean markPartiallyActive(long itemId, Long categoryId);
236
 
237
	boolean updateItemStateVat(long itemId, List<StateVat> svs);
18150 kshitij.so 238
 
239
	BulkItemPricing addBulkPricingForItem(BulkItemPricing bulkItemPricing);
240
 
241
	List<BulkItemPricing> getBulkPricingByItemId(long item_id);
242
 
243
	boolean deleteBulkPricingForItemById(long id);
244
 
245
	boolean deleteBulkPricingForItem(long itemId);
6530 vikram.rag 246
 
1961 ankur.sing 247
}