MD-SAL Store for IDM
[aaa.git] / aaa-h2-store / src / main / java / org / opendaylight / aaa / h2 / config / IdmLightConfig.java
1 /*
2  * Copyright (c) 2014, 2015 Hewlett-Packard Development Company, L.P. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.aaa.h2.config;
10
11 /**
12  *
13  * @author peter.mellquist@hp.com
14  *
15  */
16
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
19
20 public class IdmLightConfig {
21    private static Logger logger = LoggerFactory.getLogger(IdmLightConfig.class);
22
23    private String dbName;
24    private String dbPath;
25    private String dbDriver;
26    private String dbUser;
27    private String dbPwd;
28    private int dbValidTimeOut;
29
30    public IdmLightConfig() {
31       dbName = "idmlight.db";
32       // TODO make configurable
33       dbPath = "jdbc:h2:./" + dbName;
34       dbDriver = "org.h2.Driver";
35       dbUser = "foo";
36       dbPwd = "bar";
37       dbValidTimeOut = 3;
38    }
39
40    public void log() {
41       logger.info("DB Path                 : " + dbPath);
42       logger.info("DB Driver               : " + dbDriver);
43       logger.info("DB Valid Time Out       : " + dbValidTimeOut);
44    }
45
46    public String getDbName() {
47       return this.dbName;
48    }
49
50    public String getDbPath() {
51       return this.dbPath;
52    }
53
54    public String getDbDriver() {
55       return this.dbDriver;
56    }
57
58    public String getDbUser() {
59       return this.dbUser;
60    }
61
62    public String getDbPwd() {
63       return this.dbPwd;
64    }
65
66    public int getDbValidTimeOut() {
67       return this.dbValidTimeOut;
68    }
69 }