/**
* This package contrains the controller classes, which control the application.
*/
package org.uploadDB.controller;
import org.uploadDB.Connect.DBConnection;
import org.uploadDB.ui.ConnectionScreen;
public class ConnectController {
private DBConnection dbCon;
/**
* This method creates a database connection using the information entered in the connection screen.
* @param cs
*/
public void CreateConnection(ConnectionScreen cs) {
this.setDbCon(new DBConnection(cs.getFUsername().getText(),cs.getFPassword().getPassword(),cs.getFHost().getText(),cs.getFPort().getText(),cs.getFDatabase().getText(),cs.getDBvendor(),cs.getDBvendorClassPath()));
dbCon.Connect();
System.out.println("Test CreateConnection Method");
}
/**
* @param dbCon the dbCon to set
*/
public void setDbCon(DBConnection dbCon) {
this.dbCon = dbCon;
}
/**
* @return the dbCon
*/
public DBConnection getDbCon() {
return dbCon;
}
}