use of com.odysseusinc.arachne.portal.service.impl.antivirus.events.AntivirusJobResponseEventBase 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);
}
Aggregations