Add support for configuration attributes based on yang leaves with custom types ...
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / mapping / attributes / toxml / SimpleAttributeWritingStrategy.java
index 514183be2fef343b2a5f11888d9baa181e8c94de..62ff682a7fd7bbd2760e156150e22f1fb4457f51 100644 (file)
@@ -29,10 +29,16 @@ public class SimpleAttributeWritingStrategy implements AttributeWritingStrategy
 
     @Override
     public void writeElement(Element parentElement, String namespace, Object value) {
+        value = preprocess(value);
         Util.checkType(value, String.class);
         Element innerNode = XmlUtil.createTextElement(document, key, (String) value);
         XmlUtil.addNamespaceAttr(innerNode, namespace);
         parentElement.appendChild(innerNode);
     }
 
+    protected Object preprocess(Object value) {
+        return value;
+    }
+
+
 }