comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java @ 524:ba238f917b94

The theme list information stored in the attribute of a collection is read and added in form of Themes and ThemeLists to the Collection. flys-client/trunk@2003 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 25 May 2011 13:42:04 +0000
parents e2abb6b9dc7e
children 53ad6dd2cb2b
comparison
equal deleted inserted replaced
523:0785a8ba5e6d 524:ba238f917b94
24 protected Date creation; 24 protected Date creation;
25 25
26 /** The list of artifacts that are managed by this Collection.*/ 26 /** The list of artifacts that are managed by this Collection.*/
27 protected List<CollectionItem> items; 27 protected List<CollectionItem> items;
28 28
29 protected Map<String, ThemeList> themeLists;
30
29 31
30 /** 32 /**
31 * Constructor without arguments is necessary for GWT. 33 * Constructor without arguments is necessary for GWT.
32 */ 34 */
33 public DefaultCollection() { 35 public DefaultCollection() {
38 * Creates a new DefaultCollection with a UUID. 40 * Creates a new DefaultCollection with a UUID.
39 * 41 *
40 * @param uuid The UUID. 42 * @param uuid The UUID.
41 */ 43 */
42 public DefaultCollection(String uuid) { 44 public DefaultCollection(String uuid) {
43 this.uuid = uuid; 45 this.uuid = uuid;
44 this.items = new ArrayList<CollectionItem>(); 46 this.items = new ArrayList<CollectionItem>();
47 this.themeLists = new HashMap<String, ThemeList>();
48 }
49
50
51 public DefaultCollection(String uuid, Map<String, ThemeList> themeLists) {
52 this(uuid);
53
54 this.themeLists = themeLists;
45 } 55 }
46 56
47 57
48 /** 58 /**
49 * Creates a new DefaultCollection with uuid and name. 59 * Creates a new DefaultCollection with uuid and name.
130 } 140 }
131 } 141 }
132 142
133 return modes; 143 return modes;
134 } 144 }
145
146
147 public ThemeList getThemeList(String outName) {
148 if (themeLists != null) {
149 return themeLists.get(outName);
150 }
151
152 return null;
153 }
135 } 154 }
136 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 155 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org