# HG changeset patch # User Sascha L. Teichmann # Date 1314023915 0 # Node ID bd56dc762e7faa45176b0a53677eb40334fd55eb # Parent 2f65c742803f56aab4bd690de3db68fe3cd29a9e Datacage: Re-added the outs parameter to the meta data service. flys-client/trunk@2524 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 2f65c742803f -r bd56dc762e7f flys-client/ChangeLog --- a/flys-client/ChangeLog Mon Aug 22 14:29:49 2011 +0000 +++ b/flys-client/ChangeLog Mon Aug 22 14:38:35 2011 +0000 @@ -1,3 +1,12 @@ +2011-08-22 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/client/server/MetaDataServiceImpl.java, + src/main/java/de/intevation/flys/client/client/services/MetaDataServiceAsync.java, + src/main/java/de/intevation/flys/client/client/services/MetaDataService.java, + src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java: + Re-added the outs parameter to the meta data service. TODO: Pass + it from the UI. + 2011-08-22 Sascha L. Teichmann * src/main/java/de/intevation/flys/client/shared/model/ToLoad.java, diff -r 2f65c742803f -r bd56dc762e7f flys-client/src/main/java/de/intevation/flys/client/client/services/MetaDataService.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/services/MetaDataService.java Mon Aug 22 14:29:49 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/services/MetaDataService.java Mon Aug 22 14:38:35 2011 +0000 @@ -12,7 +12,7 @@ { DataCageTree getMetaData( String serverUrl, String locale, - String artifactId, String userId + String artifactId, String userId, String outs ) throws ServerException; } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r 2f65c742803f -r bd56dc762e7f flys-client/src/main/java/de/intevation/flys/client/client/services/MetaDataServiceAsync.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/services/MetaDataServiceAsync.java Mon Aug 22 14:29:49 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/services/MetaDataServiceAsync.java Mon Aug 22 14:38:35 2011 +0000 @@ -6,10 +6,11 @@ public interface MetaDataServiceAsync { void getMetaData( - String serverUrl, - String locale, - String artifactId, - String userId, + String serverUrl, + String locale, + String artifactId, + String userId, + String outs, AsyncCallback cb); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r 2f65c742803f -r bd56dc762e7f flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java Mon Aug 22 14:29:49 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java Mon Aug 22 14:38:35 2011 +0000 @@ -62,6 +62,7 @@ protected Artifact artifact; protected User user; + protected String outs; protected TreeGrid treeGrid; protected Tree tree; @@ -72,8 +73,13 @@ public DatacageWindow(Artifact artifact, User user) { + this(artifact, user, null); + } + + public DatacageWindow(Artifact artifact, User user, String outs) { this.artifact = artifact; this.user = user; + this.outs = outs; setWidth(300); setHeight(500); @@ -206,6 +212,7 @@ url, locale, artifactId, userId, + outs, new AsyncCallback() { public void onFailure(Throwable caught) { GWT.log("Could not load meta data."); diff -r 2f65c742803f -r bd56dc762e7f flys-client/src/main/java/de/intevation/flys/client/server/MetaDataServiceImpl.java --- a/flys-client/src/main/java/de/intevation/flys/client/server/MetaDataServiceImpl.java Mon Aug 22 14:29:49 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/MetaDataServiceImpl.java Mon Aug 22 14:38:35 2011 +0000 @@ -29,11 +29,13 @@ public static final String ERROR_NO_META_DATA_FOUND = "error_no_meta_data_found"; + @Override public DataCageTree getMetaData( String url, String locale, String artifactId, - String userId + String userId, + String outs ) throws ServerException { System.out.println("MetaDataService.getMetaData"); @@ -59,6 +61,12 @@ meta.appendChild(userEl); } + if (outs != null) { + Element outsEl = ec.create("outs"); + outsEl.setAttribute("value", outs); + meta.appendChild(outsEl); + } + doc.appendChild(meta); HttpClient client = new HttpClientImpl(url, locale);