@Override
public EditScmResult executeEditCommand( ScmProviderRepository repository, ScmFileSet fileSet )
throws ScmException
{
getLogger().info( "Attempting make files writeable in Sandbox " + fileSet.getBasedir().getAbsolutePath() );
EditScmResult result;
IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
try
{
Sandbox siSandbox = iRepo.getSandbox();
Response res = siSandbox.makeWriteable();
int exitCode = res.getExitCode();
boolean success = ( exitCode == 0 ? true : false );
result = new EditScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
}
catch ( APIException aex )
{
ExceptionHandler eh = new ExceptionHandler( aex );
getLogger().error( "MKS API Exception: " + eh.getMessage() );
getLogger().info( eh.getCommand() + " exited with return code " + eh.getExitCode() );
result = new EditScmResult( eh.getCommand(), eh.getMessage(), "Exit Code: " + eh.getExitCode(), false );
}
return result;
}