Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/ArtifactServiceImpl.java @ 3865:436eec3be6ff
Allow to create a discharge curve from a gauge info
This is only a draft yet.
flys-client/trunk@5639 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 08:57:48 +0000 |
parents | fba76f4afca9 |
children | b660090b417d |
comparison
equal
deleted
inserted
replaced
3864:c434dd2e84cf | 3865:436eec3be6ff |
---|---|
6 | 6 |
7 import de.intevation.flys.client.shared.exceptions.ServerException; | 7 import de.intevation.flys.client.shared.exceptions.ServerException; |
8 import de.intevation.flys.client.shared.model.Artifact; | 8 import de.intevation.flys.client.shared.model.Artifact; |
9 import de.intevation.flys.client.client.services.ArtifactService; | 9 import de.intevation.flys.client.client.services.ArtifactService; |
10 | 10 |
11 import de.intevation.flys.client.shared.model.Collection; | |
11 import de.intevation.flys.client.shared.model.Recommendation; | 12 import de.intevation.flys.client.shared.model.Recommendation; |
12 | 13 |
13 /** | 14 /** |
14 * This interface provides artifact specific services as CREATE, DESCRIBE, FEED, | 15 * This interface provides artifact specific services as CREATE, DESCRIBE, FEED, |
15 * ADVANCE and OUT. | 16 * ADVANCE and OUT. |
46 | 47 |
47 String url = getServletContext().getInitParameter("server-url"); | 48 String url = getServletContext().getInitParameter("server-url"); |
48 | 49 |
49 return ArtifactHelper.createArtifact(url, locale, factory, recom); | 50 return ArtifactHelper.createArtifact(url, locale, factory, recom); |
50 } | 51 } |
52 | |
53 /** | |
54 * Create a new GaugeDischageCurveArtifact | |
55 * | |
56 * @param river the river | |
57 * @param gaugeref reference id of the gauge | |
58 */ | |
59 public Artifact createGaugeDischargeCurveArtifact( | |
60 Collection collection, | |
61 String locale, | |
62 String river, | |
63 Long gaugeref) | |
64 throws ServerException | |
65 { | |
66 logger.info("ArtifactServiceImpl.createGaugeDischargeCurverArtifact"); | |
67 String url = getServletContext().getInitParameter("server-url"); | |
68 | |
69 Artifact artifact = ArtifactHelper.createGaugeDischargeCurveArtifact(url, | |
70 locale, river, gaugeref); | |
71 if (artifact == null) { | |
72 return null; | |
73 } | |
74 logger.info("GaugeDischargeCurveArtifact created successfully"); | |
75 | |
76 CollectionHelper.addArtifact(collection, artifact, url, locale); | |
77 | |
78 return artifact; | |
79 } | |
80 | |
51 } | 81 } |
52 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 82 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |