# HG changeset patch # User Ingo Weinzierl # Date 1301406293 0 # Node ID e2abb6b9dc7e7b869bf94229cb2d7113496cc7c3 # Parent eb54fb9f5f2c92e6e6b07c8579d9df74afb33c85 A collection provides a method to retrieve its creation time now. flys-client/trunk@1608 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r eb54fb9f5f2c -r e2abb6b9dc7e flys-client/ChangeLog --- a/flys-client/ChangeLog Tue Mar 29 12:51:09 2011 +0000 +++ b/flys-client/ChangeLog Tue Mar 29 13:44:53 2011 +0000 @@ -1,3 +1,9 @@ +2011-03-29 Ingo Weinzierl + + * src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java, + src/main/java/de/intevation/flys/client/shared/model/Collection.java: + Added methods to retrieve the creation time. + 2011-03-29 Raimund Renkert * src/main/java/de/intevation/flys/client/client/ui/MainMenu.java: Fixed code diff -r eb54fb9f5f2c -r e2abb6b9dc7e flys-client/src/main/java/de/intevation/flys/client/shared/model/Collection.java --- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/Collection.java Tue Mar 29 12:51:09 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/Collection.java Tue Mar 29 13:44:53 2011 +0000 @@ -16,6 +16,8 @@ public String getName(); + public Date getCreationTime(); + public Date getLastAccess(); public void addItem(CollectionItem item); diff -r eb54fb9f5f2c -r e2abb6b9dc7e flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java --- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Tue Mar 29 12:51:09 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Tue Mar 29 13:44:53 2011 +0000 @@ -17,6 +17,12 @@ /** The uuid of the collection. */ protected String uuid; + /** The name of the collection.*/ + protected String name; + + /** The creation time of this collection.*/ + protected Date creation; + /** The list of artifacts that are managed by this Collection.*/ protected List items; @@ -39,18 +45,50 @@ } + /** + * Creates a new DefaultCollection with uuid and name. + * + * @param uuid The identifier of this collection. + * @param name The name of this collection. + */ + public DefaultCollection(String uuid, String name) { + this(uuid); + + this.name = name; + } + + + /** + * Creates a new DefaultCollection with uuid and name. + * + * @param uuid The identifier of this collection. + * @param name The name of this collection. + * @param creation The creation time. + */ + public DefaultCollection(String uuid, String name, Date creation) { + this(uuid, name); + + this.creation = creation; + } + + public String identifier() { return uuid; } + public Date getCreationTime() { + return creation; + } + + public Date getLastAccess() { return new Date(); } public String getName() { - return uuid; + return name; }