Subversion Repositories SmartDukaan

Rev

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

Rev 2359 Rev 2427
Line 9... Line 9...
9
import com.google.gwt.user.client.rpc.RemoteService;
9
import com.google.gwt.user.client.rpc.RemoteService;
10
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
10
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
11
 
11
 
12
@RemoteServiceRelativePath("catalog")
12
@RemoteServiceRelativePath("catalog")
13
public interface CatalogService extends RemoteService {
13
public interface CatalogService extends RemoteService {
-
 
14
    
-
 
15
    /**
-
 
16
     * Updates all parameters of an item
-
 
17
     * @param item
-
 
18
     * @return  true if update is successful. 
-
 
19
     *       <br>false if any error occurred while updating
-
 
20
     */
14
    boolean updateItem(Item item);
21
    boolean updateItem(Item item);
-
 
22
    
-
 
23
    /**
-
 
24
     * This method calls the update item on production catalog service.
-
 
25
     * It updates prices of the item. (MRP, SP, and vendor prices)
-
 
26
     * @param item
-
 
27
     * @return - String. If any error occurred, then the string contains an error message to be shown to the user
-
 
28
     * otherwise it contains the success message 
-
 
29
     */
15
    boolean updateItemOnProduction(Item item);
30
    String updateItemOnProduction(Item item);
16
 
31
 
-
 
32
    /**
-
 
33
     * 
-
 
34
     * @return list of all items.
-
 
35
     */
17
    List<Item> getAllItems();
36
    List<Item> getAllItems();
-
 
37
    
-
 
38
    /**
-
 
39
     * @return list of PHASED_OUT items.
-
 
40
     */
18
    List<Item> getAllPhasedOutItems();
41
    List<Item> getAllPhasedOutItems();
-
 
42
    
-
 
43
    /**
-
 
44
     * @return list of PAUSED items.
-
 
45
     */
19
    List<Item> getAllPausedItems();
46
    List<Item> getAllPausedItems();
-
 
47
    
-
 
48
    /**
-
 
49
     * @return list of all ACTIVE items.
-
 
50
     */
20
    List<Item> getAllActiveItems();
51
    List<Item> getAllActiveItems();
-
 
52
    
-
 
53
    /**
-
 
54
     * @return list of items with status IN_PROCESS
-
 
55
     */
21
    List<Item> getAllInProcessItems();
56
    List<Item> getAllInProcessItems();
-
 
57
    
-
 
58
    /**
-
 
59
     * @return list of items with status CONTENT_COMPLETE 
-
 
60
     */
22
    List<Item> getAllContentCompleteItems();
61
    List<Item> getAllContentCompleteItems();
23
    
62
    
-
 
63
    /**
-
 
64
     * @return list of items which are also best deals.
-
 
65
     */
24
    List<Item> getBestDeals();
66
    List<Item> getBestDeals();
-
 
67
    
-
 
68
    /**
-
 
69
     * @return list of items which are also best sellers.
-
 
70
     */
25
    List<Item> getBestSellers();
71
    List<Item> getBestSellers();
-
 
72
    
-
 
73
    /**
-
 
74
     * @return list of latest items.
-
 
75
     */
26
    List<Item> getLatestArrivals();
76
    List<Item> getLatestArrivals();
-
 
77
    
-
 
78
    /**
-
 
79
     * @return list of items flagged as risky.
-
 
80
     */
27
    List<Item> getRiskyItems();
81
    List<Item> getRiskyItems();
28
    
82
    
-
 
83
    /**
-
 
84
     * This method makes a fresh call to the service to fetch details for item Id.
-
 
85
     * It also gets the vendor pricing details and vendor key mappings
-
 
86
     * and sets them as java.util.Map in item object.
-
 
87
     * @param itemId
-
 
88
     * @return item object containing details of item corresponding to the item id.
-
 
89
     *         <br>null if any error occurs while fetching item details.
-
 
90
     */
29
    Item getItem(long itemId);
91
    Item getItem(long itemId);
30
    
92
    
-
 
93
    /**
-
 
94
     * return map of all vendors with key-value pairs of vendor Id and vendor name
-
 
95
     */
31
    Map<Long,String> getAllVendors();
96
    Map<Long,String> getAllVendors();
-
 
97
    
-
 
98
    /**
-
 
99
     * @return map of all warehouses with key-value pairs of warehouse Id and warehouse name
-
 
100
     */
32
    Map<Long,String> getAllWarehouses();
101
    Map<Long,String> getAllWarehouses();
33
    
102
    
-
 
103
    /**
-
 
104
     * Changes the status of an item to PHASED_OUT
-
 
105
     * @param itemId
-
 
106
     */
34
    void phaseoutItem(long itemId);
107
    void phaseoutItem(long itemId);
-
 
108
    
-
 
109
    /**
-
 
110
     * Changes the status of an item to ACTIVE
-
 
111
     * @param itemId
-
 
112
     */
35
    void activateItem(long itemId);
113
    void activateItem(long itemId);
-
 
114
    
-
 
115
    /**
-
 
116
     * Changes the status of an item to PAUSED
-
 
117
     * @param itemId
-
 
118
     */
36
    void pauseItem(long itemId);
119
    void pauseItem(long itemId);
-
 
120
    
-
 
121
    /**
-
 
122
     * Changes the status of an item to IN_PROCESS
-
 
123
     * @param itemId
-
 
124
     */
37
    void markInProcess(long itemId);
125
    void markInProcess(long itemId);
-
 
126
    
-
 
127
    /**
-
 
128
     * Adds a new item to catalog database.
-
 
129
     * It also adds the vendor item pricings and vendor keys.
-
 
130
     * @param item
-
 
131
     * @return Id of the newly added item
-
 
132
     */
38
    long addItem(Item item);
133
    long addItem(Item item);
39
    
134
    
-
 
135
    /**
-
 
136
     * This method is called while adding a new item.
-
 
137
     * This method is used to check if the dashboard user is trying to add an item which exits already.
-
 
138
     * If the item already exists, then its id is shown to the user. 
-
 
139
     * @param productGroup
-
 
140
     * @param brand
-
 
141
     * @param modelNumber
-
 
142
     * @param color
-
 
143
     * @return Id of an item with the same product group, brand, model number and color if exists
-
 
144
     *     <br>else 0
-
 
145
     */
40
    long checkSimilarItem(String productGroup, String brand, String modelNumber, String color);
146
    long checkSimilarItem(String productGroup, String brand, String modelNumber, String color);
41
    
147
    
-
 
148
    /**
-
 
149
     * Sets/Resets the risky flag of an item.
-
 
150
     * This method will change the flag on the staging server and then on the production server.
-
 
151
     * @return true if the flag is changed successfully
42
    //void uploadItems(String filename, long vendorId, String category, boolean fullUpdate, boolean dryRun, String suppliedProductGroup);
152
     * <br> false if any error occurred while changing risky flag on staging and production
43
    
153
     */
44
    boolean changeItemRiskyFlag(long itemId, boolean risky);
154
    boolean changeItemRiskyFlag(long itemId, boolean risky);
45
 
-
 
46
}
155
}