diff flys-client/src/main/java/de/intevation/flys/client/server/FLYSArtifactCreator.java @ 14:fe2f4d1dd784

Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact. flys-client/trunk@1326 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 17 Feb 2011 11:52:55 +0000
parents
children f8a5f2c5e2b7
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/FLYSArtifactCreator.java	Thu Feb 17 11:52:55 2011 +0000
@@ -0,0 +1,40 @@
+package de.intevation.flys.client.server;
+
+import org.w3c.dom.Document;
+
+import de.intevation.artifacts.httpclient.utils.ArtifactCreator;
+
+import de.intevation.flys.client.shared.model.Artifact;
+import de.intevation.flys.client.shared.model.DefaultArtifact;
+
+
+/**
+ * An implementation of an {@link ArtifactCreator}. This class uses the document
+ * that is returned by the artifact server to parse important information (like
+ * uuid, hash) and returns a new {@link Artifact} instance.
+ *
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class FLYSArtifactCreator implements ArtifactCreator {
+
+    /**
+     * Creates a new instance of an {@link ArtifactCreator}.
+     */
+    public FLYSArtifactCreator() {
+    }
+
+
+    /**
+     * This concreate implementation returns an instance of {@link Artifact}
+     * that is used in the FLYS GWT Client code.
+     *
+     * @param doc A document that describes the artifact that has been created
+     * in the artifact server.
+     *
+     * @return an instance if {@link Artifact}.
+     */
+    public Object create(Document doc) {
+        return new DefaultArtifact("TODO-UUID", "TODO-HASH");
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org