Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/CollectionRecord.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 | a13382876e5d |
children | 3acc631efdf0 |
comparison
equal
deleted
inserted
replaced
586:e3c8e045737b | 587:53ad6dd2cb2b |
---|---|
28 | 28 |
29 String name = collection.getName(); | 29 String name = collection.getName(); |
30 setName(name != null && name.length() > 0 | 30 setName(name != null && name.length() > 0 |
31 ? name | 31 ? name |
32 : collection.identifier()); | 32 : collection.identifier()); |
33 | |
34 setTTL(collection.getTTL()); | |
33 } | 35 } |
34 | 36 |
35 | 37 |
36 /** | 38 /** |
37 * Sets the creation time. | 39 * Sets the creation time. |
71 public String getName() { | 73 public String getName() { |
72 return getAttributeAsString("name"); | 74 return getAttributeAsString("name"); |
73 } | 75 } |
74 | 76 |
75 | 77 |
78 public void setTTL(long ttl) { | |
79 if (ttl == 0) { | |
80 setAttribute("ttl", "star_gold"); | |
81 } | |
82 else { | |
83 setAttribute("ttl", "star_silver"); | |
84 } | |
85 } | |
86 | |
87 | |
88 public String getTTL() { | |
89 return getAttribute("ttl"); | |
90 } | |
91 | |
92 | |
76 /** | 93 /** |
77 * Returns the collection objects itself. | 94 * Returns the collection objects itself. |
78 * | 95 * |
79 * @return the collection object. | 96 * @return the collection object. |
80 */ | 97 */ |