Remove RestConnectorProvider
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / resources / org / opendaylight / blueprint / restconf-bp.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright (c) 2017 Pantheon technologies s.r.o. and others.  All rights reserved.
4
5  This program and the accompanying materials are made available under the
6  terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  and is available at http://www.eclipse.org/legal/epl-v10.html
8 -->
9 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
10            xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
11            xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
12            xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.4.0"
13            odl:use-default-for-reference-types="true">
14
15   <!-- Restconf providers -->
16   <!--
17     This cfg file defines the type of the DOMDataBroker service to use. 'default' indicates to use
18     the default DOMDataBroker provided by MD-SAL. This setting is useful for providing a custom
19     DOMDataBroker implementation that does, e.g., validation or additional security checking on
20     top of the default DOMDataBroker.
21   -->
22   <cm:property-placeholder persistent-id="org.opendaylight.restconf.databroker"
23         placeholder-prefix = "@{" placeholder-suffix = "}" update-strategy="reload">
24     <cm:default-properties>
25       <cm:property name="databroker-service-type" value="default"/>
26     </cm:default-properties>
27   </cm:property-placeholder>
28
29   <!-- We need the AAAService available even though we don't use it -->
30   <reference interface="org.opendaylight.aaa.api.AAAService"/>
31
32   <reference id="domRpcService" interface="org.opendaylight.controller.md.sal.dom.api.DOMRpcService"/>
33   <reference id="domMountPointService" interface="org.opendaylight.controller.md.sal.dom.api.DOMMountPointService"/>
34   <reference id="domNotificationService" interface="org.opendaylight.controller.md.sal.dom.api.DOMNotificationService"/>
35   <reference id="domDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"
36           ext:filter="(type=@{databroker-service-type})"/>
37   <reference id="domSchemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
38
39   <bean id="transactionChainHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.TransactionChainHandler"
40           destroy-method="close">
41     <argument ref="domDataBroker"/>
42   </bean>
43
44   <bean id="schemaContextHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.SchemaContextHandler"
45       factory-method="newInstance" init-method="init" destroy-method="close">
46     <argument ref="transactionChainHandler"/>
47     <argument ref="domSchemaService"/>
48   </bean>
49
50   <bean id="mountPointServiceHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.DOMMountPointServiceHandler"
51       factory-method="newInstance">
52     <argument ref="domMountPointService"/>
53   </bean>
54
55   <bean id="dataBrokerHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.DOMDataBrokerHandler">
56     <argument ref="domDataBroker"/>
57   </bean>
58
59   <bean id="rpcServiceHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.RpcServiceHandler">
60     <argument ref="domRpcService"/>
61   </bean>
62
63   <bean id="notificationServiceHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.NotificationServiceHandler">
64     <argument ref="domNotificationService"/>
65   </bean>
66
67   <bean id="servicesWrapper" class="org.opendaylight.restconf.nb.rfc8040.services.wrapper.ServicesWrapper"
68       factory-method="newInstance">
69     <argument ref="schemaContextHandler"/>
70     <argument ref="mountPointServiceHandler"/>
71     <argument ref="transactionChainHandler"/>
72     <argument ref="dataBrokerHandler"/>
73     <argument ref="rpcServiceHandler"/>
74     <argument ref="notificationServiceHandler"/>
75     <argument ref="domSchemaService"/>
76   </bean>
77
78   <!-- JSONRestconfService -->
79   <bean id="jsonRestconfService"
80       class="org.opendaylight.restconf.nb.rfc8040.rests.services.impl.JSONRestconfServiceRfc8040Impl"
81       destroy-method="close">
82     <argument ref="servicesWrapper"/>
83     <argument ref="mountPointServiceHandler"/>
84     <argument ref="schemaContextHandler"/>
85   </bean>
86
87   <service ref="jsonRestconfService" odl:type="rfc8040"
88       interface="org.opendaylight.restconf.nb.rfc8040.rests.services.api.JSONRestconfService" />
89
90 </blueprint>