changeset 135:2d6e02787d00

Added a method to retrieve the UIProvider for a state. flys-artifacts/trunk@1504 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 17 Mar 2011 16:37:39 +0000
parents f3dfa188d8b2
children 2e510c998adb
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DefaultState.java
diffstat 2 files changed, 22 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Mar 17 16:03:36 2011 +0000
+++ b/flys-artifacts/ChangeLog	Thu Mar 17 16:37:39 2011 +0000
@@ -1,3 +1,9 @@
+2011-03-17  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/states/DefaultState.java:
+	  Added a new method getUIProvider() that might be overriden by concreted
+	  subclasses that should be rendered with a specific UIProvider.
+
 2011-03-17  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DefaultState.java	Thu Mar 17 16:03:36 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DefaultState.java	Thu Mar 17 16:37:39 2011 +0000
@@ -83,8 +83,17 @@
             ArtifactNamespaceContext.NAMESPACE_URI,
             ArtifactNamespaceContext.NAMESPACE_PREFIX);
 
-        Element ui  = ProtocolUtils.createArtNode(
-            creator, "dynamic", null, null);
+        Element ui        = null;
+        String uiprovider = getUIProvider();
+        if (uiprovider != null) {
+            ui  = ProtocolUtils.createArtNode(
+                creator, "dynamic",
+                new String[] { "uiprovider" },
+                new String[] { uiprovider });
+        }
+        else {
+            ui  = ProtocolUtils.createArtNode(creator, "dynamic", null, null);
+        }
 
         Map<String, StateData> theData = getData();
         if (theData == null) {
@@ -158,5 +167,10 @@
         XMLUtils.ElementCreator cr,
         String      name,
         CallContext context);
+
+
+    protected String getUIProvider() {
+        return null;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org