changeset 6077:c7777feea223

Datacage: Introduced <dc:message>This is my message!</dc:message>. The message are logged at INFO level to help debugging.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 23 May 2013 17:31:26 +0200
parents c97d003fd127
children a0dbc60f78ee
files artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java	Thu May 23 15:11:05 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java	Thu May 23 17:31:26 2013 +0200
@@ -577,6 +577,16 @@
             parent.appendChild(owner.createTextNode(value));
         }
 
+        protected void message(Node parent, Element current)
+        throws SQLException
+        {
+            log.debug("dc:message");
+            if (log.isInfoEnabled()) {
+                String value = expand(current.getTextContent());
+                log.info("MESSAGE: " + value);
+            }
+        }
+
         /**
          * Add attribute to an element
          * @see Element
@@ -893,6 +903,9 @@
                     else if ("text".equals(localName)) {
                         text(parent, curr);
                     }
+                    else if ("message".equals(localName)) {
+                        message(parent, curr);
+                    }
                     else if ("variable".equals(localName)) {
                         variable(curr);
                     }

http://dive4elements.wald.intevation.org