| Line 22... |
Line 22... |
| 22 |
@SuppressWarnings("serial")
|
22 |
@SuppressWarnings("serial")
|
| 23 |
public class FileDownloadServlet extends HttpServlet {
|
23 |
public class FileDownloadServlet extends HttpServlet {
|
| 24 |
|
24 |
|
| 25 |
@Override
|
25 |
@Override
|
| 26 |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
26 |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
| 27 |
CatalogServiceImpl impl = new CatalogServiceImpl();
|
27 |
long vendorId = Long.parseLong(req.getParameter("vendorId"));
|
| 28 |
long vendorId = 1; // Hotspot
|
- |
|
| 29 |
String vendorCategory = req.getParameter("vendorCategory"); // This parameter is set in ItemActions.java
|
28 |
String vendorCategory = req.getParameter("vendorCategory"); // This parameter is set in ItemActions.java
|
| 30 |
|
29 |
|
| - |
|
30 |
CatalogServiceImpl impl = new CatalogServiceImpl();
|
| 31 |
List<Item> itemList = impl.getItemsByVendorCategory(vendorCategory);
|
31 |
List<Item> itemList = impl.getItemsByVendorCategory(vendorCategory);
|
| 32 |
GWT.log("Generating master sheet for " + vendorCategory + "...Item count = " + itemList.size());
|
32 |
GWT.log("Generating master sheet for " + vendorCategory + "...Item count = " + itemList.size());
|
| 33 |
MasterSheetGenerator msg = new MasterSheetGenerator();
|
33 |
MasterSheetGenerator msg = new MasterSheetGenerator();
|
| 34 |
ByteArrayOutputStream baos = msg.generateMasterSheet(vendorId, itemList);
|
34 |
ByteArrayOutputStream baos = msg.generateMasterSheet(vendorId, itemList);
|
| 35 |
|
35 |
|