Mercurial > dive4elements > framework
diff artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java @ 10:e8626caac353
* Made Artifact life cycle symmetric: setup/endOfLife.
* Implement defaults for Artifact and ArtifactFactory.
* Added connection pooling from apache commons dbcp
* Made sql schema of artifact database more compatible.
* Improve example config.
* Made artifactdb start with 'mvn exec:exec'
* minor fixes.
artifacts/trunk@25 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 06 Sep 2009 12:00:56 +0000 |
parents | f95d9a449215 |
children | 251e8904d6c2 |
line wrap: on
line diff
--- a/artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java Fri Sep 04 16:06:44 2009 +0000 +++ b/artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java Sun Sep 06 12:00:56 2009 +0000 @@ -37,5 +37,17 @@ * @param factoryNode the ConfigurationNode of this Factory */ void setup(Document config, Node factoryNode); + + /** + * 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. + * 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(Artifact artifact, Object context); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: