Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java @ 4689:79f11188da21
Add a Collection method to return a string to be displayed in the gui
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 17 Dec 2012 16:10:47 +0100 |
parents | bb9ce9aece70 |
children |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Mon Dec 17 15:54:30 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Mon Dec 17 16:10:47 2012 +0100 @@ -297,5 +297,16 @@ public boolean hasItems() { return items.isEmpty(); } + + /** + * Returns the name of the collection or uuid if no name is set + */ + @Override + public String getDisplayName() { + if (this.name != null) { + return this.name; + } + return this.uuid; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :