X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Futils%2Fpatch%2FXmlToPATCHBodyReader.java;fp=restconf%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Futils%2Fpatch%2FDraft16XmlToPATCHBodyReader.java;h=599f7c1a942b389573d689dbf199538f2fb8c265;hb=acbc3139281024824f927426562d25a1f764b34c;hp=657866073c1e2af70434e43024ccba97f9632056;hpb=769c6a00e7aab547706b90a48d780824dac18272;p=netconf.git diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft16XmlToPATCHBodyReader.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/XmlToPATCHBodyReader.java similarity index 96% rename from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft16XmlToPATCHBodyReader.java rename to restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/XmlToPATCHBodyReader.java index 657866073c..599f7c1a94 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft16XmlToPATCHBodyReader.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/XmlToPATCHBodyReader.java @@ -35,7 +35,7 @@ import org.opendaylight.netconf.sal.restconf.impl.PATCHEntity; import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException; import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag; import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType; -import org.opendaylight.restconf.Draft16; +import org.opendaylight.restconf.Draft17; import org.opendaylight.restconf.utils.RestconfConstants; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; @@ -58,11 +58,11 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; @Provider -@Consumes({Draft16.MediaTypes.PATCH + RestconfConstants.XML}) -public class Draft16XmlToPATCHBodyReader extends Draft16AbstractIdentifierAwareJaxRsProvider implements +@Consumes({Draft17.MediaTypes.PATCH + RestconfConstants.XML}) +public class XmlToPATCHBodyReader extends AbstractIdentifierAwareJaxRsProvider implements MessageBodyReader { - private final static Logger LOG = LoggerFactory.getLogger(Draft16XmlToPATCHBodyReader.class); + private final static Logger LOG = LoggerFactory.getLogger(XmlToPATCHBodyReader.class); private static final DocumentBuilderFactory BUILDERFACTORY; static { @@ -148,7 +148,7 @@ public class Draft16XmlToPATCHBodyReader extends Draft16AbstractIdentifierAwareJ URI.create(namespace)).iterator().next(); // initialize codec + set default prefix derived from module name - final Draft16StringModuleInstanceIdentifierCodec codec = new Draft16StringModuleInstanceIdentifierCodec( + final StringModuleInstanceIdentifierCodec codec = new StringModuleInstanceIdentifierCodec( pathContext.getSchemaContext(), module.getName()); // find complete path to target and target schema node @@ -235,7 +235,7 @@ public class Draft16XmlToPATCHBodyReader extends Draft16AbstractIdentifierAwareJ /** * Prepare non-conditional XPath suitable for deserialization - * with {@link Draft16StringModuleInstanceIdentifierCodec} + * with {@link StringModuleInstanceIdentifierCodec} * @param schemaNode Top schema node * @param target Edit operation target * @param value Element with value