Project

General

Profile

Download (4.15 KB) Statistics
| Branch: | Revision:
1
/**
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.app.common;
10

    
11
import org.apache.log4j.Logger;
12

    
13
import eu.etaxonomy.cdm.config.AccountStore;
14
import eu.etaxonomy.cdm.io.common.Source;
15

    
16
/**
17
 * @author e.-m.lee
18
 * @since 16.02.2010
19
 */
20
public class PesiDestinations {
21
	@SuppressWarnings("unused")
22
	private static final Logger logger = Logger.getLogger(PesiDestinations.class);
23

    
24
	public static Source pesi_test_local_CDM_EM2PESI(){
25
		String dbms = Source.SQL_SERVER_2008;
26
		String strServer = "pesiimport3";
27
		String strDB = "CDM_EM2PESI";
28
		int port = 1433;
29
		String userName =  "pesi2019";// "pesiexport3";
30
		return makeSource(dbms, strServer, strDB, port, userName, null);
31
	}
32

    
33
	public static Source pesi_test_local_CDM_EM2PESI_2(){
34
		String dbms = Source.SQL_SERVER_2008;
35
		String strServer = "pesiimport3";
36
		String strDB = "CDM_EM2PESI_2";
37
		int port = 1433;
38
		String userName = "pesi2019";
39
		return makeSource(dbms, strServer, strDB, port, userName, null);
40
	}
41

    
42
	public static Source pesi_test_local_CDM_FE2PESI(){
43
		String dbms = Source.SQL_SERVER_2008;
44
		String strServer = "pesiimport3"; //130.133.70.48
45
		String strDB = "CDM_FE2PESI";
46
		int port = 1433;
47
		String userName = "pesi2019"; //"pesiExportFaunaEu";
48
		return makeSource(dbms, strServer, strDB, port, userName, null);
49
	}
50

    
51
    public static Source pesi_test_local_CDM_FE2PESI_2(){
52
        String dbms = Source.SQL_SERVER_2008;
53
        String strServer = "pesiimport3"; //130.133.70.48
54
        String strDB = "CDM_FE2PESI";
55
        int port = 1433;
56
        String userName = "pesi2019";
57
        return makeSource(dbms, strServer, strDB, port, userName, null);
58
    }
59

    
60
	public static Source pesi_test_local_CDM_IF2PESI(){
61
		String dbms = Source.SQL_SERVER_2008;
62
		String strServer = "pesiimport3";
63
		String strDB = "CDM_IF2PESI";
64
		int port = 1433;
65
		String userName = "pesi2019";
66
		return makeSource(dbms, strServer, strDB, port, userName, null);
67
	}
68

    
69
	public static Source pesi_test_local_CDM_IF2PESI_2(){
70
        String dbms = Source.SQL_SERVER_2008;
71
        String strServer = "pesiimport3";
72
        String strDB = "CDM_IF2PESI_2";
73
        int port = 1433;
74
        String userName = "pesi2019";
75
        return makeSource(dbms, strServer, strDB, port, userName, null);
76
    }
77

    
78
	public static Source pesi_test_local_CDM_ERMS2PESI(){
79
		String dbms = Source.SQL_SERVER_2008;
80
		String strServer = "pesiimport3";
81
		String strDB = "CDM_ERMS2PESI";
82
		int port = 1433;
83
		String userName = "pesi2019";
84
		return makeSource(dbms, strServer, strDB, port, userName, null);
85
	}
86

    
87
    public static Source pesi_test_local_CDM_ERMS2PESI_2(){
88
        String dbms = Source.SQL_SERVER_2008;
89
        String strServer = "pesiimport3";
90
        String strDB = "CDM_ERMS2PESI_2";
91
        int port = 1433;
92
        String userName = "pesi2019";
93
        return makeSource(dbms, strServer, strDB, port, userName, null);
94
    }
95

    
96
	public static Source pesi_test_bgbm42_CDM_DWH_FaEu(){
97
		//	CDM - PESI
98
		String dbms = Source.SQL_SERVER_2008;
99
		String strServer = "BGBM42";
100
		String strDB = "CDM_DWH_FaEu";
101
		int port = 1433;
102
		String userName = "WebUser";
103
		return makeSource(dbms, strServer, strDB, port, userName, null);
104
	}
105

    
106
	public static Source pesi_test_bgbm42_PESI_V11(){
107
		//	CDM - PESI
108
		String dbms = Source.SQL_SERVER_2008;
109
		String strServer = "BGBM42";
110
		String strDB = "PESI_v11";
111
		int port = 1433;
112
		String userName = "WebUser";
113
		return makeSource(dbms, strServer, strDB, port, userName, null);
114
	}
115

    
116

    
117
	/**
118
	 * Initializes the source.
119
	 * @param dbms
120
	 * @param strServer
121
	 * @param strDB
122
	 * @param port
123
	 * @param userName
124
	 * @param pwd
125
	 * @return
126
	 */
127
	private static Source makeSource(String dbms, String strServer, String strDB,
128
	        int port, String userName, String pwd ){
129
		//establish connection
130
		Source source = null;
131
		source = new Source(dbms, strServer, strDB);
132
		source.setPort(port);
133

    
134
		pwd = AccountStore.readOrStorePassword(dbms, strServer, userName, pwd);
135
		source.setUserAndPwd(userName, pwd);
136
		// write pwd to account store
137
		return source;
138
	}
139
}
(3-3/5)