diff gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java @ 222:3e82b4f1c455

Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase. Added the possibility to switch to an alternative Transition. gnv-artifacts/trunk@284 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 05 Nov 2009 14:45:54 +0000
parents ee2d4134d0b3
children d6c75171f1e9
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Tue Nov 03 11:46:30 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Thu Nov 05 14:45:54 2009 +0000
@@ -239,7 +239,7 @@
         }
     }
 
-    protected Document createDescibeOutput(CallMeta callMeta, String uuid) {
+    protected Document createDescibeOutput(CallMeta callMeta, String uuid, boolean incudeUI) {
         log.debug("GNVArtifactBase.createDescibeOutput");
         Document document = XMLUtils.newDocument();
         Element rootNode = this.createRootNode(document);
@@ -248,9 +248,20 @@
         this.createCurrentState(rootNode, document);
         this.createReachableStates(rootNode, document);
         this.createModel(rootNode, document);
-        this.createUserInterface(rootNode, document, callMeta, uuid);
+        if (incudeUI){
+            this.createUserInterface(rootNode, document, callMeta, uuid);
+        }
         return document;
     }
+    
+    protected boolean getIncludeUIFromDocument(Document document){
+        String value = Config.getStringXPath(document, "action/include-ui");
+        boolean includeUI = false;
+        if (value != null){
+            includeUI = Boolean.parseBoolean(value);
+        }
+        return includeUI;
+    }
 
     protected Element createRootNode(Document document) {
         Element rootNode = xmlUtilities.createArtifactElement(document,

http://dive4elements.wald.intevation.org