X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2FCompositeNodeWrapper.java;h=e0ae78870394223ca2a662e0d8cbfe3c64193e6f;hb=84790328004205e3bec8d8ce37813d6159dbbf2e;hp=0ded60dae4fc0131ad6eb9da0cef06aee6f2cdff;hpb=e640f23d9c37afac9ca51f48e155302bc65327ed;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/CompositeNodeWrapper.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/CompositeNodeWrapper.java index 0ded60dae4..e0ae788703 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/CompositeNodeWrapper.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/CompositeNodeWrapper.java @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 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.sal.restconf.impl; import java.net.URI; @@ -41,6 +48,11 @@ public final class CompositeNodeWrapper implements NodeWrapper, 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 +90,11 @@ public final class CompositeNodeWrapper implements NodeWrapper, 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 +247,5 @@ public final class CompositeNodeWrapper implements NodeWrapper, C public Set>>> entrySet() { return unwrap().entrySet(); } + }