CommandParameters params )
throws ScmException
{
getLogger().info( "Attempting to connect with the MKS Integrity Server" );
LoginScmResult result;
IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
APISession api = iRepo.getAPISession();
try
{
// First we will establish a connection to the MKS Integrity Server
Response res = api.connect( iRepo.getHost(), iRepo.getPort(), iRepo.getUser(), iRepo.getPassword() );
int exitCode = res.getExitCode();
boolean success = ( exitCode == 0 ? true : false );
result = new LoginScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
// Next we will prepare the Project and Sandbox for the other commands
Project siProject = new Project( api, iRepo.getConfigruationPath() );
Sandbox siSandbox = new Sandbox( api, siProject, fileSet.getBasedir().getAbsolutePath() );
iRepo.setProject( siProject );
iRepo.setSandbox( siSandbox );
}
catch ( APIException aex )
{
ExceptionHandler eh = new ExceptionHandler( aex );
getLogger().error( "MKS API Exception: " + eh.getMessage() );