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