Subversion Repositories SmartDukaan

Rev

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