3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.app
.pesi
;
13 import org
.apache
.log4j
.Logger
;
15 import eu
.etaxonomy
.cdm
.common
.AccountStore
;
16 import eu
.etaxonomy
.cdm
.io
.common
.Source
;
23 public class PesiDestinations
{
24 @SuppressWarnings("unused")
25 private static final Logger logger
= Logger
.getLogger(PesiDestinations
.class);
27 public static Source
pesi_test_local_CDM_EM2PESI(){
29 String dbms
= Source
.SQL_SERVER_2008
;
30 String strServer
= "localhost";
31 String strDB
= "CDM_EM2PESI";
33 String userName
= "pesiexport";// "pesiexport3";
34 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
37 public static Source
pesi_test_local_CDM_EM2PESI_tmp(){
39 String dbms
= Source
.SQL_SERVER_2008
;
40 String strServer
= "localhost";
41 String strDB
= "CDMTMP_EM2PESI";
43 String userName
= "pesiexport2";
44 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
47 public static Source
pesi_test_local_CDM_FE2PESI(){
49 String dbms
= Source
.SQL_SERVER_2008
;
50 String strServer
= "pesiimport3"; //192.168.1.223
51 String strDB
= "CDM_FE2PESI";
53 String userName
= "pesiExportFaunaEu";
54 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
58 public static Source
pesi_test_local_CDM_IF2PESI(){
60 String dbms
= Source
.SQL_SERVER_2008
;
61 String strServer
= "pesiimport3"; //192.168.1.223
62 String strDB
= "CDM_IF2PESI";
64 String userName
= "pesiExportFaunaEu";
65 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
68 public static Source
pesi_test_local_CDM_ERMS2PESI(){
70 String dbms
= Source
.SQL_SERVER_2008
;
71 String strServer
= "pesiimport3";
72 String strDB
= "CDM_ERMS2PESI";
74 String userName
= "pesiexport";
75 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
80 public static Source
pesi_test_bgbm42_CDM_DWH_FaEu(){
82 String dbms
= Source
.SQL_SERVER_2008
;
83 String strServer
= "BGBM42";
84 String strDB
= "CDM_DWH_FaEu";
86 String userName
= "WebUser";
87 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
90 public static Source
pesi_test_bgbm42_PESI_V11(){
92 String dbms
= Source
.SQL_SERVER_2008
;
93 String strServer
= "BGBM42";
94 String strDB
= "PESI_v11";
96 String userName
= "WebUser";
97 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
101 * Initializes the source.
110 private static Source
makeSource(String dbms
, String strServer
, String strDB
, int port
, String userName
, String pwd
){
111 //establish connection
112 Source source
= null;
113 source
= new Source(dbms
, strServer
, strDB
);
114 source
.setPort(port
);
116 pwd
= AccountStore
.readOrStorePassword(dbms
, strServer
, userName
, pwd
);
117 source
.setUserAndPwd(userName
, pwd
);
118 // write pwd to account store