Search in sources :

Example 1 with AuditEventValueObject

use of ubic.gemma.model.common.auditAndSecurity.AuditEventValueObject in project Gemma by PavlidisLab.

the class ExpressionExperimentDetailsValueObject method auditEvents2SampleRemovedFlags.

public void auditEvents2SampleRemovedFlags(Collection<AuditEvent> s) {
    Collection<AuditEventValueObject> converted = new HashSet<>();
    for (AuditEvent ae : s) {
        converted.add(new AuditEventValueObject(ae));
    }
    this.sampleRemovedFlags = converted;
}
Also used : AuditEventValueObject(ubic.gemma.model.common.auditAndSecurity.AuditEventValueObject) AuditEvent(ubic.gemma.model.common.auditAndSecurity.AuditEvent) HashSet(java.util.HashSet)

Example 2 with AuditEventValueObject

use of ubic.gemma.model.common.auditAndSecurity.AuditEventValueObject in project Gemma by PavlidisLab.

the class AuditController method getEvents.

public Collection<AuditEventValueObject> getEvents(EntityDelegator e) {
    Collection<AuditEventValueObject> result = new HashSet<>();
    Auditable entity = this.getAuditable(e);
    if (entity == null) {
        return result;
    }
    assert entity.getAuditTrail().getId() != null;
    Collection<AuditEvent> events = auditEventService.getEvents(entity);
    for (AuditEvent ev : events) {
        if (ev == null)
            continue;
        /*
             * Hide generic update events.
             */
        if (ev.getAction().equals(AuditAction.UPDATE) && ev.getEventType() == null)
            continue;
        result.add(new AuditEventValueObject(ev));
    }
    return result;
}
Also used : AbstractAuditable(ubic.gemma.model.common.AbstractAuditable) Auditable(ubic.gemma.model.common.Auditable) AuditEventValueObject(ubic.gemma.model.common.auditAndSecurity.AuditEventValueObject) AuditEvent(ubic.gemma.model.common.auditAndSecurity.AuditEvent) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)2 AuditEvent (ubic.gemma.model.common.auditAndSecurity.AuditEvent)2 AuditEventValueObject (ubic.gemma.model.common.auditAndSecurity.AuditEventValueObject)2 AbstractAuditable (ubic.gemma.model.common.AbstractAuditable)1 Auditable (ubic.gemma.model.common.Auditable)1