use of ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType in project Gemma by PavlidisLab.
the class ArrayDesignBlatCli method audit.
private void audit(ArrayDesign arrayDesign, String note) {
arrayDesignReportService.generateArrayDesignReport(arrayDesign.getId());
AuditEventType eventType = ArrayDesignSequenceAnalysisEvent.Factory.newInstance();
auditTrailService.addUpdateEvent(arrayDesign, eventType, note);
}
use of ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType in project Gemma by PavlidisLab.
the class ArrayDesignRepeatScanCli method audit.
private void audit(ArrayDesign arrayDesign, String note) {
AuditEventType eventType = ArrayDesignRepeatAnalysisEvent.Factory.newInstance();
auditTrailService.addUpdateEvent(arrayDesign, eventType, note);
}
use of ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType 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.model.common.auditAndSecurity.eventType.AuditEventType 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());
}
}
use of ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType in project Gemma by PavlidisLab.
the class AuditTrailServiceImpl method addUpdateEvent.
@Override
@Transactional
public AuditEvent addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, String note, String detail) {
AuditEventType auditEventType;
try {
Class<?> factory = Class.forName(type.getName() + "$Factory");
Method method = factory.getMethod("newInstance");
auditEventType = (AuditEventType) method.invoke(type);
} catch (Exception e) {
throw new RuntimeException(e);
}
return this.addUpdateEvent(auditable, auditEventType, note, detail);
}
Aggregations