1 |
91138b6c
|
Andreas Müller
|
|
2 |
|
|
/**
|
3 |
|
|
* Copyright (C) 2007 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 |
|
|
|
11 |
|
|
package eu.etaxonomy.cdm.app.berlinModelImport;
|
12 |
|
|
|
13 |
|
|
import org.apache.log4j.Logger;
|
14 |
|
|
|
15 |
|
|
import eu.etaxonomy.cdm.common.AccountStore;
|
16 |
|
|
import eu.etaxonomy.cdm.io.common.Source;
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
public class BerlinModelDestinations {
|
20 |
|
|
@SuppressWarnings("unused")
|
21 |
|
|
private static final Logger logger = Logger.getLogger(BerlinModelDestinations.class);
|
22 |
|
|
|
23 |
|
|
public static Source El_Salvador_Andreas(){
|
24 |
|
|
// BerlinModel - El_Salvador
|
25 |
|
|
String dbms = Source.SQL_SERVER_2005;
|
26 |
|
|
String strServer = "LENOVO-T61";
|
27 |
|
|
String strDB = "Salvador_export";
|
28 |
|
|
int port = 1433;
|
29 |
|
|
String userName = "salvadorExport";
|
30 |
|
|
return makeSource(dbms, strServer, strDB, port, userName, null);
|
31 |
|
|
}
|
32 |
|
|
|
33 |
|
|
/**
|
34 |
|
|
* Initializes the source.
|
35 |
|
|
* @param dbms
|
36 |
|
|
* @param strServer
|
37 |
|
|
* @param strDB
|
38 |
|
|
* @param port
|
39 |
|
|
* @param userName
|
40 |
|
|
* @param pwd
|
41 |
|
|
* @return the source
|
42 |
|
|
*/
|
43 |
|
|
private static Source makeSource(String dbms, String strServer, String strDB, int port, String userName, String pwd ){
|
44 |
|
|
//establish connection
|
45 |
|
|
Source source = null;
|
46 |
|
|
source = new Source(dbms, strServer, strDB);
|
47 |
|
|
source.setPort(port);
|
48 |
|
|
|
49 |
|
|
pwd = AccountStore.readOrStorePassword(dbms, strServer, userName, pwd);
|
50 |
|
|
source.setUserAndPwd(userName, pwd);
|
51 |
|
|
// write pwd to account store
|
52 |
|
|
return source;
|
53 |
|
|
}
|
54 |
|
|
|
55 |
|
|
}
|