1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2009 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.cdm.database;
|
11
|
import java.util.ArrayList;
|
12
|
import java.util.List;
|
13
|
|
14
|
import org.springframework.jdbc.datasource.AbstractDriverBasedDataSource;
|
15
|
|
16
|
/**
|
17
|
* @author a.kohlbecker
|
18
|
* @date 12.01.2010
|
19
|
*
|
20
|
*/
|
21
|
public class DataSourceInfo {
|
22
|
|
23
|
String url;
|
24
|
String username;
|
25
|
List<String> problems;
|
26
|
|
27
|
public String getUrl() {
|
28
|
return url;
|
29
|
}
|
30
|
public void setUrl(String url) {
|
31
|
this.url = url;
|
32
|
}
|
33
|
public String getUsername() {
|
34
|
return username;
|
35
|
}
|
36
|
public void setUsername(String userName) {
|
37
|
this.username = userName;
|
38
|
}
|
39
|
public List<String> getProblems() {
|
40
|
if(problems == null){
|
41
|
problems = new ArrayList<String>();
|
42
|
}
|
43
|
return problems;
|
44
|
}
|
45
|
public void setProblems(List<String> problems) {
|
46
|
this.problems = problems;
|
47
|
}
|
48
|
public boolean hasProblems() {
|
49
|
return getProblems().size() > 0;
|
50
|
}
|
51
|
|
52
|
public DataSourceInfo(AbstractDriverBasedDataSource dataSource){
|
53
|
if(dataSource != null){
|
54
|
setUrl(dataSource.getUrl());
|
55
|
setUsername(dataSource.getUsername());
|
56
|
}
|
57
|
}
|
58
|
|
59
|
|
60
|
|
61
|
|
62
|
}
|