Decouple config and netconf subsystems.
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / mapping / attributes / fromxml / AbstractAttributeReadingStrategy.java
diff --git a/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/AbstractAttributeReadingStrategy.java b/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/AbstractAttributeReadingStrategy.java
deleted file mode 100644 (file)
index cf42686..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml;
-
-import java.util.List;
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
-import org.opendaylight.controller.netconf.util.xml.XmlElement;
-
-public abstract class AbstractAttributeReadingStrategy implements AttributeReadingStrategy {
-
-    private final String nullableDefault;
-
-    public AbstractAttributeReadingStrategy(String nullableDefault) {
-        this.nullableDefault = nullableDefault;
-    }
-
-    public String getNullableDefault() {
-        return nullableDefault;
-    }
-
-    @Override
-    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) throws NetconfDocumentedException;
-
-    protected Object postprocessNullableDefault(String nullableDefault) {
-        return nullableDefault;
-    }
-}