Subversion Repositories SmartDukaan

Rev

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