2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2016 - 2017 AT&T
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdnc.sli.resource.dblib.config;
23 import java.util.ArrayList;
24 import java.util.Properties;
25 import org.slf4j.Logger;
26 import org.slf4j.LoggerFactory;
28 public class DbConfigPool {
29 private static Logger LOGGER = LoggerFactory.getLogger(DbConfigPool.class);
31 private final String type;
33 private ArrayList<BaseDBConfiguration> configurations = new ArrayList<BaseDBConfiguration>();
35 public DbConfigPool(Properties properties) {
36 LOGGER.debug("Initializing DbConfigType");
37 type = properties.getProperty(BaseDBConfiguration.DATABASE_TYPE, "JDBC").toUpperCase();
40 public int getTimeout() {
41 // TODO Auto-generated method stub
45 public String getType() {
49 public JDBCConfiguration[] getJDBCbSourceArray() {
50 return configurations.toArray(new JDBCConfiguration[configurations.size()]);
53 public void addConfiguration(BaseDBConfiguration config) {
54 configurations.add(config);