annotate artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContext.java @ 8219:9667900536b6

Added context injector to generators.
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 08 Sep 2014 13:17:49 +0200
parents e4606eae8ea5
children 1d3d61c8f596
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5866
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5866
diff changeset
6 * documentation coming with Dive4Elements River for details.
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3630
diff changeset
9 package org.dive4elements.river.artifacts.context;
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import org.apache.log4j.Logger;
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 import org.w3c.dom.Document;
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3630
diff changeset
15 import org.dive4elements.artifactdatabase.DefaultArtifactContext;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3630
diff changeset
16 import org.dive4elements.artifacts.CallContext;
7226
8ab618dda850 Made lookup for generators a class of its own. First step to use it as a compat filter for facets, too.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7099
diff changeset
17 import org.dive4elements.river.exports.GeneratorLookup;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3630
diff changeset
18 import org.dive4elements.river.exports.OutGenerator;
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 /**
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 * This class is used to store application wide information in a global context.
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 *
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 */
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
26 public class RiverContext extends DefaultArtifactContext {
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7227
diff changeset
28 /** The log used in this class. */
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7227
diff changeset
29 private static Logger log = Logger.getLogger(RiverContext.class);
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
31 /** The key that is used to store the StateEngine in the context. */
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
32 public static final String ARTIFACT_KEY =
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
33 "artifact";
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
34
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
35 /** The key that is used to store the TransitionEngine in the context. */
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 public static final String TRANSITION_ENGINE_KEY =
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 "artifact.transition.engine";
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
39 /** The key that is used to store the StateEngine in the context. */
107
a228b39494a9 Improved the bootstrap process - the states are initialized.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 106
diff changeset
40 public static final String STATE_ENGINE_KEY =
a228b39494a9 Improved the bootstrap process - the states are initialized.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 106
diff changeset
41 "artifact.state.engine";
a228b39494a9 Improved the bootstrap process - the states are initialized.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 106
diff changeset
42
295
53c155bfde07 Added code to parse the configured OutGenerators in the global configuration and to save a map of such in the FLYSContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 107
diff changeset
43 /** The key that is used to store the Map of OutGenerator classes in the
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
44 * context. */
295
53c155bfde07 Added code to parse the configured OutGenerators in the global configuration and to save a map of such in the FLYSContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 107
diff changeset
45 public static final String OUTGENERATORS_KEY =
53c155bfde07 Added code to parse the configured OutGenerators in the global configuration and to save a map of such in the FLYSContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 107
diff changeset
46 "flys.export.outgenerators";
53c155bfde07 Added code to parse the configured OutGenerators in the global configuration and to save a map of such in the FLYSContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 107
diff changeset
47
7227
744df5a03337 Use diagram configuration and there processors to define compatible facets in loaded data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7226
diff changeset
48 public static final String FACETFILTER_KEY =
744df5a03337 Use diagram configuration and there processors to define compatible facets in loaded data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7226
diff changeset
49 "flys.export.facetfilter";
744df5a03337 Use diagram configuration and there processors to define compatible facets in loaded data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7226
diff changeset
50
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
51 /** The key that is used to store the map of themes in the context. */
341
eca7892bf8ff Added a first small theme configuration and code to read it.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 295
diff changeset
52 public static final String THEMES =
eca7892bf8ff Added a first small theme configuration and code to read it.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 295
diff changeset
53 "flys.themes.map";
eca7892bf8ff Added a first small theme configuration and code to read it.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 295
diff changeset
54
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
55 /** The key that is used to store a map of theme mappings in the context. */
345
88a669785863 Initialized the facet2theme mappings configured in themes.xml and added a function to the ThemeFactory that retrieves a theme from FLYSContext based on its name.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 341
diff changeset
56 public static final String THEME_MAPPING =
88a669785863 Initialized the facet2theme mappings configured in themes.xml and added a function to the ThemeFactory that retrieves a theme from FLYSContext based on its name.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 341
diff changeset
57 "flys.themes.mapping.map";
88a669785863 Initialized the facet2theme mappings configured in themes.xml and added a function to the ThemeFactory that retrieves a theme from FLYSContext based on its name.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 341
diff changeset
58
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
59 /** The key that is used to store a map of WMS urls for each river. */
958
ae198bef4ba0 Added configurations for river WMSe (currently for Saar, Mosel, Elbe).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 345
diff changeset
60 public static final String RIVER_WMS =
ae198bef4ba0 Added configurations for river WMSe (currently for Saar, Mosel, Elbe).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 345
diff changeset
61 "flys.floodmap.river.wms";
ae198bef4ba0 Added configurations for river WMSe (currently for Saar, Mosel, Elbe).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 345
diff changeset
62
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1821
diff changeset
63 /** The key that is used to store an instance of Scheduler in the context.*/
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1821
diff changeset
64 public static final String SCHEDULER =
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1821
diff changeset
65 "flys.wsplgen.scheduler";
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1821
diff changeset
66
3630
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 3295
diff changeset
67 /** Key to store the configured modules in the context. */
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 3295
diff changeset
68 public static final String MODULES = "flys.modules";
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 3295
diff changeset
69
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 /**
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 * The default constructor.
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73 */
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
74 public RiverContext() {
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 super();
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76 }
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 /**
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 * A constructor with a config document.
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81 */
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
82 public RiverContext(Document config) {
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 super(config);
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84 }
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
85
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
86 /**
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
87 * Returns the OutGenerator for a specified <i>type</i>.
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
88 *
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
89 * @param name The name of the output type.
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
90 * @param type Defines the type of the desired OutGenerator.
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
91 *
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
92 * @return Instance of an OutGenerator for specified <i>type</i>.
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
93 */
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
94 public static OutGenerator getOutGenerator(
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
95 CallContext context,
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
96 String name,
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
97 String type)
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
98 {
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
99
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
100 RiverContext flysContext = context instanceof RiverContext
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
101 ? (RiverContext) context
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
102 : (RiverContext) context.globalContext();
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
103
7226
8ab618dda850 Made lookup for generators a class of its own. First step to use it as a compat filter for facets, too.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7099
diff changeset
104 GeneratorLookup generators =
8ab618dda850 Made lookup for generators a class of its own. First step to use it as a compat filter for facets, too.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7099
diff changeset
105 (GeneratorLookup)flysContext.get(RiverContext.OUTGENERATORS_KEY);
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
106
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
107 if (generators == null) {
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
108 return null;
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
109 }
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
110
8219
9667900536b6 Added context injector to generators.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8202
diff changeset
111 GeneratorLookup.Item item = generators.getGenerator(name);
7037
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
112
8219
9667900536b6 Added context injector to generators.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8202
diff changeset
113 if (item == null) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7227
diff changeset
114 log.warn("No generator class found for " + name);
7037
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
115 return null;
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
116 }
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
117
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
118 try {
8219
9667900536b6 Added context injector to generators.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8202
diff changeset
119 Class<OutGenerator> clazz = item.getGenerator();
7037
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
120 OutGenerator generator = clazz.newInstance();
8219
9667900536b6 Added context injector to generators.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8202
diff changeset
121 generator.setup(item.getContext());
7037
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
122 return generator;
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
123 }
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
124 catch (InstantiationException ie) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7227
diff changeset
125 log.error(ie, ie);
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
126 }
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
127 catch (IllegalAccessException iae) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7227
diff changeset
128 log.error(iae, iae);
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
129 }
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
130
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
131 return null;
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
132 }
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
133 }
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
134 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org