annotate gnv/src/main/java/de/intevation/gnv/action/ArtifactDatabaseActionBase.java @ 408:b5733f9f386b

Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state. gnv/trunk@594 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 22 Jan 2010 09:49:34 +0000
parents fccf90761825
children df78178e1180
rev   line source
4
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 /**
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 *
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3 */
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
4 package de.intevation.gnv.action;
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
6 import javax.servlet.http.HttpServletRequest;
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
7 import javax.servlet.http.HttpServletResponse;
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
8
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 import org.apache.log4j.Logger;
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10 import org.apache.struts.action.Action;
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 import org.apache.struts.action.ActionForm;
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 import org.apache.struts.action.ActionForward;
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 import org.apache.struts.action.ActionMapping;
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15 /**
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16 * @author Tim Englich <tim.englich@intevation.de>
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
17 *
4
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18 */
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19 public class ArtifactDatabaseActionBase extends Action {
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20
408
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 38
diff changeset
21 public static final String XSL_SHEET_DYNAMIC =
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 38
diff changeset
22 "WEB-INF/config/templates/describe-ui.xsl";
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 38
diff changeset
23
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 38
diff changeset
24 public static final String XSL_SHEET_STATIC =
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 38
diff changeset
25 "WEB-INF/config/templates/describe-ui-static.xsl";
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 38
diff changeset
26
8
65ff6fcfee0c Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents: 4
diff changeset
27 protected final static String SUCCSESS_FORWARD_ID = "success";
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
28 protected final static String EXCEPTION_FORWARD_ID = "success";
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
29
4
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
30 /**
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
31 * the logger, used to log exceptions and additonaly information
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 */
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
33 private static Logger log = Logger
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
34 .getLogger(ArtifactDatabaseActionBase.class);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
35
4
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36 /**
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 * Constructor
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38 */
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39 public ArtifactDatabaseActionBase() {
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
40 super();
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 }
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 /**
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
44 * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
45 * org.apache.struts.action.ActionForm,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
46 * javax.servlet.http.HttpServletRequest,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
47 * javax.servlet.http.HttpServletResponse)
4
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48 */
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 @Override
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 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
51 HttpServletRequest request,
fccf90761825 Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents: 36
diff changeset
52 HttpServletResponse response) throws Exception {
8
65ff6fcfee0c Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents: 4
diff changeset
53 log.debug("ArtifactDatabaseActionBase.execute");
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
54 ActionForward forward = mapping.findForward(SUCCSESS_FORWARD_ID);
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
55 return forward;
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
56 }
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
57
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
58 /**
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
59 * Returns the ExceptionForward for the ArtifactDatabaseActions
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
60 *
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
61 * @param mapping
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
62 * @return
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
63 */
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
64 protected ActionForward getExceptionForward(ActionMapping mapping) {
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
65 log.debug("ArtifactDatabaseActionBase.getExceptionForward");
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 8
diff changeset
66 ActionForward lForward = mapping.findForward(EXCEPTION_FORWARD_ID);
8
65ff6fcfee0c Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents: 4
diff changeset
67 return lForward;
4
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
68 }
72951b955f00 Basic Struts-Infrastructur Added
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
69 }

http://dive4elements.wald.intevation.org