Add JSONRestconfService impl for the restconf Draft18 impl
[netconf.git] / restconf / sal-rest-connector / src / main / resources / org / opendaylight / blueprint / restconf-config.xml
index e09adb66f7a5e673b9d012e36d0958bcdae32d31..268dfe2274767a448bfe29fb8eda80f585192e8f 100644 (file)
            xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.4.0"
            odl:use-default-for-reference-types="true">
 
-  <!-- JSONRestconfService -->
-
-  <bean id="jsonRestconfService"
-      class="org.opendaylight.netconf.sal.restconf.impl.JSONRestconfServiceImpl"
-      destroy-method="close"/>
-
-  <service ref="jsonRestconfService"
-      interface="org.opendaylight.netconf.sal.restconf.api.JSONRestconfService" />
-
   <!-- Restconf providers -->
 
   <cm:property-placeholder persistent-id="org.opendaylight.restconf" update-strategy="reload">
   <service ref="restconfProviderDraft18"
       interface="org.opendaylight.netconf.sal.rest.api.RestConnector" />
 
+  <!-- JSONRestconfService -->
+
+  <bean id="jsonRestconfServiceDraft02"
+      class="org.opendaylight.netconf.sal.restconf.impl.JSONRestconfServiceImpl"
+      destroy-method="close"/>
+
+  <service ref="jsonRestconfServiceDraft02" odl:type="default"
+      interface="org.opendaylight.netconf.sal.restconf.api.JSONRestconfService" />
+
+  <bean id="jsonRestconfServiceDraft18" depends-on="restconfProviderDraft18"
+      class="org.opendaylight.netconf.sal.restconf.impl.JSONRestconfServiceDraft18"
+      destroy-method="close">
+    <argument>
+      <bean class="org.opendaylight.restconf.common.wrapper.services.ServicesWrapperImpl"
+          factory-method="getInstance" />
+    </argument>
+    <argument>
+      <bean factory-ref="restconfProviderDraft18" factory-method="getMountPointServiceHandler" />
+    </argument>
+  </bean>
+
+  <service ref="jsonRestconfServiceDraft18" odl:type="draft18"
+      interface="org.opendaylight.netconf.sal.restconf.api.JSONRestconfService" />
+
 </blueprint>