use of ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService in project Gemma by PavlidisLab.
the class ExpressionExperimentDataFileGeneratorCli method processExperiment.
private void processExperiment(ExpressionExperiment ee) {
try {
ee = this.eeService.thawLite(ee);
AuditTrailService ats = this.getBean(AuditTrailService.class);
AuditEventType type = CommentedEvent.Factory.newInstance();
expressionDataFileService.writeOrLocateCoexpressionDataFile(ee, force_write);
expressionDataFileService.writeOrLocateDiffExpressionDataFiles(ee, force_write);
ats.addUpdateEvent(ee, type, "Generated Flat data files for downloading");
super.successObjects.add("Success: generated data file for " + ee.getShortName() + " ID=" + ee.getId());
} catch (Exception e) {
AbstractCLI.log.error(e, e);
super.errorObjects.add("FAILED: for ee: " + ee.getShortName() + " ID= " + ee.getId() + " Error: " + e.getMessage());
}
}
use of ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService in project Gemma by PavlidisLab.
the class ExpressionExperimentPlatformSwitchCli method processExperiment.
private void processExperiment(ExpressionExperiment ee) {
try {
ee = this.eeService.thawLite(ee);
AuditTrailService ats = this.getBean(AuditTrailService.class);
AuditEventType type = ExpressionExperimentPlatformSwitchEvent.Factory.newInstance();
if (this.arrayDesignName != null) {
ArrayDesign ad = this.locateArrayDesign(this.arrayDesignName, arrayDesignService);
if (ad == null) {
AbstractCLI.log.error("Unknown array design");
this.bail(ErrorCode.INVALID_OPTION);
}
ad = arrayDesignService.thaw(ad);
ee = serv.switchExperimentToArrayDesign(ee, ad);
ats.addUpdateEvent(ee, type, "Switched to use " + ad);
} else {
// Identify merged platform automatically; not really recommended as it might not make the optimal choice.
ee = serv.switchExperimentToMergedPlatform(ee);
ats.addUpdateEvent(ee, type, "Switched to use merged array Design ");
}
super.successObjects.add(ee.toString());
} catch (Exception e) {
AbstractCLI.log.error(e, e);
super.errorObjects.add(ee + ": " + e.getMessage());
}
}
Aggregations