changeset 493:cef17cc90fd0

Changed some method signatures of the State interface. Use CallContext objects instead of CallMeta objects which are a subset of CallContext. gnv-artifacts/trunk@570 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 19 Jan 2010 10:58:46 +0000 (2010-01-19)
parents 79e80c289018
children 292f0c8d356c
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java gnv-artifacts/src/main/java/de/intevation/gnv/state/OutputStateBase.java gnv-artifacts/src/main/java/de/intevation/gnv/state/State.java gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/NorthSouthEastWestState.java
diffstat 6 files changed, 63 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Tue Jan 19 10:06:03 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Tue Jan 19 10:58:46 2010 +0000
@@ -1,3 +1,15 @@
+2010-01-19  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	* src/main/java/de/intevation/gnv/state/State.java,
+	  src/main/java/de/intevation/gnv/state/StateBase.java,
+	  src/main/java/de/intevation/gnv/state/profile/horizontal/NorthSouthEastWestState.java,
+	  src/main/java/de/intevation/gnv/state/OutputStateBase.java: Changed some
+	  method signatures. Use CallContext objects in some methods of the State 
+	  interface instead of CallMeta objects, which are a subset of CallContext.
+	
+	* src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java: Adapted
+	  method calls on State objects to the changes in the interface.
+
 2010-01-19  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	* src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java,
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Tue Jan 19 10:06:03 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Tue Jan 19 10:58:46 2010 +0000
@@ -177,7 +177,7 @@
                 current = next;
 
                 // 4. Initialize next Step
-                current.initialize(identifier, context.getMeta());
+                current.initialize(identifier, context);
 
                 result = createReport(
                     result, "result", "success", "Advance success"
@@ -341,7 +341,7 @@
     public Document initialize (CallContext context) {
         Document result = XMLUtils.newDocument();
         try {
-            this.current.initialize(super.identifier, context.getMeta());
+            this.current.initialize(super.identifier, context);
             result = new ArtifactXMLUtilities()
             .createSuccessReport("Initialize success",
                     XMLUtils.newDocument());
@@ -729,7 +729,7 @@
             staticNode.appendChild(staticUI);
 
             this.current.describe(
-                document, uiNode, context.getMeta(), uuid
+                document, uiNode, context, uuid
             );
         }
     }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/OutputStateBase.java	Tue Jan 19 10:06:03 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/OutputStateBase.java	Tue Jan 19 10:58:46 2010 +0000
@@ -133,13 +133,15 @@
      * @see de.intevation.gnv.state.StateBase#advance()
      */
     @Override
-    public void advance(String uuid, CallMeta callMeta)
-                                                       throws StateException {
+    public void advance(String uuid, CallContext context)
+    throws StateException
+    {
     }
 
     @Override
-    public void initialize(String uuid, CallMeta callMeta)
-                                                          throws StateException {
+    public void initialize(String uuid, CallContext context)
+    throws StateException
+    {
     }
 
     public void out(
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/State.java	Tue Jan 19 10:06:03 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/State.java	Tue Jan 19 10:58:46 2010 +0000
@@ -3,7 +3,7 @@
  */
 package de.intevation.gnv.state;
 
-import de.intevation.artifacts.CallMeta;
+import de.intevation.artifacts.CallContext;
 
 import de.intevation.gnv.state.exception.StateException;
 
@@ -28,8 +28,12 @@
 
     public String getDescription();
 
-    public void describe(Document document, Node rootNode, 
-                         CallMeta callMeta, String uuid);
+    public void describe(
+        Document    document,
+        Node        rootNode,
+        CallContext context,
+        String      uuid
+    );
 
     public void setParent(State state);
 
@@ -39,16 +43,17 @@
 
     public Map<String, InputData> inputData();
 
-    public void putInputData(Collection<InputData> inputData, 
-                             String uuid)throws StateException;
+    public void putInputData(Collection<InputData> inputData, String uuid)
+    throws StateException;
 
     public Collection<InputData> getInputData() throws StateException;
 
-    public void advance(String uuid, CallMeta callMeta)
-                                                    throws StateException;
-    public void initialize(String uuid, CallMeta callMeta)
-                                                    throws StateException;
-    
+    public void advance(String uuid, CallContext context)
+    throws StateException;
+
+    public void initialize(String uuid, CallContext context)
+    throws StateException;
+
     public void reset(String uuid);
 
     public void endOfLife(Object globalContext);
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java	Tue Jan 19 10:06:03 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java	Tue Jan 19 10:58:46 2010 +0000
@@ -7,6 +7,7 @@
 import de.intevation.artifactdatabase.XMLUtils;
 
 import de.intevation.artifacts.ArtifactNamespaceContext;
+import de.intevation.artifacts.CallContext;
 import de.intevation.artifacts.CallMeta;
 
 import de.intevation.gnv.artifacts.GNVArtifactBase;
@@ -376,12 +377,14 @@
      * @see de.intevation.gnv.state.State#advance(java.lang.String,
      *      de.intevation.artifacts.CallMeta)
      */
-    public void advance(String uuid, CallMeta callMeta)
-                                                   throws StateException {
+    public void advance(String uuid, CallContext context)
+    throws StateException
+    {
     }
     
-    public void initialize(String uuid, CallMeta callMeta)
-                                                   throws StateException {
+    public void initialize(String uuid, CallContext context)
+    throws StateException
+    {
         log.debug("StateBase.initialize");
         try {
             String[] filterValues = this
@@ -546,8 +549,14 @@
      *      org.w3c.dom.Node, de.intevation.artifacts.CallMeta,
      *      java.lang.String)
      */
-    public void describe(Document document, Node rootNode, CallMeta callMeta,String uuid) {
+    public void describe(
+        Document    document,
+        Node        rootNode,
+        CallContext context,
+        String      uuid
+    ) {
         log.debug("StateBase.describe");
+        CallMeta callMeta = context.getMeta();
 
         List<Object> descibeData = this.getDescibeData(uuid);
         if (descibeData != null) {
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/NorthSouthEastWestState.java	Tue Jan 19 10:06:03 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/NorthSouthEastWestState.java	Tue Jan 19 10:58:46 2010 +0000
@@ -3,19 +3,25 @@
  */
 package de.intevation.gnv.state.profile.horizontal;
 
-import java.util.ArrayList;
-import java.util.Collection;
+import de.intevation.artifacts.CallContext;
+import de.intevation.artifacts.CallMeta;
 
-import de.intevation.artifacts.CallMeta;
 import de.intevation.gnv.artifacts.ressource.RessourceFactory;
+
 import de.intevation.gnv.geobackend.base.Result;
+
 import de.intevation.gnv.state.StateBase;
+
 import de.intevation.gnv.state.describedata.DefaultKeyValueDescribeData;
 import de.intevation.gnv.state.describedata.KeyValueDescibeData;
 import de.intevation.gnv.state.describedata.NamedArrayList;
 import de.intevation.gnv.state.describedata.NamedCollection;
+
 import de.intevation.gnv.state.exception.StateException;
 
+import java.util.ArrayList;
+import java.util.Collection;
+
 /**
  * @author Tim Englich <tim.englich@intevation.de>
  * 
@@ -45,8 +51,10 @@
      * @see de.intevation.gnv.state.StateBase#initialize(java.lang.String, de.intevation.artifacts.CallMeta)
      */
     @Override
-    public void initialize(String uuid, CallMeta callMeta)
-                                                          throws StateException {
+    public void initialize(String uuid, CallContext context)
+    throws StateException
+    {
+        CallMeta callMeta               = context.getMeta();
         Collection<Object> describeData = this.getDescibeData(uuid);
         if (describeData == null) {
             describeData = new ArrayList<Object>();

http://dive4elements.wald.intevation.org