Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/server/ExportServiceImpl.java @ 8203:238fc722f87a
sed 's/logger/log/g' src/**/*.java
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 13:19:22 +0200 |
parents | e469d9939a52 |
children | 5e38e2924c07 |
comparison
equal
deleted
inserted
replaced
8202:e4606eae8ea5 | 8203:238fc722f87a |
---|---|
37 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 37 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
38 */ | 38 */ |
39 public class ExportServiceImpl | 39 public class ExportServiceImpl |
40 extends HttpServlet | 40 extends HttpServlet |
41 { | 41 { |
42 private static final Logger logger = | 42 private static final Logger log = |
43 Logger.getLogger(ExportServiceImpl.class); | 43 Logger.getLogger(ExportServiceImpl.class); |
44 | 44 |
45 | 45 |
46 public void doGet(HttpServletRequest req, HttpServletResponse resp) { | 46 public void doGet(HttpServletRequest req, HttpServletResponse resp) { |
47 logger.info("ExportServiceImpl.doGet"); | 47 log.info("ExportServiceImpl.doGet"); |
48 | 48 |
49 try { | 49 try { |
50 final OutputStream out = resp.getOutputStream(); | 50 final OutputStream out = resp.getOutputStream(); |
51 | 51 |
52 String url = getServletContext().getInitParameter("server-url"); | 52 String url = getServletContext().getInitParameter("server-url"); |
59 String fn = name + "." + type; | 59 String fn = name + "." + type; |
60 final String enc = req.getParameter("encoding"); | 60 final String enc = req.getParameter("encoding"); |
61 | 61 |
62 resp.setHeader("Content-Disposition", "attachment;filename=" + fn); | 62 resp.setHeader("Content-Disposition", "attachment;filename=" + fn); |
63 | 63 |
64 if (logger.isDebugEnabled()) { | 64 if (log.isDebugEnabled()) { |
65 logger.debug("Request " + type + " export."); | 65 log.debug("Request " + type + " export."); |
66 } | 66 } |
67 | 67 |
68 Document attr = null; | 68 Document attr = null; |
69 if (km != null && km.length() > 0) { | 69 if (km != null && km.length() > 0) { |
70 attr = XMLUtils.newDocument(); | 70 attr = XMLUtils.newDocument(); |
99 client.collectionOut(request, uuid, mode, out); | 99 client.collectionOut(request, uuid, mode, out); |
100 out.flush(); | 100 out.flush(); |
101 } | 101 } |
102 } | 102 } |
103 catch (IOException ioe) { | 103 catch (IOException ioe) { |
104 logger.error(ioe, ioe); | 104 log.error(ioe, ioe); |
105 } | 105 } |
106 } | 106 } |
107 } | 107 } |
108 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 108 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |