Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactServiceImpl.java @ 8203:238fc722f87a
sed 's/logger/log/g' src/**/*.java
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 13:19:22 +0200 |
parents | cbdf839008a7 |
children | 519023ce3500 |
comparison
equal
deleted
inserted
replaced
8202:e4606eae8ea5 | 8203:238fc722f87a |
---|---|
27 */ | 27 */ |
28 public class ArtifactServiceImpl | 28 public class ArtifactServiceImpl |
29 extends RemoteServiceServlet | 29 extends RemoteServiceServlet |
30 implements ArtifactService | 30 implements ArtifactService |
31 { | 31 { |
32 /** Private logger. */ | 32 /** Private log. */ |
33 private static final Logger logger = | 33 private static final Logger log = |
34 Logger.getLogger(ArtifactServiceImpl.class); | 34 Logger.getLogger(ArtifactServiceImpl.class); |
35 | 35 |
36 | 36 |
37 /** | 37 /** |
38 * Creates new Artifacts based on a given Recommendation and factory. | 38 * Creates new Artifacts based on a given Recommendation and factory. |
49 String factory, | 49 String factory, |
50 Recommendation recom | 50 Recommendation recom |
51 ) | 51 ) |
52 throws ServerException | 52 throws ServerException |
53 { | 53 { |
54 logger.info("ArtifactServiceImpl.create"); | 54 log.info("ArtifactServiceImpl.create"); |
55 | 55 |
56 String url = getServletContext().getInitParameter("server-url"); | 56 String url = getServletContext().getInitParameter("server-url"); |
57 | 57 |
58 return ArtifactHelper.createArtifact(url, locale, factory, recom); | 58 return ArtifactHelper.createArtifact(url, locale, factory, recom); |
59 } | 59 } |
71 String locale, | 71 String locale, |
72 String river, | 72 String river, |
73 Long gaugeRef) | 73 Long gaugeRef) |
74 throws ServerException | 74 throws ServerException |
75 { | 75 { |
76 logger.info("ArtifactServiceImpl.createGaugeDischargeCurveView"); | 76 log.info("ArtifactServiceImpl.createGaugeDischargeCurveView"); |
77 String url = getServletContext().getInitParameter("server-url"); | 77 String url = getServletContext().getInitParameter("server-url"); |
78 | 78 |
79 Artifact artifact = ArtifactHelper.createGaugeDischargeCurveArtifact(url, | 79 Artifact artifact = ArtifactHelper.createGaugeDischargeCurveArtifact(url, |
80 locale, river, gaugeRef); | 80 locale, river, gaugeRef); |
81 if (artifact == null) { | 81 if (artifact == null) { |
82 return null; | 82 return null; |
83 } | 83 } |
84 logger.info("GaugeDischargeCurveArtifact created successfully"); | 84 log.info("GaugeDischargeCurveArtifact created successfully"); |
85 | 85 |
86 CollectionHelper.addArtifact(collection, artifact, url, locale); | 86 CollectionHelper.addArtifact(collection, artifact, url, locale); |
87 Artifact mainVArtifact = ArtifactHelper.createMainvalueArtifact(url, | 87 Artifact mainVArtifact = ArtifactHelper.createMainvalueArtifact(url, |
88 locale, river, gaugeRef); | 88 locale, river, gaugeRef); |
89 if (mainVArtifact == null) { | 89 if (mainVArtifact == null) { |
90 logger.info("Failed to create MainValueArtifact"); | 90 log.info("Failed to create MainValueArtifact"); |
91 return null; | 91 return null; |
92 } | 92 } |
93 CollectionHelper.addArtifact(collection, mainVArtifact, url, locale); | 93 CollectionHelper.addArtifact(collection, mainVArtifact, url, locale); |
94 | 94 |
95 return artifact; | 95 return artifact; |
106 String locale, | 106 String locale, |
107 String river, | 107 String river, |
108 Long gaugeref) | 108 Long gaugeref) |
109 throws ServerException | 109 throws ServerException |
110 { | 110 { |
111 logger.info("ArtifactServiceImpl.createGaugeDischargeCurveArtifact"); | 111 log.info("ArtifactServiceImpl.createGaugeDischargeCurveArtifact"); |
112 String url = getServletContext().getInitParameter("server-url"); | 112 String url = getServletContext().getInitParameter("server-url"); |
113 | 113 |
114 Artifact artifact = ArtifactHelper.createGaugeDischargeCurveArtifact(url, | 114 Artifact artifact = ArtifactHelper.createGaugeDischargeCurveArtifact(url, |
115 locale, river, gaugeref); | 115 locale, river, gaugeref); |
116 if (artifact == null) { | 116 if (artifact == null) { |
117 return null; | 117 return null; |
118 } | 118 } |
119 logger.info("GaugeDischargeCurveArtifact created successfully"); | 119 log.info("GaugeDischargeCurveArtifact created successfully"); |
120 | 120 |
121 CollectionHelper.addArtifact(collection, artifact, url, locale); | 121 CollectionHelper.addArtifact(collection, artifact, url, locale); |
122 | 122 |
123 return artifact; | 123 return artifact; |
124 } | 124 } |
129 String locale, | 129 String locale, |
130 String river, | 130 String river, |
131 int measurementStation) | 131 int measurementStation) |
132 throws ServerException | 132 throws ServerException |
133 { | 133 { |
134 logger.info("ArtifactServiceImpl.createSQRelationArtifact"); | 134 log.info("ArtifactServiceImpl.createSQRelationArtifact"); |
135 String url = getServletContext().getInitParameter("server-url"); | 135 String url = getServletContext().getInitParameter("server-url"); |
136 | 136 |
137 Artifact artifact = ArtifactHelper.createSQRelationArtifact(url, | 137 Artifact artifact = ArtifactHelper.createSQRelationArtifact(url, |
138 locale, river, measurementStation); | 138 locale, river, measurementStation); |
139 if (artifact == null) { | 139 if (artifact == null) { |
140 return null; | 140 return null; |
141 } | 141 } |
142 logger.info("SQRelationArtifact created successfully"); | 142 log.info("SQRelationArtifact created successfully"); |
143 | 143 |
144 CollectionHelper.addArtifact(collection, artifact, url, locale); | 144 CollectionHelper.addArtifact(collection, artifact, url, locale); |
145 | 145 |
146 return artifact; | 146 return artifact; |
147 } | 147 } |