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