Project

General

Profile

« Previous | Next » 

Revision 7a98f66c

Added by Andreas Müller over 11 years ago

refactor Sources

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/app/common/CdmImportSources.java
14 14

  
15 15
import org.apache.log4j.Logger;
16 16

  
17
import eu.etaxonomy.cdm.app.berlinModelImport.SourceBase;
17 18
import eu.etaxonomy.cdm.app.tcs.TcsSources;
18
import eu.etaxonomy.cdm.common.AccountStore;
19 19
import eu.etaxonomy.cdm.io.common.Source;
20 20

  
21 21
/**
......
23 23
 * @date 21.04.2010
24 24
 *
25 25
 */
26
public class CdmImportSources {
26
public class CdmImportSources extends SourceBase{
27 27
	@SuppressWarnings("unused")
28 28
	private static final Logger logger = Logger.getLogger(CdmImportSources.class);
29 29
	
......
90 90
		return uri;	
91 91
	}
92 92
	
93
	/**
94
	 * Initializes the source.
95
	 * @param dbms
96
	 * @param strServer
97
	 * @param strDB
98
	 * @param port
99
	 * @param userName
100
	 * @param pwd
101
	 * @return the source
102
	 */
103
	private static Source makeSource(String dbms, String strServer, String strDB, int port, String userName, String pwd ){
104
		//establish connection
105
		Source source = null;
106
		source = new Source(dbms, strServer, strDB);
107
		source.setPort(port);
108
			
109
		pwd = AccountStore.readOrStorePassword(dbms, strServer, userName, pwd);
110
		source.setUserAndPwd(userName, pwd);
111
		// write pwd to account store
112
		return source;
113
	}
93
	
94
	
95

  
114 96
}

Also available in: Unified diff