}
}
@Override
public void addEmptyScanToQueue(Integer emptyScanId) {
EmptyScan emptyScan = emptyScanDao.retrieveById(emptyScanId);
if (emptyScan.getAlreadyProcessed() ||
emptyScan.getApplicationChannel() == null ||
emptyScan.getApplicationChannel().getId() == null ||
emptyScan.getApplicationChannel().getApplication() == null ||
emptyScan.getApplicationChannel().getApplication().getId() == null ||
emptyScan.getApplicationChannel().getApplication().getOrganization() == null ||
emptyScan.getApplicationChannel().getApplication().getOrganization().getId() == null ||
emptyScan.getFileName() == null) {
LOG.warn("The empty scan was not added to the queue. It was either already processed or incorrectly configured.");
return;
}
ApplicationChannel applicationChannel = emptyScan.getApplicationChannel();
Integer appId = applicationChannel.getApplication().getId();
Integer orgId = applicationChannel.getApplication()
.getOrganization().getId();
String fileName = emptyScan.getFileName();
queueSender.addScanToQueue(fileName, applicationChannel.getId(), orgId, appId, null, applicationChannel);
emptyScan.setAlreadyProcessed(true);
emptyScanDao.saveOrUpdate(emptyScan);
}