diff flys-client/src/main/java/de/intevation/flys/client/server/MetaDataServiceImpl.java @ 811:8fa303586f14

Pass user id to the meta data service. flys-client/trunk@2466 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 08 Aug 2011 11:02:45 +0000
parents ba1b27b7d282
children 70b728a9f4e8
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/MetaDataServiceImpl.java	Tue Aug 02 12:57:48 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/MetaDataServiceImpl.java	Mon Aug 08 11:02:45 2011 +0000
@@ -29,8 +29,12 @@
     public static final String ERROR_NO_META_DATA_FOUND =
         "error_no_meta_data_found";
 
-    public DataCageTree getMetaData(String url, String locale, String river)
-    throws ServerException
+    public DataCageTree getMetaData(
+        String url,
+        String locale,
+        String artifactId,
+        String userId
+    ) throws ServerException
     {
         System.out.println("MetaDataService.getDistanceInfo");
 
@@ -41,11 +45,18 @@
             ArtifactNamespaceContext.NAMESPACE_URI,
             ArtifactNamespaceContext.NAMESPACE_PREFIX);
 
-        Element riverEl = ec.create("river");
 
-        riverEl.setTextContent(river);
+        if (artifactId != null) {
+            Element artifactEl = ec.create("artifact-id");
+            artifactEl.setAttribute("value", artifactId);
+            doc.appendChild(artifactEl);
+        }
 
-        doc.appendChild(riverEl);
+        if (userId != null) {
+            Element userEl = ec.create("user-id");
+            userEl.setAttribute("value", userId);
+            doc.appendChild(userEl);
+        }
 
         HttpClient client = new HttpClientImpl(url, locale);
 

http://dive4elements.wald.intevation.org