comparison 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
comparison
equal deleted inserted replaced
1438:432180235caf 1439:4df2d9a4b9b4
37 /** 37 /**
38 * ThemeList by outputmode name. 38 * ThemeList by outputmode name.
39 */ 39 */
40 protected Map<String, ThemeList> themeLists; 40 protected Map<String, ThemeList> themeLists;
41 41
42 /**
43 * Settings by outputmode name.
44 */
45 protected Map<String, Settings> settings;
42 46
43 /** 47 /**
44 * Constructor without arguments is necessary for GWT. 48 * Constructor without arguments is necessary for GWT.
45 */ 49 */
46 public DefaultCollection() { 50 public DefaultCollection() {
52 this.ttl = ttl; 56 this.ttl = ttl;
53 this.name = name; 57 this.name = name;
54 this.items = new ArrayList<CollectionItem>(); 58 this.items = new ArrayList<CollectionItem>();
55 this.themeLists = new HashMap<String, ThemeList>(); 59 this.themeLists = new HashMap<String, ThemeList>();
56 this.recommendations = new ArrayList<Recommendation>(); 60 this.recommendations = new ArrayList<Recommendation>();
61 this.settings = new HashMap<String, Settings>();
57 } 62 }
58 63
59 64
60 /** 65 /**
61 * Creates a new DefaultCollection with a UUID. 66 * Creates a new DefaultCollection with a UUID.
84 this(uuid, ttl, name, recommendations); 89 this(uuid, ttl, name, recommendations);
85 this.themeLists = themeLists; 90 this.themeLists = themeLists;
86 } 91 }
87 92
88 93
94 public DefaultCollection(
95 String uuid,
96 long ttl,
97 String name,
98 List<Recommendation> recommendations,
99 Map<String, ThemeList> themeLists,
100 Map<String, Settings> settings)
101 {
102 this(uuid, ttl, name, recommendations);
103 this.themeLists = themeLists;
104 this.settings = settings;
105 }
106
89 /** 107 /**
90 * Creates a new DefaultCollection with uuid and name. 108 * Creates a new DefaultCollection with uuid and name.
91 * 109 *
92 * @param uuid The identifier of this collection. 110 * @param uuid The identifier of this collection.
93 * @param name The name of this collection. 111 * @param name The name of this collection.
191 209
192 return null; 210 return null;
193 } 211 }
194 212
195 213
214 /**
215 * Returns Settings for given output name.
216 */
217 public Settings getSettings(String outName) {
218 if (settings != null) {
219 return settings.get(outName);
220 }
221
222 return null;
223 }
224
225
226 public void setSettings(Map<String, Settings> settings) {
227 this.settings = settings;
228 }
229
230
231 public void addSettings(String outname, Settings settings) {
232 this.settings.put(outname, settings);
233 }
234
235
196 /** Set the outputname to themelist map. */ 236 /** Set the outputname to themelist map. */
197 public void setThemeLists(Map<String, ThemeList> map) { 237 public void setThemeLists(Map<String, ThemeList> map) {
198 this.themeLists = map; 238 this.themeLists = map;
199 } 239 }
200 240

http://dive4elements.wald.intevation.org