changeset 1513:f43862cc1e6e

Added new artifact 'MapArtifact' for module 'new map'. This allows to open an existing map project. flys-client/trunk@3658 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 12 Jan 2012 10:46:44 +0000
parents 685bce693617
children b6af10d5f3da
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/MapArtifact.java
diffstat 3 files changed, 54 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Jan 12 09:19:49 2012 +0000
+++ b/flys-client/ChangeLog	Thu Jan 12 10:46:44 2012 +0000
@@ -1,3 +1,12 @@
+2012-01-12  Raimund Renkert <raimund.renkert@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/shared/model/MapArtifact.java:
+	New. Map artifact for module 'new map'. The artifact allows to open an
+	existing map project.
+
+	* src/main/java/de/intevation/flys/client/server/FLYSArtifactCreator.java:
+	Create a new map artifact if the artifact name is 'map'.
+
 2012-01-12  Raimund Renkert <raimund.renkert@intevation.de>
 
 	Issue451.
--- a/flys-client/src/main/java/de/intevation/flys/client/server/FLYSArtifactCreator.java	Thu Jan 12 09:19:49 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/FLYSArtifactCreator.java	Thu Jan 12 10:46:44 2012 +0000
@@ -20,6 +20,7 @@
 import de.intevation.flys.client.shared.model.CalculationMessage;
 import de.intevation.flys.client.shared.model.DefaultArtifact;
 import de.intevation.flys.client.shared.model.WINFOArtifact;
+import de.intevation.flys.client.shared.model.MapArtifact;
 
 
 /**
@@ -124,6 +125,10 @@
             logger.debug("+++++ NEW WINFO ARTIFACT.");
             return new WINFOArtifact(uuid, hash, background, msg);
         }
+        else if (name.length() > 0 && name.equals("map")) {
+            logger.debug("+++++ NEW MAP ARTIFACT.");
+            return new MapArtifact(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/MapArtifact.java	Thu Jan 12 10:46:44 2012 +0000
@@ -0,0 +1,40 @@
+package de.intevation.flys.client.shared.model;
+
+import java.util.List;
+
+
+/**
+ * The MAP implementation of an Artifact.
+ *
+ * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
+ */
+public class MapArtifact extends DefaultArtifact {
+
+    /** The name of this artifact: 'map'.*/
+    public static final String NAME = "map";
+
+
+    public MapArtifact() {
+    }
+
+
+    public  MapArtifact(String uuid, String hash) {
+        super(uuid, hash);
+    }
+
+
+    public MapArtifact(
+        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