Move BP xml files to standard OSGI-INF/blueprint
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / resources / OSGI-INF / 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   <reference id="domRpcService" interface="org.opendaylight.mdsal.dom.api.DOMRpcService"/>
30   <reference id="domMountPointService" interface="org.opendaylight.mdsal.dom.api.DOMMountPointService"/>
31   <reference id="domNotificationService" interface="org.opendaylight.mdsal.dom.api.DOMNotificationService"/>
32   <reference id="domDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
33           ext:filter="(type=@{databroker-service-type})"/>
34   <reference id="domSchemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
35
36   <bean id="transactionChainHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.TransactionChainHandler"
37           destroy-method="close">
38     <argument ref="domDataBroker"/>
39   </bean>
40
41   <bean id="schemaContextHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.SchemaContextHandler"
42       factory-method="newInstance" init-method="init" destroy-method="close">
43     <argument ref="transactionChainHandler"/>
44     <argument ref="domSchemaService"/>
45   </bean>
46
47   <bean id="mountPointServiceHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.DOMMountPointServiceHandler"
48       factory-method="newInstance">
49     <argument ref="domMountPointService"/>
50   </bean>
51
52   <bean id="dataBrokerHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.DOMDataBrokerHandler">
53     <argument ref="domDataBroker"/>
54   </bean>
55
56   <bean id="rpcServiceHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.RpcServiceHandler">
57     <argument ref="domRpcService"/>
58   </bean>
59
60   <bean id="notificationServiceHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.NotificationServiceHandler">
61     <argument ref="domNotificationService"/>
62   </bean>
63
64   <bean id="servicesWrapper" class="org.opendaylight.restconf.nb.rfc8040.services.wrapper.ServicesWrapper"
65       factory-method="newInstance">
66     <argument ref="schemaContextHandler"/>
67     <argument ref="mountPointServiceHandler"/>
68     <argument ref="transactionChainHandler"/>
69     <argument ref="dataBrokerHandler"/>
70     <argument ref="rpcServiceHandler"/>
71     <argument ref="notificationServiceHandler"/>
72     <argument ref="domSchemaService"/>
73   </bean>
74
75   <bean id="restconfApplication" class="org.opendaylight.restconf.nb.rfc8040.RestconfApplication">
76     <argument ref="schemaContextHandler"/>
77     <argument ref="mountPointServiceHandler"/>
78     <argument ref="servicesWrapper"/>
79   </bean>
80
81   <!-- JSONRestconfService -->
82   <bean id="jsonRestconfService"
83       class="org.opendaylight.restconf.nb.rfc8040.rests.services.impl.JSONRestconfServiceRfc8040Impl"
84       destroy-method="close">
85     <argument ref="servicesWrapper"/>
86     <argument ref="mountPointServiceHandler"/>
87     <argument ref="schemaContextHandler"/>
88   </bean>
89
90   <service ref="jsonRestconfService" odl:type="rfc8040"
91       interface="org.opendaylight.restconf.nb.rfc8040.rests.services.api.JSONRestconfService" />
92
93   <!-- Web app registration -->
94
95   <reference id="customFilterAdapterConfig"
96       interface="org.opendaylight.aaa.filterchain.configuration.CustomFilterAdapterConfiguration"/>
97
98   <reference id="webServer" interface="org.opendaylight.aaa.web.WebServer" />
99
100   <reference id="webContextSecurer" interface="org.opendaylight.aaa.web.WebContextSecurer" />
101
102   <reference id="servletSupport" interface="org.opendaylight.aaa.web.servlet.ServletSupport" />
103
104   <bean id="webInitializer" class="org.opendaylight.restconf.nb.rfc8040.web.WebInitializer"
105           destroy-method="close">
106     <argument ref="webServer"/>
107     <argument ref="webContextSecurer"/>
108     <argument ref="servletSupport"/>
109     <argument ref="restconfApplication"/>
110     <argument ref="customFilterAdapterConfig"/>
111   </bean>
112
113 </blueprint>