comparison gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactServiceImpl.java @ 8303:519023ce3500

Updated the client to build a default artifact for gauge discharge curve. * Removed code for special gauge discharge artifact * Updated GaugeListGrid in info panel to create a the new project * Updated i18n
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 22 Sep 2014 17:08:48 +0200
parents 238fc722f87a
children e3a63d9c5bb1
comparison
equal deleted inserted replaced
8302:8578babdb2c8 8303:519023ce3500
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 }
60 60
61
62 /**
63 * Create a new GaugeDischageCurveArtifact and MainValueArtifact, stuff
64 * them into a collection.
65 *
66 * @param river the river.
67 * @param gaugeref reference id of the gauge.
68 */
69 public Artifact createGaugeDischargeView(
70 Collection collection,
71 String locale,
72 String river,
73 Long gaugeRef)
74 throws ServerException
75 {
76 log.info("ArtifactServiceImpl.createGaugeDischargeCurveView");
77 String url = getServletContext().getInitParameter("server-url");
78
79 Artifact artifact = ArtifactHelper.createGaugeDischargeCurveArtifact(url,
80 locale, river, gaugeRef);
81 if (artifact == null) {
82 return null;
83 }
84 log.info("GaugeDischargeCurveArtifact created successfully");
85
86 CollectionHelper.addArtifact(collection, artifact, url, locale);
87 Artifact mainVArtifact = ArtifactHelper.createMainvalueArtifact(url,
88 locale, river, gaugeRef);
89 if (mainVArtifact == null) {
90 log.info("Failed to create MainValueArtifact");
91 return null;
92 }
93 CollectionHelper.addArtifact(collection, mainVArtifact, url, locale);
94
95 return artifact;
96 }
97
98 /**
99 * Create a new GaugeDischageCurveArtifact
100 *
101 * @param river the river
102 * @param gaugeref reference id of the gauge
103 */
104 public Artifact createGaugeDischargeCurveArtifact(
105 Collection collection,
106 String locale,
107 String river,
108 Long gaugeref)
109 throws ServerException
110 {
111 log.info("ArtifactServiceImpl.createGaugeDischargeCurveArtifact");
112 String url = getServletContext().getInitParameter("server-url");
113
114 Artifact artifact = ArtifactHelper.createGaugeDischargeCurveArtifact(url,
115 locale, river, gaugeref);
116 if (artifact == null) {
117 return null;
118 }
119 log.info("GaugeDischargeCurveArtifact created successfully");
120
121 CollectionHelper.addArtifact(collection, artifact, url, locale);
122
123 return artifact;
124 }
125
126 @Override 61 @Override
127 public Artifact createSQRelationArtifact( 62 public Artifact createSQRelationArtifact(
128 Collection collection, 63 Collection collection,
129 String locale, 64 String locale,
130 String river, 65 String river,

http://dive4elements.wald.intevation.org