diff gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactFactory.java @ 464:70df44021a9f

Next step of changing the concept how to use the user interface. Adapted namespaces and replaced FISArtifact with a ProxyArtifact. gnv-artifacts/trunk@525 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Sat, 09 Jan 2010 17:55:45 +0000
parents
children c0504976e606
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactFactory.java	Sat Jan 09 17:55:45 2010 +0000
@@ -0,0 +1,34 @@
+package de.intevation.gnv.artifacts;
+
+import de.intevation.artifactdatabase.DefaultArtifactFactory;
+import de.intevation.artifactdatabase.ProxyArtifact;
+import de.intevation.artifacts.Artifact;
+import de.intevation.gnv.artifacts.fis.FISSelectArtifact;
+
+import org.apache.log4j.Logger;
+
+/**
+ * @author Ingo Weinzierl <ingo.weinzierl@intevation.de>
+ */
+public class GNVArtifactFactory extends DefaultArtifactFactory {
+
+    private static Logger logger = Logger.getLogger(GNVArtifactFactory.class);
+
+    public GNVArtifactFactory() {
+    }
+
+    @Override
+    public Artifact createArtifact(String identifier, Object context) {
+        Artifact artifact = super.createArtifact(identifier, context);
+
+        if (artifact instanceof ProxyArtifact) {
+            FISSelectArtifact select = new FISSelectArtifact();
+            select.setup(identifier, this, context);
+
+            ((ProxyArtifact) artifact).setProxied(select);
+        }
+
+        return artifact;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org