comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java @ 587:53ad6dd2cb2b

The project list displays the favorite state of a collection now. A gold star means, that a collection is a owner's favorite project and will never die. A silver star means, that the project is a common project. flys-client/trunk@2181 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 21 Jun 2011 16:22:39 +0000
parents ba238f917b94
children 14e5e51a7de4
comparison
equal deleted inserted replaced
586:e3c8e045737b 587:53ad6dd2cb2b
21 protected String name; 21 protected String name;
22 22
23 /** The creation time of this collection.*/ 23 /** The creation time of this collection.*/
24 protected Date creation; 24 protected Date creation;
25 25
26 /** The time to live of the collection. If this value is 0, it will never
27 * die.*/
28 protected long ttl;
29
26 /** The list of artifacts that are managed by this Collection.*/ 30 /** The list of artifacts that are managed by this Collection.*/
27 protected List<CollectionItem> items; 31 protected List<CollectionItem> items;
28 32
29 protected Map<String, ThemeList> themeLists; 33 protected Map<String, ThemeList> themeLists;
30 34
39 /** 43 /**
40 * Creates a new DefaultCollection with a UUID. 44 * Creates a new DefaultCollection with a UUID.
41 * 45 *
42 * @param uuid The UUID. 46 * @param uuid The UUID.
43 */ 47 */
44 public DefaultCollection(String uuid) { 48 public DefaultCollection(String uuid, long ttl) {
45 this.uuid = uuid; 49 this.uuid = uuid;
50 this.ttl = ttl;
46 this.items = new ArrayList<CollectionItem>(); 51 this.items = new ArrayList<CollectionItem>();
47 this.themeLists = new HashMap<String, ThemeList>(); 52 this.themeLists = new HashMap<String, ThemeList>();
48 } 53 }
49 54
50 55
51 public DefaultCollection(String uuid, Map<String, ThemeList> themeLists) { 56 public DefaultCollection(
52 this(uuid); 57 String uuid,
53 58 long ttl,
59 Map<String, ThemeList> themeLists)
60 {
61 this(uuid, ttl);
54 this.themeLists = themeLists; 62 this.themeLists = themeLists;
55 } 63 }
56 64
57 65
58 /** 66 /**
59 * Creates a new DefaultCollection with uuid and name. 67 * Creates a new DefaultCollection with uuid and name.
60 * 68 *
61 * @param uuid The identifier of this collection. 69 * @param uuid The identifier of this collection.
62 * @param name The name of this collection. 70 * @param name The name of this collection.
63 */ 71 */
64 public DefaultCollection(String uuid, String name) { 72 public DefaultCollection(String uuid, long ttl, String name) {
65 this(uuid); 73 this(uuid, ttl);
66 74
67 this.name = name; 75 this.name = name;
68 } 76 }
69 77
70 78
73 * 81 *
74 * @param uuid The identifier of this collection. 82 * @param uuid The identifier of this collection.
75 * @param name The name of this collection. 83 * @param name The name of this collection.
76 * @param creation The creation time. 84 * @param creation The creation time.
77 */ 85 */
78 public DefaultCollection(String uuid, String name, Date creation) { 86 public DefaultCollection(String uuid, long ttl, String name, Date creation){
79 this(uuid, name); 87 this(uuid, ttl, name);
80 88
81 this.creation = creation; 89 this.creation = creation;
82 } 90 }
83 91
84 92
92 } 100 }
93 101
94 102
95 public Date getLastAccess() { 103 public Date getLastAccess() {
96 return new Date(); 104 return new Date();
105 }
106
107
108 public long getTTL() {
109 return ttl;
97 } 110 }
98 111
99 112
100 public String getName() { 113 public String getName() {
101 return name; 114 return name;

http://dive4elements.wald.intevation.org