annotate gnv/src/main/java/de/intevation/gnv/action/DoOutputAction.java @ 684:57fa8019fbdc

Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>' gnv/trunk@858 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 29 Mar 2010 09:40:35 +0000
parents d49e8695786c
children 254f062e334b
rev   line source
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 package de.intevation.gnv.action;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2
409
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
3 import de.intevation.gnv.action.sessionmodel.SessionModel;
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
4 import de.intevation.gnv.action.sessionmodel.SessionModelFactory;
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
5
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
6 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClient;
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
7 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClientFactory;
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
8
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
9 import de.intevation.gnv.artifactdatabase.objects.DefaultInputParameter;
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
10 import de.intevation.gnv.artifactdatabase.objects.InputParameter;
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
11 import de.intevation.gnv.artifactdatabase.objects.OutputMode;
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
12 import de.intevation.gnv.artifactdatabase.objects.OutputParameter;
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
13
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14 import java.io.OutputStream;
409
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
15
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16 import java.util.ArrayList;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17 import java.util.Collection;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18 import java.util.Iterator;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20 import javax.servlet.http.HttpServletRequest;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21 import javax.servlet.http.HttpServletResponse;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
23 import org.apache.log4j.Logger;
409
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
24
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
25 import org.apache.struts.action.ActionForm;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26 import org.apache.struts.action.ActionForward;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
27 import org.apache.struts.action.ActionMapping;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
28
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29 /**
684
57fa8019fbdc Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 683
diff changeset
30 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 583
diff changeset
31 *
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 */
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 public class DoOutputAction extends ArtifactDatabaseActionBase {
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 /**
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
36 * the logger, used to log exceptions and additonaly information
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
37 */
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
38 private static Logger log = Logger.getLogger(DoOutputAction.class);
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
39
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
40 /**
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 * Constructor
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42 */
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 public DoOutputAction() {
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 super();
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45 }
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 /**
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
48 * @see de.intevation.gnv.action.ArtifactDatabaseActionBase#execute(org.apache.struts.action.ActionMapping,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
49 * org.apache.struts.action.ActionForm,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
50 * javax.servlet.http.HttpServletRequest,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
51 * javax.servlet.http.HttpServletResponse)
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
52 */
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53 @Override
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
54 public ActionForward execute(ActionMapping mapping, ActionForm form,
38
fccf90761825 Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents: 36
diff changeset
55 HttpServletRequest request,
fccf90761825 Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents: 36
diff changeset
56 HttpServletResponse response) throws Exception {
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
57 log.debug("DoOutputAction.execute");
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
58 try {
583
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
59 String target = request.getParameter("target");
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
60 String mimeType = request.getParameter("mimetype");
583
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
61 String mode = request.getParameter("mode");
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
62
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
63 log.debug("Target: " + target);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
64 log.debug("MimeType: " + mimeType);
583
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
65 log.debug("ExportMode: " + mode);
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
66
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
67 // TODO Check if is propper;
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
68
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
69 SessionModel sm = SessionModelFactory.getInstance()
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
70 .getSessionModel(request);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
71 OutputMode outputMode = sm.getOutputMode(target);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
72 if (outputMode != null && outputMode.getMimeType().equals(mimeType)) {
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
73 Collection<OutputParameter> inputParameter = outputMode
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
74 .getOutputParameters();
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
75 Collection<InputParameter> ips = null;
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
76 if (inputParameter != null) {
575
a634d5ee961d Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
77 ips = new ArrayList<InputParameter>(inputParameter.size()+1);
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
78 Iterator<OutputParameter> it = inputParameter.iterator();
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
79 while (it.hasNext()) {
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
80 String name = it.next().getName();
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
81 String[] values = request.getParameterValues(name);
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
82 InputParameter ip = new DefaultInputParameter(name,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
83 values);
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
84 ips.add(ip);
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
85 }
575
a634d5ee961d Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
86
a634d5ee961d Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
87 if (request.getParameter("bintype") != null) {
a634d5ee961d Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
88 InputParameter ip = new DefaultInputParameter(
a634d5ee961d Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
89 "bintype", request.getParameterValues("bintype"));
a634d5ee961d Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
90 ips.add(ip);
a634d5ee961d Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
91 }
30
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
92 }
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
93
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
94 ArtifactDatabaseClient adc = ArtifactDatabaseClientFactory
40
23a4f196d7d6 Adding Languagetransfer to the ArtifactDatabase to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 38
diff changeset
95 .getInstance()
23a4f196d7d6 Adding Languagetransfer to the ArtifactDatabase to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 38
diff changeset
96 .getArtifactDatabaseClient(getLocale(request));
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
97
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
98 this.setHeaders(target, mimeType, response, request);
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
99
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
100 OutputStream outputStream = response.getOutputStream();
583
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
101 adc.doOutput(
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
102 sm.getSelectedArtifactFactory(),
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
103 sm.getCurrentArtifact(),
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
104 outputStream,
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
105 target,
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
106 mode,
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
107 mimeType,
2f3d885fed09 Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
108 ips);
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
109
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
110 outputStream.flush();
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
111 outputStream.close();
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
112 } else {
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
113 if (outputMode == null) {
390
f2e2053ecf23 Removed Encodingerrors from listed Files. All Files are now UTF-8 compliant.
Tim Englich <tim.englich@intevation.de>
parents: 40
diff changeset
114 log.error("Outputmode is not supported.");
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
115 } else if (!outputMode.getMimeType().equals(mimeType)) {
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
116 log.error("MimeType " + mimeType
390
f2e2053ecf23 Removed Encodingerrors from listed Files. All Files are now UTF-8 compliant.
Tim Englich <tim.englich@intevation.de>
parents: 40
diff changeset
117 + " wis not supported.");
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
118 }
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
119 // TODO FIXME: Fehlerbehandlung
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
120 }
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
121 return super.execute(mapping, form, request, response);
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
122 } catch (Exception e) {
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
123 log.error(e, e);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
124 request.setAttribute(
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
125 CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID, e
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
126 .getMessage());
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
127 return super.getExceptionForward(mapping);
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
128 }
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
129 }
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
130
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
131 protected void setHeaders(String target, String mimeType,
38
fccf90761825 Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents: 36
diff changeset
132 HttpServletResponse response,
fccf90761825 Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents: 36
diff changeset
133 HttpServletRequest request) {
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
134 response.setHeader("Content-Type", mimeType);
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
135 }
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
136
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
137 }
409
df78178e1180 Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 390
diff changeset
138 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org