changeset 594:5b9b74c08bbb

Changed Method signatures because of Interfacemodifications in the Artifact-Module gnv-artifacts/trunk@650 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 01 Feb 2010 14:03:01 +0000
parents b248531fa20b
children e0d7b8a0bc42
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVProductArtifactFactory.java gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/SelectProductArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontalcrosssection/HorizontalCrossSectionMeshArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/profile/verticalcrosssection/VerticalCrossSectionMeshArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java
diffstat 9 files changed, 109 insertions(+), 101 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Sun Jan 31 21:50:15 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Mon Feb 01 14:03:01 2010 +0000
@@ -1,3 +1,19 @@
+2010-02-01  Tim Englich  <tim.englich@intevation.de>
+
+	* src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java (setup),
+	  src/main/java/de/intevation/gnv/profile/verticalcrosssection/VerticalCrossSectionMeshArtifact.java (setup), 
+	  src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java (setup),
+	  src/main/java/de/intevation/gnv/profile/horizontalcrosssection/HorizontalCrossSectionMeshArtifact.java (setup), 
+	  src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java (setup),
+	  src/main/java/de/intevation/gnv/artifacts/fis/SelectProductArtifact.java (setup),
+	  src/main/java/de/intevation/gnv/artifacts/GNVProductArtifactFactory.java (createArtifact),
+	  src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java (setup): 
+	  Changed Method signatures because of Interfacemodifications in the 
+	  Artifact-Module. Now it is possible to retrieve the XML-Document which was
+	  send by an Client during the create-Call. So it is possible to get further
+	  Informations which could be used during the livecycle of an Artifact.
+	
+
 2010-01-31  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContext.java,
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Sun Jan 31 21:50:15 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Mon Feb 01 14:03:01 2010 +0000
@@ -3,44 +3,8 @@
  */
 package de.intevation.gnv.artifacts;
 
-import de.intevation.artifactdatabase.Config;
-import de.intevation.artifactdatabase.ProxyArtifact;
-import de.intevation.artifactdatabase.XMLUtils;
-
-import de.intevation.artifacts.Artifact;
-import de.intevation.artifacts.ArtifactDatabase;
-import de.intevation.artifacts.ArtifactFactory;
-import de.intevation.artifacts.ArtifactNamespaceContext;
-import de.intevation.artifacts.CallContext;
-import de.intevation.artifacts.CallMeta;
-
-import de.intevation.gnv.artifacts.cache.CacheFactory;
-
-import de.intevation.gnv.artifacts.context.GNVArtifactContext;
-
-import de.intevation.gnv.artifacts.fis.product.Product;
-
-import de.intevation.gnv.artifacts.ressource.RessourceFactory;
-
-import de.intevation.gnv.state.DefaultInputData;
-import de.intevation.gnv.state.InputData;
-import de.intevation.gnv.state.InputValue;
-import de.intevation.gnv.state.OutputMode;
-import de.intevation.gnv.state.OutputState;
-import de.intevation.gnv.state.State;
-import de.intevation.gnv.state.StateBase;
-import de.intevation.gnv.state.StateFactory;
-
-import de.intevation.gnv.state.exception.StateException;
-
-import de.intevation.gnv.transition.Transition;
-import de.intevation.gnv.transition.TransitionFactory;
-
-import de.intevation.gnv.utils.ArtifactXMLUtilities;
-
 import java.io.IOException;
 import java.io.OutputStream;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -53,12 +17,37 @@
 import net.sf.ehcache.Cache;
 
 import org.apache.log4j.Logger;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+import de.intevation.artifactdatabase.Config;
+import de.intevation.artifactdatabase.ProxyArtifact;
+import de.intevation.artifactdatabase.XMLUtils;
+import de.intevation.artifacts.Artifact;
+import de.intevation.artifacts.ArtifactDatabase;
+import de.intevation.artifacts.ArtifactFactory;
+import de.intevation.artifacts.ArtifactNamespaceContext;
+import de.intevation.artifacts.CallContext;
+import de.intevation.artifacts.CallMeta;
+import de.intevation.gnv.artifacts.cache.CacheFactory;
+import de.intevation.gnv.artifacts.context.GNVArtifactContext;
+import de.intevation.gnv.artifacts.fis.product.Product;
+import de.intevation.gnv.artifacts.ressource.RessourceFactory;
+import de.intevation.gnv.state.DefaultInputData;
+import de.intevation.gnv.state.InputData;
+import de.intevation.gnv.state.InputValue;
+import de.intevation.gnv.state.OutputMode;
+import de.intevation.gnv.state.OutputState;
+import de.intevation.gnv.state.State;
+import de.intevation.gnv.state.StateBase;
+import de.intevation.gnv.state.StateFactory;
+import de.intevation.gnv.state.exception.StateException;
+import de.intevation.gnv.transition.Transition;
+import de.intevation.gnv.transition.TransitionFactory;
+import de.intevation.gnv.utils.ArtifactXMLUtilities;
+
 /**
  * @author Tim Englich         (tim.englich@intevation.de)
  * @author Ingo Weinzierl      (ingo.weinzierl@intevation.de)
@@ -212,7 +201,7 @@
                 GNVProductArtifactFactory fac = (GNVProductArtifactFactory)
                     db.getInternalArtifactFactory(fis);
 
-                Artifact select = fac.createArtifact(identifier, context);
+                Artifact select = fac.createArtifact(identifier, context, null);
                 context.putContextValue(ProxyArtifact.REPLACE_PROXY, select);
 
                 resetDescribeData(current, identifier, INITIAL_STATE);
@@ -451,13 +440,13 @@
     }
 
     /**
-     * @see de.intevation.artifactdatabase.DefaultArtifact#setup(java.lang.String,
-     *      java.lang.Object)
+     * @see de.intevation.artifactdatabase.DefaultArtifact#setup(java.lang.String, de.intevation.artifacts.ArtifactFactory, java.lang.Object, org.w3c.dom.Document)
      */
     @Override
-    public void setup(String identifier, ArtifactFactory factory, Object context) {
+    public void setup(String identifier, ArtifactFactory factory, 
+                      Object context,Document data) {
         log.debug("GNVArtifactBase.setup");
-        super.setup(identifier, factory, context);
+        super.setup(identifier, factory, context, data);
 
         Object localContext = context;
         if (context instanceof CallContext) {
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVProductArtifactFactory.java	Sun Jan 31 21:50:15 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVProductArtifactFactory.java	Mon Feb 01 14:03:01 2010 +0000
@@ -1,18 +1,5 @@
 package de.intevation.gnv.artifacts;
 
-import de.intevation.artifactdatabase.DefaultArtifactFactory;
-import de.intevation.artifactdatabase.ProxyArtifact;
-import de.intevation.artifactdatabase.XMLUtils;
-
-import de.intevation.artifacts.Artifact;
-import de.intevation.artifacts.ArtifactFactory;
-
-import de.intevation.gnv.artifacts.fis.SelectProductArtifact;
-
-import de.intevation.gnv.artifacts.fis.product.DefaultProduct;
-
-import de.intevation.gnv.state.DefaultInputData;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -21,11 +8,19 @@
 import javax.xml.xpath.XPathConstants;
 
 import org.apache.log4j.Logger;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+import de.intevation.artifactdatabase.DefaultArtifactFactory;
+import de.intevation.artifactdatabase.ProxyArtifact;
+import de.intevation.artifactdatabase.XMLUtils;
+import de.intevation.artifacts.Artifact;
+import de.intevation.artifacts.ArtifactFactory;
+import de.intevation.gnv.artifacts.fis.SelectProductArtifact;
+import de.intevation.gnv.artifacts.fis.product.DefaultProduct;
+import de.intevation.gnv.state.DefaultInputData;
+
 /**
  * @author Ingo Weinzierl <ingo.weinzierl@intevation.de>
  */
@@ -54,16 +49,16 @@
     }
 
     @Override
-    public Artifact createArtifact(String identifier, Object context) {
+    public Artifact createArtifact(String identifier, Object context, Document data) {
 
         // create a SelectProductArtifact for initial product selection
-        Artifact artifact = super.createArtifact(identifier, context);
+        Artifact artifact = super.createArtifact(identifier, context, data);
 
         if (artifact instanceof ProxyArtifact) {
 
             SelectProductArtifact select = new SelectProductArtifact();
             select.setProducts(products);
-            select.setup(identifier, this, context);
+            select.setup(identifier, this, context, data);
 
             ((ProxyArtifact) artifact).setProxied(select);
         }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/SelectProductArtifact.java	Sun Jan 31 21:50:15 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/SelectProductArtifact.java	Mon Feb 01 14:03:01 2010 +0000
@@ -1,37 +1,30 @@
 package de.intevation.gnv.artifacts.fis;
 
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
 import de.intevation.artifactdatabase.ProxyArtifact;
 import de.intevation.artifactdatabase.XMLUtils;
-
 import de.intevation.artifacts.Artifact;
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.artifacts.ArtifactNamespaceContext;
 import de.intevation.artifacts.CallContext;
 import de.intevation.artifacts.CallMeta;
-
 import de.intevation.gnv.artifacts.GNVArtifactBase;
 import de.intevation.gnv.artifacts.GNVDefaultArtifact;
 import de.intevation.gnv.artifacts.GNVProductArtifactFactory;
-
 import de.intevation.gnv.artifacts.fis.product.Product;
-
 import de.intevation.gnv.artifacts.ressource.RessourceFactory;
-
 import de.intevation.gnv.state.InputData;
 
-import java.io.IOException;
-import java.io.OutputStream;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
 
 /**
  * @author Ingo Weinzierl <ingo.weinzierl@intevation.de>
@@ -64,10 +57,10 @@
     public void setup(
         String          identifier,
         ArtifactFactory factory,
-        Object          context
-    ) {
-        log.debug("setup()");
-        super.setup(identifier, factory, context);
+        Object          context,
+        Document        data) {
+        log.debug("SelectProductArtifact.setup()");
+        super.setup(identifier, factory, context,data);
         this.name = factory.getName();
     }
 
@@ -170,7 +163,7 @@
             .getInternalArtifactFactory(this.name);
         factory                 = ((GNVProductArtifactFactory)factory)
             .getArtifactFactoryByName(current.getName());
-        artifact                = factory.createArtifact(uuid, context);
+        artifact                = factory.createArtifact(uuid, context, null);
 
         Document feedDocument = feedDocument(uuid, hash);
         artifact.feed(feedDocument(uuid, hash), context);
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java	Sun Jan 31 21:50:15 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java	Mon Feb 01 14:03:01 2010 +0000
@@ -4,6 +4,7 @@
 package de.intevation.gnv.profile.horizontal;
 
 import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
 
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.gnv.artifacts.GNVArtifactBase;
@@ -35,12 +36,14 @@
 
 
     /**
-     * @see de.intevation.gnv.artifacts.GNVArtifactBase#setup(java.lang.String,
-     *      de.intevation.artifacts.ArtifactFactory, java.lang.Object)
+     * @see de.intevation.gnv.artifacts.GNVArtifactBase#setup(java.lang.String, 
+     * de.intevation.artifacts.ArtifactFactory, java.lang.Object, 
+     * org.w3c.dom.Document)
      */
     @Override
-    public void setup(String identifier, ArtifactFactory factory, Object context) {
+    public void setup(String identifier, ArtifactFactory factory, 
+                      Object context, Document data) {
         log.debug("HorizontalProfileArtifact.setup");
-        super.setup(identifier, factory, context);
+        super.setup(identifier, factory, context, data);
     }
 }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontalcrosssection/HorizontalCrossSectionMeshArtifact.java	Sun Jan 31 21:50:15 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontalcrosssection/HorizontalCrossSectionMeshArtifact.java	Mon Feb 01 14:03:01 2010 +0000
@@ -4,6 +4,7 @@
 package de.intevation.gnv.profile.horizontalcrosssection;
 
 import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
 
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.gnv.artifacts.GNVArtifactBase;
@@ -34,13 +35,15 @@
     }
     
 
-    /**
-     * @see de.intevation.gnv.artifacts.GNVArtifactBase#setup(java.lang.String,
-     *      de.intevation.artifacts.ArtifactFactory, java.lang.Object)
-     */
+   /**
+    * @see de.intevation.gnv.artifacts.GNVArtifactBase#setup(java.lang.String, 
+    * de.intevation.artifacts.ArtifactFactory, java.lang.Object, 
+    * org.w3c.dom.Document)
+    */
     @Override
-    public void setup(String identifier, ArtifactFactory factory, Object context) {
+    public void setup(String identifier, ArtifactFactory factory, 
+                      Object context, Document data) {
         log.debug("HorizontalCrossSectionMeshArtifact.setup");
-        super.setup(identifier, factory, context);
+        super.setup(identifier, factory, context, data);
     }
 }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java	Sun Jan 31 21:50:15 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java	Mon Feb 01 14:03:01 2010 +0000
@@ -4,6 +4,7 @@
 package de.intevation.gnv.profile.vertical;
 
 import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
 
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.gnv.artifacts.GNVArtifactBase;
@@ -35,11 +36,13 @@
 
     /**
      * @see de.intevation.gnv.artifacts.GNVArtifactBase#setup(java.lang.String,
-     *      de.intevation.artifacts.ArtifactFactory, java.lang.Object)
+     *      de.intevation.artifacts.ArtifactFactory, java.lang.Object, 
+     *      org.w3c.dom.Document)
      */
     @Override
-    public void setup(String identifier, ArtifactFactory factory, Object context) {
+    public void setup(String identifier, ArtifactFactory factory, 
+                      Object context, Document data) {
         log.debug("VerticalProfileArtifact.setup");
-        super.setup(identifier, factory, context);
+        super.setup(identifier, factory, context, data);
     }
 }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/profile/verticalcrosssection/VerticalCrossSectionMeshArtifact.java	Sun Jan 31 21:50:15 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/profile/verticalcrosssection/VerticalCrossSectionMeshArtifact.java	Mon Feb 01 14:03:01 2010 +0000
@@ -4,6 +4,7 @@
 package de.intevation.gnv.profile.verticalcrosssection;
 
 import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
 
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.gnv.artifacts.GNVArtifactBase;
@@ -36,11 +37,13 @@
 
     /**
      * @see de.intevation.gnv.artifacts.GNVArtifactBase#setup(java.lang.String,
-     *      de.intevation.artifacts.ArtifactFactory, java.lang.Object)
+     *      de.intevation.artifacts.ArtifactFactory, java.lang.Object, 
+     *      org.w3c.dom.Document)
      */
     @Override
-    public void setup(String identifier, ArtifactFactory factory, Object context) {
+    public void setup(String identifier, ArtifactFactory factory, 
+                      Object context, Document data) {
         log.debug("VerticalCrossSectionMeshArtifact.setup");
-        super.setup(identifier, factory, context);
+        super.setup(identifier, factory, context, data);
     }
 }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java	Sun Jan 31 21:50:15 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java	Mon Feb 01 14:03:01 2010 +0000
@@ -4,6 +4,7 @@
 package de.intevation.gnv.timeseries;
 
 import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
 
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.gnv.artifacts.GNVArtifactBase;
@@ -37,12 +38,14 @@
 
     /**
      * @see de.intevation.gnv.artifacts.GNVArtifactBase#setup(java.lang.String,
-     *      de.intevation.artifacts.ArtifactFactory, java.lang.Object)
+     *      de.intevation.artifacts.ArtifactFactory, java.lang.Object 
+     *      org.w3c.dom.Document)
      */
     @Override
-    public void setup(String identifier, ArtifactFactory factory, Object context) {
+    public void setup(String identifier, ArtifactFactory factory, 
+                      Object context, Document data) {
         log.debug("TimeSeriesArtifact.setup");
-        super.setup(identifier, factory, context);
+        super.setup(identifier, factory, context, data);
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org