comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/Module.java @ 8870:c26fb37899ca

Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui. Also using now the localization info from the server instead of localizing the modules again on the client side.
author gernotbelger
date Wed, 07 Feb 2018 11:59:13 +0100
parents 4a85cc6add7f
children
comparison
equal deleted inserted replaced
8869:20b85ea3b524 8870:c26fb37899ca
13 /** 13 /**
14 * Represents a Module as is is loaded from the config 14 * Represents a Module as is is loaded from the config
15 */ 15 */
16 public class Module { 16 public class Module {
17 17
18 private String name; 18 private final String name;
19 List<String> rivers;
20 private boolean selected;
21 19
22 public Module(String name, boolean selected, List<String> rivers) { 20 /**
21 * Defines an (optional) group name for a module. Modules with the same group name are considered to be in the same group
22 * This can be uised to group modules in the front-end
23 */
24 private final String group;
25
26 private final boolean selected;
27
28 private final List<String> rivers;
29
30 public Module(final String name, final boolean selected, final String group, final List<String> rivers) {
23 this.name = name; 31 this.name = name;
32 this.group = group;
24 this.rivers = rivers; 33 this.rivers = rivers;
25 this.selected = selected; 34 this.selected = selected;
26 } 35 }
27 36
28 public String getName() { 37 public String getName() {
30 } 39 }
31 40
32 public boolean isSelected() { 41 public boolean isSelected() {
33 return this.selected; 42 return this.selected;
34 } 43 }
44
45 public String getGroup() {
46 return this.group;
47 }
35 48
36 public List<String> getRivers() { 49 public List<String> getRivers() {
37 return this.rivers; 50 return this.rivers;
38 } 51 }
39 } 52 }

http://dive4elements.wald.intevation.org