Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Wed May 25 11:34:34 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Wed May 25 13:42:04 2011 +0000 @@ -26,6 +26,8 @@ /** The list of artifacts that are managed by this Collection.*/ protected List<CollectionItem> items; + protected Map<String, ThemeList> themeLists; + /** * Constructor without arguments is necessary for GWT. @@ -40,8 +42,16 @@ * @param uuid The UUID. */ public DefaultCollection(String uuid) { - this.uuid = uuid; - this.items = new ArrayList<CollectionItem>(); + this.uuid = uuid; + this.items = new ArrayList<CollectionItem>(); + this.themeLists = new HashMap<String, ThemeList>(); + } + + + public DefaultCollection(String uuid, Map<String, ThemeList> themeLists) { + this(uuid); + + this.themeLists = themeLists; } @@ -132,5 +142,14 @@ return modes; } + + + public ThemeList getThemeList(String outName) { + if (themeLists != null) { + return themeLists.get(outName); + } + + return null; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :