}
public Result execute(Result prev_result, int nr, Repository rep, Job parentJob) {
LogWriter log = LogWriter.getInstance();
Result result = new Result(nr);
result.setResult(false);
log.logDetailed(toString(), "Start of processing");
// String substitution..
String realS3Bucket = environmentSubstitute(S3Bucket);
String realAccessKey = environmentSubstitute(AccessKey);
String realPrivateKey = environmentSubstitute(PrivateKey);
String realFilenameToSend = environmentSubstitute(FilenameToSend);
SendToS3Job proc = new SendToS3Job(realAccessKey, realPrivateKey, realS3Bucket, realFilenameToSend);
try {
proc.process();
result.setResult(true);
} catch (Exception e) {
result.setNrErrors(1);
e.printStackTrace();
log.logError(toString(), "Error processing SendToS3Job : " + e.getMessage());
}
return result;