Mercurial > dive4elements > river
changeset 827:bd56dc762e7f
Datacage: Re-added the outs parameter to the meta data service.
flys-client/trunk@2524 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 22 Aug 2011 14:38:35 +0000 (2011-08-22) |
parents | 2f65c742803f |
children | 910b03de6857 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/services/MetaDataService.java flys-client/src/main/java/de/intevation/flys/client/client/services/MetaDataServiceAsync.java flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java flys-client/src/main/java/de/intevation/flys/client/server/MetaDataServiceImpl.java |
diffstat | 5 files changed, 31 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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 <sascha.teichmann@intevation.de> + + * 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 <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/client/shared/model/ToLoad.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 :
--- 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<DataCageTree> cb); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- 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<DataCageTree>() { public void onFailure(Throwable caught) { GWT.log("Could not load meta data.");
--- 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);