Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContext.java @ 8202:e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 12:58:17 +0200 |
parents | 744df5a03337 |
children | 9667900536b6 |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
24 * | 24 * |
25 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 25 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
26 */ | 26 */ |
27 public class RiverContext extends DefaultArtifactContext { | 27 public class RiverContext extends DefaultArtifactContext { |
28 | 28 |
29 /** The logger used in this class. */ | 29 /** The log used in this class. */ |
30 private static Logger logger = Logger.getLogger(RiverContext.class); | 30 private static Logger log = Logger.getLogger(RiverContext.class); |
31 | 31 |
32 /** The key that is used to store the StateEngine in the context. */ | 32 /** The key that is used to store the StateEngine in the context. */ |
33 public static final String ARTIFACT_KEY = | 33 public static final String ARTIFACT_KEY = |
34 "artifact"; | 34 "artifact"; |
35 | 35 |
110 } | 110 } |
111 | 111 |
112 Pair<Class<OutGenerator>, Object> pair = generators.getGenerator(name); | 112 Pair<Class<OutGenerator>, Object> pair = generators.getGenerator(name); |
113 | 113 |
114 if (pair == null) { | 114 if (pair == null) { |
115 logger.warn("No generator class found for " + name); | 115 log.warn("No generator class found for " + name); |
116 return null; | 116 return null; |
117 } | 117 } |
118 | 118 |
119 try { | 119 try { |
120 Class<OutGenerator> clazz = pair.getA(); | 120 Class<OutGenerator> clazz = pair.getA(); |
121 OutGenerator generator = clazz.newInstance(); | 121 OutGenerator generator = clazz.newInstance(); |
122 generator.setup(pair.getB()); | 122 generator.setup(pair.getB()); |
123 return generator; | 123 return generator; |
124 } | 124 } |
125 catch (InstantiationException ie) { | 125 catch (InstantiationException ie) { |
126 logger.error(ie, ie); | 126 log.error(ie, ie); |
127 } | 127 } |
128 catch (IllegalAccessException iae) { | 128 catch (IllegalAccessException iae) { |
129 logger.error(iae, iae); | 129 log.error(iae, iae); |
130 } | 130 } |
131 | 131 |
132 return null; | 132 return null; |
133 } | 133 } |
134 } | 134 } |