package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml;
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
import org.opendaylight.controller.netconf.util.xml.XmlElement;
import java.util.List;
}
@Override
- public AttributeConfigElement readElement(List<XmlElement> configNodes) {
- if (configNodes.size() == 0)
- return AttributeConfigElement.createNullValue(nullableDefault);
-
+ public AttributeConfigElement readElement(List<XmlElement> configNodes) throws NetconfDocumentedException {
+ if (configNodes.size() == 0){
+ return AttributeConfigElement.createNullValue(postprocessNullableDefault(nullableDefault));
+ }
return readElementHook(configNodes);
}
- abstract AttributeConfigElement readElementHook(List<XmlElement> configNodes);
+ abstract AttributeConfigElement readElementHook(List<XmlElement> configNodes) throws NetconfDocumentedException;
+ protected Object postprocessNullableDefault(String nullableDefault) {
+ return nullableDefault;
+ }
}