Mercurial > dive4elements > gnv-client
annotate gnv/src/main/java/de/intevation/gnv/action/sessionmodel/SessionModel.java @ 1022:28a0628b11b0
Added license file and license header.
gnv/trunk@1258 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 02 Nov 2010 17:15:08 +0000 |
parents | d1ed5c51c0de |
children |
rev | line source |
---|---|
1022
28a0628b11b0
Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
976
diff
changeset
|
1 /* |
28a0628b11b0
Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
976
diff
changeset
|
2 * Copyright (c) 2010 by Intevation GmbH |
28a0628b11b0
Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
976
diff
changeset
|
3 * |
28a0628b11b0
Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
976
diff
changeset
|
4 * This program is free software under the LGPL (>=v2.1) |
28a0628b11b0
Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
976
diff
changeset
|
5 * Read the file LGPL.txt coming with the software for details |
28a0628b11b0
Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
976
diff
changeset
|
6 * or visit http://www.gnu.org/licenses/ if it does not exist. |
28a0628b11b0
Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
976
diff
changeset
|
7 */ |
28a0628b11b0
Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
976
diff
changeset
|
8 |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 package de.intevation.gnv.action.sessionmodel; |
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 |
954 | 11 import java.io.Serializable; |
12 import java.util.Collection; | |
13 import java.util.Locale; | |
14 | |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
15 import de.intevation.gnv.artifactdatabase.objects.ArtifactDescription; |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 import de.intevation.gnv.artifactdatabase.objects.ArtifactObject; |
164
5570d9b3282f
Implemented a better GUI-Structure for displaying the Statisticdata. issue83
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
17 import de.intevation.gnv.artifactdatabase.objects.ArtifactStatisticsSet; |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
18 import de.intevation.gnv.artifactdatabase.objects.OutputMode; |
976
d1ed5c51c0de
Checkin of changes which are necessary for the checkin of Revision 1139.
Tim Englich <tim.englich@intevation.de>
parents:
954
diff
changeset
|
19 import de.intevation.gnv.artifactdatabase.objects.map.MapService; |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 |
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 /** |
690
254f062e334b
Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
684
diff
changeset
|
22 * This interface describe basic methods to store artifacts and diagram options. |
254f062e334b
Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
684
diff
changeset
|
23 * The SessionModel is saved in the session, which keeps alive during the work. |
699
af22fa5567a6
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
690
diff
changeset
|
24 * |
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
|
25 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
681
15ac78a91d1b
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
165
diff
changeset
|
26 * |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 */ |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
28 public interface SessionModel extends Serializable { |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
29 |
954 | 30 /** |
31 * Returns all Artifactfactories which were retrieved from the | |
32 * Artifactdatabases which are connected to the Client. | |
33 * @return the artifactfactories. | |
34 */ | |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 Collection<ArtifactObject> getArtifactFactories(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
36 |
954 | 37 /** |
38 * Sets all Artifactfactories which were retieved from the Artifactdatabases | |
39 * to the SessionModel. | |
40 * @param artifactFactories the artifactfactories. | |
41 */ | |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 void setArtifacteFactories(Collection<ArtifactObject> artifactFactories); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
43 |
954 | 44 /** |
45 * Set the Artifactfactory which match to the given id to selected. | |
46 * @param artiFactFactoryId the id of the artifactfactory which should | |
47 * be selected. | |
48 */ | |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 void selectArtifactFactory(String artiFactFactoryId); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
50 |
954 | 51 /** |
52 * Returns the Artifactfactory which is selected. | |
53 * @return the artifactfactory which is selected. | |
54 */ | |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 ArtifactObject getSelectedArtifactFactory(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
56 |
954 | 57 /** |
58 * Returns the currently used artifact. | |
59 * This Artifact will retrieved from the selected artifactfactory and will | |
60 * be used to do handle the special businesslogic. | |
61 * @return the artifact which is currently used. | |
62 */ | |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
63 ArtifactObject getCurrentArtifact(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
64 |
954 | 65 /** |
66 * Sets a new Artifact as the artifact that should be used. | |
67 * @param artifact the new artifact which should be used. | |
68 */ | |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
69 void setCurrentArtifact(ArtifactObject artifact); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
70 |
954 | 71 /** |
72 * Sets the currently used diagrammoptions to the Sessionmodel. | |
73 * Diagrammoptions will be used to manipulate the look of diagramms | |
74 * and render the GUI so that the user is enabled to switch the options. | |
75 * Diagrammoptions are also used for Histogram, all Exports and WMS | |
76 * @param diagrammOptions the Options that should be used. | |
77 */ | |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
78 void setDiagrammOptions(DiagrammOptions diagrammOptions); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
79 |
954 | 80 /** |
81 * Returns the diagrammoptions that currently set to the SessionModel. | |
82 * @return the diagrammoptions that currently set to the SessionModel. | |
83 */ | |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
8
diff
changeset
|
84 DiagrammOptions getDiagrammOptions(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
85 |
954 | 86 /** |
87 * Returns the Outputmode that matches to the given name of an mode. | |
88 * Outputmodes are used to define which kind of modes are defined to | |
89 * generate an result for a given Artifact (chart, export, wms,...) | |
90 * @param name the name of the OutputMode that should be used | |
91 * @return the OutputMode that matches to the given name. | |
92 */ | |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
93 OutputMode getOutputMode(String name); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
94 |
954 | 95 /** |
96 * Returns the description to the currently used Artifact. | |
97 * The description can be used to retrieve the supported OutputModes, | |
98 * the parameters that could be feed, ... | |
99 * @return the description of the artifact which is currently used. | |
100 */ | |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
101 ArtifactDescription getArtifactDescription(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
102 |
954 | 103 /** |
104 * Reset the Model. So that it will have the status as no Artifactfactory | |
105 * was selected. | |
106 */ | |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
107 void resetModel(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
108 |
954 | 109 /** |
110 * Sets the Statistics that were retrieved from the currently used Artifact | |
111 * to the SessionModel. | |
112 * @param statistics the Statistics that should be shown in the GUI. | |
113 */ | |
164
5570d9b3282f
Implemented a better GUI-Structure for displaying the Statisticdata. issue83
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
114 void setStatistics(Collection<ArtifactStatisticsSet> statistics); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
32
diff
changeset
|
115 |
954 | 116 /** |
117 * Returns the statistics that are currently set to the SessionModel | |
118 * @return the statistics that are currently set to the SessionModel | |
119 */ | |
164
5570d9b3282f
Implemented a better GUI-Structure for displaying the Statisticdata. issue83
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
120 Collection<ArtifactStatisticsSet> getStatistics(); |
706
2659a5b1fa1e
Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
700
diff
changeset
|
121 |
954 | 122 /** |
123 * Sets the locale that should be used. | |
124 * The loacle will be used to customize the GUI for a language that matches | |
125 * to the locale or it will be used to tell the Artifactdatabase which locale | |
126 * has to be used. | |
127 * @param locale the locale that should be used. | |
128 */ | |
706
2659a5b1fa1e
Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
700
diff
changeset
|
129 void setCurrentLocale(Locale locale); |
2659a5b1fa1e
Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
700
diff
changeset
|
130 |
954 | 131 /** |
132 * Returns the currently used locale. | |
133 * @return the locale that is currently used. | |
134 */ | |
706
2659a5b1fa1e
Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
700
diff
changeset
|
135 Locale getCurrentLocale(); |
976
d1ed5c51c0de
Checkin of changes which are necessary for the checkin of Revision 1139.
Tim Englich <tim.englich@intevation.de>
parents:
954
diff
changeset
|
136 |
d1ed5c51c0de
Checkin of changes which are necessary for the checkin of Revision 1139.
Tim Englich <tim.englich@intevation.de>
parents:
954
diff
changeset
|
137 void setLocalMapService(MapService mapService); |
d1ed5c51c0de
Checkin of changes which are necessary for the checkin of Revision 1139.
Tim Englich <tim.englich@intevation.de>
parents:
954
diff
changeset
|
138 |
d1ed5c51c0de
Checkin of changes which are necessary for the checkin of Revision 1139.
Tim Englich <tim.englich@intevation.de>
parents:
954
diff
changeset
|
139 MapService getLocalMapService(); |
8
65ff6fcfee0c
Some Basic Stuff for WebProjects
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
140 } |
700
89ade245ca7a
Using unix line endings only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
699
diff
changeset
|
141 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |