Controller Blueprints Nitrogen to Oxygen Migration
[ccsdk/features.git] / blueprints-processor / adaptors / data-adaptor-provider / src / main / resources / org / opendaylight / blueprint / impl-blueprint.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!--\r
3   Copyright © 2017-2018 AT&T Intellectual Property.\r
4   Modifications Copyright © 2018 IBM.\r
5   \r
6   Licensed under the Apache License, Version 2.0 (the "License");\r
7   you may not use this file except in compliance with the License.\r
8   You may obtain a copy of the License at\r
9   \r
10       http://www.apache.org/licenses/LICENSE-2.0\r
11   \r
12   Unless required by applicable law or agreed to in writing, software\r
13   distributed under the License is distributed on an "AS IS" BASIS,\r
14   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
15   See the License for the specific language governing permissions and\r
16   limitations under the License.\r
17 -->\r
18 \r
19 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"\r
20         xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"\r
21         odl:use-default-for-reference-types="true">\r
22 \r
23         <!-- Dependencies -->\r
24 \r
25         <reference id="dataSource" interface="javax.sql.DataSource" />\r
26 \r
27         <!-- Data SourceInitialisation -->\r
28 \r
29         <bean id="config.dataSource"\r
30                 class="org.onap.ccsdk.features.data.adaptor.db.DataSourceWrap">\r
31                 <argument ref="dataSource" />\r
32         </bean>\r
33 \r
34         <bean id="jdbcTemplate"\r
35                 class="org.springframework.jdbc.core.JdbcTemplate">\r
36                 <property name="dataSource" ref="config.dataSource" />\r
37         </bean>\r
38 \r
39         <bean id="namedParameterJdbcTemplate"\r
40                 class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate">\r
41                 <argument ref="config.dataSource" />\r
42         </bean>\r
43 \r
44         <!-- DAO Initialisation -->\r
45         <bean id="transactionLogDao"\r
46                 class="org.onap.ccsdk.features.data.adaptor.dao.TransactionLogDaoImpl">\r
47                 <argument ref="jdbcTemplate" />\r
48         </bean>\r
49 \r
50         <bean id="configResourceDao"\r
51                 class="org.onap.ccsdk.features.data.adaptor.dao.ConfigResourceDaoImpl">\r
52                 <argument ref="jdbcTemplate" />\r
53         </bean>\r
54 \r
55         <bean id="queryExecutorDao"\r
56                 class="org.onap.ccsdk.features.data.adaptor.dao.QueryExecutorDaoImpl">\r
57                 <argument ref="jdbcTemplate" />\r
58         </bean>\r
59 \r
60         <bean id="namedQueryExecutorDao"\r
61                 class="org.onap.ccsdk.features.data.adaptor.dao.NamedQueryExecutorDaoImpl">\r
62                 <argument ref="namedParameterJdbcTemplate" />\r
63         </bean>\r
64 \r
65         <bean id="configPropertyMapDao"\r
66                 class="org.onap.ccsdk.features.data.adaptor.dao.ConfigPropertyMapDaoImpl">\r
67                 <argument ref="jdbcTemplate" />\r
68         </bean>\r
69 \r
70         <!-- Expose the Common Component Bean -->\r
71 \r
72         <bean id="configResourceService"\r
73         class="org.onap.ccsdk.features.data.adaptor.service.ConfigResourceServiceImpl">\r
74                 <argument ref="transactionLogDao" />\r
75                 <argument ref="configResourceDao" />\r
76                 <argument ref="queryExecutorDao" />\r
77                 <argument ref="namedQueryExecutorDao" />\r
78                 <argument ref="configPropertyMapDao" />\r
79         </bean>\r
80 \r
81         <service ref="configResourceService"\r
82         interface="org.onap.ccsdk.features.data.adaptor.service.ConfigResourceService" />\r
83 \r
84 </blueprint>\r