changeset 1530:f1f0e9c75026

Added new artifact to be able to open existing 'new chart' projects. flys-client/trunk@3737 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 20 Jan 2012 09:25:00 +0000
parents e91f87b2524e
children 8b4688a2e25d
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/server/FLYSArtifactCreator.java flys-client/src/main/java/de/intevation/flys/client/shared/model/ChartArtifact.java
diffstat 3 files changed, 55 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Jan 19 17:05:41 2012 +0000
+++ b/flys-client/ChangeLog	Fri Jan 20 09:25:00 2012 +0000
@@ -1,3 +1,13 @@
+2012-01-20  Raimund Renkert <raimund.renkert@intevation.de>
+
+	Added new artifact to be able to open existing 'new chart' projects.
+
+	* src/main/java/de/intevation/flys/client/shared/model/ChartArtifact.java:
+	  New. Artifact for 'new chart' module.
+
+	* src/main/java/de/intevation/flys/client/server/FLYSArtifactCreator.java:
+	  Create a ChartArtifact if the artifact name equals 'new_chart'.
+
 2012-01-19  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/WQSimpleArrayPanel.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/server/FLYSArtifactCreator.java	Thu Jan 19 17:05:41 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/FLYSArtifactCreator.java	Fri Jan 20 09:25:00 2012 +0000
@@ -21,6 +21,7 @@
 import de.intevation.flys.client.shared.model.DefaultArtifact;
 import de.intevation.flys.client.shared.model.WINFOArtifact;
 import de.intevation.flys.client.shared.model.MapArtifact;
+import de.intevation.flys.client.shared.model.ChartArtifact;
 
 
 /**
@@ -129,6 +130,10 @@
             logger.debug("+++++ NEW MAP ARTIFACT.");
             return new MapArtifact(uuid, hash, background, msg);
         }
+        else if (name.length() > 0 && name.equals("new_chart")) {
+            logger.debug("+++++ NEW CHART ARTIFACT.");
+            return new ChartArtifact(uuid, hash, background, msg);
+        }
 
         return new DefaultArtifact(uuid, hash, background, msg);
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/ChartArtifact.java	Fri Jan 20 09:25:00 2012 +0000
@@ -0,0 +1,40 @@
+package de.intevation.flys.client.shared.model;
+
+import java.util.List;
+
+
+/**
+ * The Chart implementation of an Artifact.
+ *
+ * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
+ */
+public class ChartArtifact extends DefaultArtifact {
+
+    /** The name of this artifact: 'new_chart'.*/
+    public static final String NAME = "new_chart";
+
+
+    public ChartArtifact() {
+    }
+
+
+    public  ChartArtifact(String uuid, String hash) {
+        super(uuid, hash);
+    }
+
+
+    public ChartArtifact(
+        String                   uuid,
+        String                   hash,
+        boolean                  inBackground,
+        List<CalculationMessage> messages
+    ) {
+        super(uuid, hash, inBackground, messages);
+    }
+
+
+    public String getName() {
+        return NAME;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org