diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/DocumentConversionServiceImp.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/DocumentConversionServiceImp.java index 2f41cb3bca4538eadd8d55b4ad2d23bbc9efe36b..3f979ef8b7250ab93df382278a189f7bec7af7b8 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/DocumentConversionServiceImp.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/DocumentConversionServiceImp.java @@ -63,10 +63,16 @@ public class DocumentConversionServiceImp implements DocumentConversionService { pres = officeToPdfConversionService.convertOfficeToPdf(pres); OfficeToPdfConversionSuccessFilter ocsf = new OfficeToPdfConversionSuccessFilter(gw); if (ocsf.didConversionSucceed(pres)) { + ocsf.sendProgress(pres); // Successfully converted to pdf. Call the process again, this time it // should be handled by // the PDF conversion service. processDocument(pres); + } else { + // Send notification that office to pdf conversion failed. + // The cause should have been set by the previous step. + // (ralam feb 15, 2020) + ocsf.sendProgress(pres); } } else if (SupportedFileTypes.isPdfFile(fileType)) { pdfToSwfSlidesGenerationService.generateSlides(pres); diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/OfficeToPdfConversionSuccessFilter.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/OfficeToPdfConversionSuccessFilter.java index dab81a405b8a8f4b8548d4bdcbb4c0cdb108c530..5c4d48ca07961fd02f158418fa798a6038077a6d 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/OfficeToPdfConversionSuccessFilter.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/OfficeToPdfConversionSuccessFilter.java @@ -48,32 +48,19 @@ public class OfficeToPdfConversionSuccessFilter { } public boolean didConversionSucceed(UploadedPresentation pres) { - notifyProgressListener(pres); return ConversionMessageConstants.OFFICE_DOC_CONVERSION_SUCCESS_KEY.equals(pres.getConversionStatus()); } - private void notifyProgressListener(UploadedPresentation pres) { - Map<String, Object> msg = new HashMap<String, Object>(); - msg.put("conference", pres.getMeetingId()); - msg.put("room", pres.getMeetingId()); - msg.put("returnCode", "CONVERT"); - msg.put("presentationId", pres.getId()); - msg.put("podId", pres.getPodId()); - msg.put("presentationName", pres.getId()); - msg.put("filename", pres.getName()); - msg.put("message", conversionMessagesMap.get(pres.getConversionStatus())); - msg.put("messageKey", pres.getConversionStatus()); - - log.info("Notifying of {} for {}", pres.getConversionStatus(), pres.getUploadedFile().getAbsolutePath()); - sendProgress(pres); - } - - public void sendProgress(UploadedPresentation pres) { OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getPodId(), - pres.getMeetingId(),pres.getId(), pres.getId(), - pres.getName(), "notUsedYet", "notUsedYet", - pres.isDownloadable(), pres.getConversionStatus()); + pres.getMeetingId(), + pres.getId(), + pres.getId(), + pres.getName(), + "notUsedYet", + "notUsedYet", + pres.isDownloadable(), + pres.getConversionStatus()); gw.sendDocConversionMsg(progress); } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/OfficeToPdfConversionService.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/OfficeToPdfConversionService.java index 841582ec3541755836f5e1c22976ad921c339c57..d182dcb2ff3347d8f303b2fa70fe6e71f410011b 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/OfficeToPdfConversionService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/OfficeToPdfConversionService.java @@ -95,6 +95,8 @@ public class OfficeToPdfConversionService { Gson gson = new Gson(); String logStr = gson.toJson(logData); log.warn(" --analytics-- data={}", logStr); + pres.setConversionStatus(ConversionMessageConstants.OFFICE_DOC_CONVERSION_FAILED_KEY); + return pres; } } return pres;