changeset 120:c030895edfcb

Added method to figure out TTL of a collection. artifacts/trunk@1343 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 01 Mar 2011 16:07:25 +0000
parents 3bb121d5b0b7
children 720d65bbba13
files ChangeLog artifacts/src/main/java/de/intevation/artifacts/ArtifactCollectionFactory.java artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java
diffstat 3 files changed, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Mar 01 15:58:09 2011 +0000
+++ b/ChangeLog	Tue Mar 01 16:07:25 2011 +0000
@@ -1,3 +1,11 @@
+2011-03-01	Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+	* artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java:
+	  Typo fix.
+
+	* artifacts/src/main/java/de/intevation/artifacts/ArtifactCollectionFactory.java:
+	  Added method to figure out TTL of a collection.
+
 2011-03-01  Ingo Weinzierl <ingo@intevation.de>
 
 	* artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactCollection.java:
--- a/artifacts/src/main/java/de/intevation/artifacts/ArtifactCollectionFactory.java	Tue Mar 01 15:58:09 2011 +0000
+++ b/artifacts/src/main/java/de/intevation/artifacts/ArtifactCollectionFactory.java	Tue Mar 01 16:07:25 2011 +0000
@@ -40,6 +40,18 @@
      * @param factoryNode the ConfigurationNode of this Factory
      */
     void setup(Document config, Node factoryNode);
+
+    /**
+     * Tells how long a collection should survive if it is
+     * not touched. This is put in the factory because
+     * life time is nothing a collection should handle it self.
+     * This method is only called once directly after the
+     * artifact is created.
+     * @param artifact The artifact to be rated.
+     * @param context  The global context.
+     * @return time to live in ms. null means eternal.
+     */
+    Long timeToLiveUntouched(ArtifactCollection collection, Object context);
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
   
--- a/artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java	Tue Mar 01 15:58:09 2011 +0000
+++ b/artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java	Tue Mar 01 16:07:25 2011 +0000
@@ -52,7 +52,7 @@
     /**
      * Tells how long an artifact should survive if it is
      * not touched. This is put in the factory because
-     * life time is nothing a artifact should handle it self.
+     * life time is nothing an artifact should handle it self.
      * This method is only called once directly after the
      * artifact is created.
      * @param artifact The artifact to be rated.

http://dive4elements.wald.intevation.org