Search in sources :

Example 6 with AuditEventType

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);
}
Also used : AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType)

Example 7 with AuditEventType

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);
}
Also used : AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType)

Example 8 with AuditEventType

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());
    }
}
Also used : AuditTrailService(ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService) AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType)

Example 9 with AuditEventType

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());
    }
}
Also used : AuditTrailService(ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService) AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType) ArrayDesign(ubic.gemma.model.expression.arrayDesign.ArrayDesign)

Example 10 with AuditEventType

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);
}
Also used : AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType) Method(java.lang.reflect.Method) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

AuditEventType (ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType)22 ArrayDesign (ubic.gemma.model.expression.arrayDesign.ArrayDesign)5 AuditEvent (ubic.gemma.model.common.auditAndSecurity.AuditEvent)3 RawExpressionDataVector (ubic.gemma.model.expression.bioAssayData.RawExpressionDataVector)3 AffyPowerToolsProbesetSummarize (ubic.gemma.core.loader.expression.AffyPowerToolsProbesetSummarize)2 AuditTrail (ubic.gemma.model.common.auditAndSecurity.AuditTrail)2 ExpressionExperiment (ubic.gemma.model.expression.experiment.ExpressionExperiment)2 Taxon (ubic.gemma.model.genome.Taxon)2 AuditTrailService (ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService)2 SecurityService (gemma.gsec.SecurityService)1 Method (java.lang.reflect.Method)1 Date (java.util.Date)1 StopWatch (org.apache.commons.lang3.time.StopWatch)1 Query (org.hibernate.Query)1 Test (org.junit.Test)1 Transactional (org.springframework.transaction.annotation.Transactional)1 ExpressionDataDoubleMatrix (ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix)1 RawDataFetcher (ubic.gemma.core.loader.expression.geo.fetcher.RawDataFetcher)1 Auditable (ubic.gemma.model.common.Auditable)1 AuditEventValueObject (ubic.gemma.model.common.auditAndSecurity.AuditEventValueObject)1