Bug 8533: Not possible to invoke RPC on mount points with new Restconf
[netconf.git] / restconf / sal-rest-connector / src / main / java / org / opendaylight / restconf / RestconfApplication.java
index c00cd4cd08291b260902f73f027ddc259bee99cb..47a8e017613800050da6a5a0c8abba79571cc7dd 100644 (file)
@@ -13,26 +13,27 @@ import java.util.Set;
 import javax.ws.rs.core.Application;
 import org.opendaylight.netconf.md.sal.rest.schema.SchemaExportContentYangBodyWriter;
 import org.opendaylight.netconf.md.sal.rest.schema.SchemaExportContentYinBodyWriter;
-import org.opendaylight.netconf.sal.rest.impl.JsonNormalizedNodeBodyReader;
-import org.opendaylight.netconf.sal.rest.impl.NormalizedNodeJsonBodyWriter;
-import org.opendaylight.netconf.sal.rest.impl.NormalizedNodeXmlBodyWriter;
-import org.opendaylight.netconf.sal.rest.impl.PATCHJsonBodyWriter;
-import org.opendaylight.netconf.sal.rest.impl.PATCHXmlBodyWriter;
+import org.opendaylight.netconf.sal.rest.impl.PatchJsonBodyWriter;
+import org.opendaylight.netconf.sal.rest.impl.PatchXmlBodyWriter;
 import org.opendaylight.netconf.sal.rest.impl.RestconfDocumentedExceptionMapper;
-import org.opendaylight.netconf.sal.rest.impl.XmlNormalizedNodeBodyReader;
-import org.opendaylight.restconf.common.wrapper.services.Draft15ServicesWrapperImpl;
-import org.opendaylight.restconf.utils.patch.Draft15JsonToPATCHBodyReader;
-import org.opendaylight.restconf.utils.patch.Draft15XmlToPATCHBodyReader;
+import org.opendaylight.restconf.common.wrapper.services.ServicesWrapperImpl;
+import org.opendaylight.restconf.jersey.providers.JsonNormalizedNodeBodyReader;
+import org.opendaylight.restconf.jersey.providers.JsonToPatchBodyReader;
+import org.opendaylight.restconf.jersey.providers.NormalizedNodeJsonBodyWriter;
+import org.opendaylight.restconf.jersey.providers.NormalizedNodeXmlBodyWriter;
+import org.opendaylight.restconf.jersey.providers.XmlNormalizedNodeBodyReader;
+import org.opendaylight.restconf.jersey.providers.XmlToPatchBodyReader;
 
 public class RestconfApplication extends Application {
 
     @Override
     public Set<Class<?>> getClasses() {
-        return ImmutableSet.<Class<?>> builder().add(NormalizedNodeJsonBodyWriter.class)
-                .add(NormalizedNodeXmlBodyWriter.class).add(JsonNormalizedNodeBodyReader.class)
-                .add(XmlNormalizedNodeBodyReader.class).add(SchemaExportContentYinBodyWriter.class)
-                .add(Draft15JsonToPATCHBodyReader.class).add(Draft15XmlToPATCHBodyReader.class)
-                .add(PATCHJsonBodyWriter.class).add(PATCHXmlBodyWriter.class)
+        return ImmutableSet.<Class<?>>builder()
+                .add(NormalizedNodeJsonBodyWriter.class).add(NormalizedNodeXmlBodyWriter.class)
+                .add(JsonNormalizedNodeBodyReader.class).add(XmlNormalizedNodeBodyReader.class)
+                .add(SchemaExportContentYinBodyWriter.class)
+                .add(JsonToPatchBodyReader.class).add(XmlToPatchBodyReader.class)
+                .add(PatchJsonBodyWriter.class).add(PatchXmlBodyWriter.class)
                 .add(SchemaExportContentYangBodyWriter.class).add(RestconfDocumentedExceptionMapper.class)
                 .build();
     }
@@ -40,7 +41,7 @@ public class RestconfApplication extends Application {
     @Override
     public Set<Object> getSingletons() {
         final Set<Object> singletons = new HashSet<>();
-        singletons.add(Draft15ServicesWrapperImpl.getInstance());
+        singletons.add(ServicesWrapperImpl.getInstance());
         return singletons;
     }
 }