Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java @ 1439:4df2d9a4b9b4
Added interfaces and container for output settings.
Added settings container to collection.
Extract settings from describe collection document.
flys-client/trunk@3420 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 15 Dec 2011 08:29:04 +0000 |
parents | f6fbfdc813f0 |
children | c899a7ffdc8f |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Tue Dec 13 13:24:43 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Thu Dec 15 08:29:04 2011 +0000 @@ -39,6 +39,10 @@ */ protected Map<String, ThemeList> themeLists; + /** + * Settings by outputmode name. + */ + protected Map<String, Settings> settings; /** * Constructor without arguments is necessary for GWT. @@ -54,6 +58,7 @@ this.items = new ArrayList<CollectionItem>(); this.themeLists = new HashMap<String, ThemeList>(); this.recommendations = new ArrayList<Recommendation>(); + this.settings = new HashMap<String, Settings>(); } @@ -86,6 +91,19 @@ } + public DefaultCollection( + String uuid, + long ttl, + String name, + List<Recommendation> recommendations, + Map<String, ThemeList> themeLists, + Map<String, Settings> settings) + { + this(uuid, ttl, name, recommendations); + this.themeLists = themeLists; + this.settings = settings; + } + /** * Creates a new DefaultCollection with uuid and name. * @@ -193,6 +211,28 @@ } + /** + * Returns Settings for given output name. + */ + public Settings getSettings(String outName) { + if (settings != null) { + return settings.get(outName); + } + + return null; + } + + + public void setSettings(Map<String, Settings> settings) { + this.settings = settings; + } + + + public void addSettings(String outname, Settings settings) { + this.settings.put(outname, settings); + } + + /** Set the outputname to themelist map. */ public void setThemeLists(Map<String, ThemeList> map) { this.themeLists = map;