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