# HG changeset patch # User Raimund Renkert # Date 1393509338 -3600 # Node ID 4a85cc6add7fe3e1218c68b30892f299434a01c3 # Parent 9aa0bd26ce7ff8d5a7865aa4cb171c0749770237 Added list of rivers a module supports. diff -r 9aa0bd26ce7f -r 4a85cc6add7f artifacts/src/main/java/org/dive4elements/river/artifacts/model/Module.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Module.java Thu Feb 27 14:51:35 2014 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Module.java Thu Feb 27 14:55:38 2014 +0100 @@ -8,16 +8,20 @@ package org.dive4elements.river.artifacts.model; +import java.util.List; + /** * Represents a Module as is is loaded from the config */ public class Module { private String name; + List rivers; private boolean selected; - public Module(String name, boolean selected) { + public Module(String name, boolean selected, List rivers) { this.name = name; + this.rivers = rivers; this.selected = selected; } @@ -28,6 +32,10 @@ public boolean isSelected() { return this.selected; } + + public List getRivers() { + return this.rivers; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 tw=80: diff -r 9aa0bd26ce7f -r 4a85cc6add7f artifacts/src/main/java/org/dive4elements/river/artifacts/services/ModuleService.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ModuleService.java Thu Feb 27 14:51:35 2014 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ModuleService.java Thu Feb 27 14:55:38 2014 +0100 @@ -54,6 +54,11 @@ MODULE + "." + module.getName(), module.getName()); ec.addAttr(m, "localname", localname, true); + for (String river : module.getRivers()) { + Element r = ec.create("river"); + r.setAttribute("uuid", river); + m.appendChild(r); + } if (module.isSelected()) { ec.addAttr(m, "selected", "true", true); }