Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactCollection.java @ 281:942a54670a72
Made the TTL of a Collection retrievable via getter method.
artifacts/trunk@2174 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 21 Jun 2011 10:57:03 +0000 |
parents | d9a99b28a847 |
children | ec5c7e54cae1 |
comparison
equal
deleted
inserted
replaced
280:7fbe674d758a | 281:942a54670a72 |
---|---|
73 protected Map<String, Document> attributes; | 73 protected Map<String, Document> attributes; |
74 | 74 |
75 /** The creation time of this collection.*/ | 75 /** The creation time of this collection.*/ |
76 protected Date creationTime; | 76 protected Date creationTime; |
77 | 77 |
78 protected long ttl; | |
79 | |
78 | 80 |
79 /** | 81 /** |
80 * Default constructor. | 82 * Default constructor. |
81 */ | 83 */ |
82 public DefaultArtifactCollection() { | 84 public DefaultArtifactCollection() { |
94 */ | 96 */ |
95 public void setup( | 97 public void setup( |
96 String identifier, | 98 String identifier, |
97 String name, | 99 String name, |
98 Date creationTime, | 100 Date creationTime, |
101 long ttl, | |
99 ArtifactCollectionFactory factory, | 102 ArtifactCollectionFactory factory, |
100 Object context, | 103 Object context, |
101 Document data) | 104 Document data) |
102 { | 105 { |
103 logger.debug("DefaultArtifactCollection.setup: " + identifier); | 106 logger.debug("DefaultArtifactCollection.setup: " + identifier); |
106 attributes = new HashMap<String, Document>(); | 109 attributes = new HashMap<String, Document>(); |
107 | 110 |
108 setIdentifier(identifier); | 111 setIdentifier(identifier); |
109 setName(name); | 112 setName(name); |
110 setCreationTime(creationTime); | 113 setCreationTime(creationTime); |
114 setTTL(ttl); | |
111 setAttribute(data); | 115 setAttribute(data); |
112 } | 116 } |
113 | 117 |
114 | 118 |
115 public Document describe(CallContext context) { | 119 public Document describe(CallContext context) { |
187 * | 191 * |
188 * @param creationTime The new creation time. | 192 * @param creationTime The new creation time. |
189 */ | 193 */ |
190 public void setCreationTime(Date creationTime) { | 194 public void setCreationTime(Date creationTime) { |
191 this.creationTime = creationTime; | 195 this.creationTime = creationTime; |
196 } | |
197 | |
198 | |
199 public long getTTL() { | |
200 return ttl; | |
201 } | |
202 | |
203 | |
204 public void setTTL(long ttl) { | |
205 this.ttl = ttl; | |
192 } | 206 } |
193 | 207 |
194 | 208 |
195 /** | 209 /** |
196 * Returns the attribute of the collection. | 210 * Returns the attribute of the collection. |