Merge "Instance identifier support"
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / restconf / impl / CompositeNodeWrapper.java
index 0ded60dae4fc0131ad6eb9da0cef06aee6f2cdff..8c5870522ec2a53a6be3e89f7cf66477b6aed063 100644 (file)
@@ -41,6 +41,11 @@ public final class CompositeNodeWrapper implements NodeWrapper<CompositeNode>, C
         Preconditions.checkState(compositeNode == null, "Cannot change the object, due to data inconsistencies.");
         this.name = name;
     }
+    
+    @Override
+    public QName getQname() {
+        return name;
+    }
 
     @Override
     public String getLocalName() {
@@ -78,6 +83,11 @@ public final class CompositeNodeWrapper implements NodeWrapper<CompositeNode>, C
         Preconditions.checkState(compositeNode == null, "Data can be inconsistent.");
         return Collections.unmodifiableList(values);
     }
+    
+    @Override
+    public boolean isChangeAllowed() {
+        return compositeNode == null ? true : false;
+    }
 
     @Override
     public CompositeNode unwrap() {
@@ -230,4 +240,5 @@ public final class CompositeNodeWrapper implements NodeWrapper<CompositeNode>, C
     public Set<java.util.Map.Entry<QName, List<Node<?>>>> entrySet() {
         return unwrap().entrySet();
     }
+
 }