[PATCH 12 of 17] Load modules with supported rivers and rivers with model_uuid
Wald Commits
scm-commit at wald.intevation.org
Thu Feb 27 16:47:58 CET 2014
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1393515525 -3600
# Node ID 350a7cf09fbc00d4c2538a36e2d1672febd09881
# Parent 5811dfe228978f99295b91d6126ee6ea8edca530
Load modules with supported rivers and rivers with model_uuid.
diff -r 5811dfe22897 -r 350a7cf09fbc gwt-client/src/main/java/org/dive4elements/river/client/server/ModuleServiceImpl.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ModuleServiceImpl.java Thu Feb 27 15:11:59 2014 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ModuleServiceImpl.java Thu Feb 27 16:38:45 2014 +0100
@@ -89,9 +89,15 @@
ArtifactNamespaceContext.NAMESPACE_URI, "selected");
boolean selected = strselected == null ? false :
strselected.equalsIgnoreCase("true");
+ NodeList rivers = em.getChildNodes();
+ List<String> riverUuids = new ArrayList<String>();
+ for (int j = 0; j < rivers.getLength(); j++) {
+ Element re = (Element)rivers.item(j);
+ riverUuids.add(re.getAttribute("uuid"));
+ }
logger.debug("Found module " + name + " " + localname);
if (user == null || user.canUseFeature("module:" + name)) {
- modules.add(new DefaultModule(name, localname, selected));
+ modules.add(new DefaultModule(name, localname, selected, riverUuids));
}
}
return modules.toArray(new Module[modules.size()]);
diff -r 5811dfe22897 -r 350a7cf09fbc gwt-client/src/main/java/org/dive4elements/river/client/server/RiverInfoServiceImpl.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/RiverInfoServiceImpl.java Thu Feb 27 15:11:59 2014 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/RiverInfoServiceImpl.java Thu Feb 27 16:38:45 2014 +0100
@@ -368,6 +368,8 @@
ArtifactNamespaceContext.NAMESPACE_URI, "maxq");
String rofficial = riverresp.getAttributeNS(
ArtifactNamespaceContext.NAMESPACE_URI, "official");
+ String rmuuid = riverresp.getAttributeNS(
+ ArtifactNamespaceContext.NAMESPACE_URI, "model-uuid");
logger.debug("River is " + rname);
@@ -380,7 +382,8 @@
rwstunit,
parseDouble(rminq),
parseDouble(rmaxq),
- parseLong(rofficial)
+ parseLong(rofficial),
+ rmuuid
);
return riverinfo;
diff -r 5811dfe22897 -r 350a7cf09fbc gwt-client/src/main/java/org/dive4elements/river/client/server/RiverServiceImpl.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/RiverServiceImpl.java Thu Feb 27 15:11:59 2014 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/RiverServiceImpl.java Thu Feb 27 16:38:45 2014 +0100
@@ -93,10 +93,12 @@
String name = tmp.getAttributeNS(
ArtifactNamespaceContext.NAMESPACE_URI, "name");
+ String mUuid = tmp.getAttributeNS(
+ ArtifactNamespaceContext.NAMESPACE_URI, "modeluuid");
if (name.length() > 0
&& (user == null || user.canUseFeature("river:" + name))) {
- theRivers.add(new DefaultRiver(name));
+ theRivers.add(new DefaultRiver(name, mUuid));
}
}
More information about the Dive4elements-commits
mailing list