[Dive4elements-commits] [PATCH] Datacage: Introduced <dc:message>This is my message!</dc:message>. The message are logged at INFO level to help debugging

Wald Commits scm-commit at wald.intevation.org
Thu May 23 17:31:31 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1369323086 -7200
# Node ID c7777feea223175aa9a8dcb0deaed3e85c241f59
# Parent  c97d003fd1273c9bb02570f842fce89f8d121099
Datacage: Introduced <dc:message>This is my message!</dc:message>. The message are logged at INFO level to help debugging.

diff -r c97d003fd127 -r c7777feea223 artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java
--- 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);
                     }


More information about the Dive4elements-commits mailing list