Search in sources :

Example 1 with AntivirusJobPaperPaperFileResponseEvent

use of com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobPaperPaperFileResponseEvent in project ArachneCentralAPI by OHDSI.

the class AntivirusServiceImpl method publishResponse.

private void publishResponse(final AntivirusJobFileType fileType, final Long fileId, final AntivirusStatus status, final String description) {
    AntivirusJobResponse antivirusJobResponse = new AntivirusJobResponse(fileId, status, description);
    AntivirusJobResponseEventBase antivirusJobResponseEventBase;
    switch(fileType) {
        case STUDY_FILE:
            antivirusJobResponseEventBase = new AntivirusJobStudyFileResponseEvent(this, antivirusJobResponse);
            break;
        case PAPER_PAPER_FILE:
            antivirusJobResponseEventBase = new AntivirusJobPaperPaperFileResponseEvent(this, antivirusJobResponse);
            break;
        case PAPER_PROTOCOL_FILE:
            antivirusJobResponseEventBase = new AntivirusJobPaperProtocolFileResponseEvent(this, antivirusJobResponse);
            break;
        case ANALYSIS_FILE:
            antivirusJobResponseEventBase = new AntivirusJobAnalysisFileResponseEvent(this, antivirusJobResponse);
            break;
        default:
            throw new IllegalArgumentException();
    }
    eventPublisher.publishEvent(antivirusJobResponseEventBase);
}
Also used : AntivirusJobStudyFileResponseEvent(com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobStudyFileResponseEvent) AntivirusJobPaperProtocolFileResponseEvent(com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobPaperProtocolFileResponseEvent) AntivirusJobResponseEventBase(com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobResponseEventBase) AntivirusJobResponse(com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobResponse) AntivirusJobAnalysisFileResponseEvent(com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobAnalysisFileResponseEvent) AntivirusJobPaperPaperFileResponseEvent(com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobPaperPaperFileResponseEvent)

Aggregations

AntivirusJobAnalysisFileResponseEvent (com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobAnalysisFileResponseEvent)1 AntivirusJobPaperPaperFileResponseEvent (com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobPaperPaperFileResponseEvent)1 AntivirusJobPaperProtocolFileResponseEvent (com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobPaperProtocolFileResponseEvent)1 AntivirusJobResponse (com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobResponse)1 AntivirusJobResponseEventBase (com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobResponseEventBase)1 AntivirusJobStudyFileResponseEvent (com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobStudyFileResponseEvent)1