changeset 294:b530e83acf2e

Adapted the signature of Hook.execute() which now retrieves a Document as third parameter. artifacts/trunk@2333 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 14 Jul 2011 14:41:00 +0000
parents a367a0d011af
children e5bc48dc3ec3
files ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java artifacts/src/main/java/de/intevation/artifacts/Hook.java
diffstat 3 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jul 14 14:22:23 2011 +0000
+++ b/ChangeLog	Thu Jul 14 14:41:00 2011 +0000
@@ -1,3 +1,12 @@
+2011-07-14  Ingo Weinzierl <ingo@intevation.de>
+
+	* artifacts/src/main/java/de/intevation/artifacts/Hook.java: The Hook's
+	  execute() method is called with a Document now.
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java:
+	  The hooks that are called after feed() and advance() are called with the
+	  documents which are returned by those operations.
+
 2011-07-14  Ingo Weinzierl <ingo@intevation.de>
 
 	* artifacts/src/main/java/de/intevation/artifacts/GlobalContext.java: New.
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java	Thu Jul 14 14:22:23 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java	Thu Jul 14 14:41:00 2011 +0000
@@ -788,7 +788,7 @@
 
             if (postAdvanceHooks != null) {
                 for (Hook hook: postAdvanceHooks) {
-                    hook.execute(art, cc);
+                    hook.execute(art, cc, res);
                 }
             }
 
@@ -821,7 +821,7 @@
 
             if (postFeedHooks != null) {
                 for (Hook hook: postFeedHooks) {
-                    hook.execute(art, cc);
+                    hook.execute(art, cc, res);
                 }
             }
 
--- a/artifacts/src/main/java/de/intevation/artifacts/Hook.java	Thu Jul 14 14:22:23 2011 +0000
+++ b/artifacts/src/main/java/de/intevation/artifacts/Hook.java	Thu Jul 14 14:41:00 2011 +0000
@@ -1,5 +1,6 @@
 package de.intevation.artifacts;
 
+import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 
 
@@ -7,6 +8,6 @@
 
     void setup(Node config);
 
-    void execute(Artifact artifact, CallContext context);
+    void execute(Artifact artifact, CallContext context, Document document);
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org