changeset 9:a5a279a0ee35

Laid tracks for artifacts being removed from artifact database. artifacts/trunk@24 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 04 Sep 2009 16:06:44 +0000
parents d9aab2df8543
children e8626caac353
files Changelog artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java artifacts/src/main/java/de/intevation/artifacts/Artifact.java
diffstat 3 files changed, 27 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Changelog	Fri Sep 04 15:20:28 2009 +0000
+++ b/Changelog	Fri Sep 04 16:06:44 2009 +0000
@@ -1,13 +1,21 @@
-2009-09-04  Tim Englich  <tim.englich@intevation.de>
+2009-09-04	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
-    * src/main/java/de/intevation/artifactdatabase/FactoryBootstrap.java (loa,
-    * src/main/java/de/intevation/artifacts/ArtifactFactory.java (setup):
-     New Parameter for Setop to put the ArtifactFactoryNode into the setup routine.
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java (getNodeXPath):
+	New method to get a single node from configuration.
 
-2009-09-04  Tim Englich <tim.englich@intevation.de>  <Tim Englich <tim.englich@intevation.de>@nomia>
+	* artifacts/src/main/java/de/intevation/artifacts/Artifact.java (endOfLife):
+	New method called when artifact is going to be removed from artifact data base.
 
-    * pom.xml: Edited
-    Buildplugins for Maven-Compiler and Maven-Eclipse Plugin integrated.
+2009-09-04	Tim Englich	<tim.englich@intevation.de>
+
+	* src/main/java/de/intevation/artifactdatabase/FactoryBootstrap.java (loa,
+	* src/main/java/de/intevation/artifacts/ArtifactFactory.java (setup):
+	New Parameter for Setop to put the ArtifactFactoryNode into the setup routine.
+
+2009-09-04	Tim Englich	<tim.englich@intevation.de>
+
+	* pom.xml: Edited
+	Buildplugins for Maven-Compiler and Maven-Eclipse Plugin integrated.
 
 2009-09-04	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
@@ -36,7 +44,6 @@
 
 	* TODO: Added remark to add logging to artifact database.
 
->>>>>>> .r20
 2009-09-04	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* artifacts/src/main/java/de/intevation/artifacts/ArtifactContextFactory.java:
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java	Fri Sep 04 15:20:28 2009 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java	Fri Sep 04 16:06:44 2009 +0000
@@ -5,6 +5,7 @@
 
 import org.w3c.dom.Document;
 import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
 
 import org.xml.sax.SAXException;
 
@@ -103,6 +104,10 @@
     public static final NodeList getNodeSetXPath(String query) {
         return (NodeList)getXPath(query, XPathConstants.NODESET);
     }
+
+    public static final Node getNodeXPath(String query) {
+        return (Node)getXPath(query, XPathConstants.NODE);
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
 
--- a/artifacts/src/main/java/de/intevation/artifacts/Artifact.java	Fri Sep 04 15:20:28 2009 +0000
+++ b/artifacts/src/main/java/de/intevation/artifacts/Artifact.java	Fri Sep 04 16:06:44 2009 +0000
@@ -70,5 +70,12 @@
      * @return a byte representation of the output.
      */
     public byte [] out(Document format, Object context);
+
+    /**
+     * Called from artifact database when an artifact is
+     * going to be removed from system.
+     * @param context The global context of the runtime system.
+     */
+    public void endOfLife(Object context);
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org