Package org.bigbluebutton.presentation.ConversionUpdateMessage

Examples of org.bigbluebutton.presentation.ConversionUpdateMessage.MessageBuilder


    }
    return supported;
  }
 
  private void notifyProgressListener(boolean supported, UploadedPresentation pres) {
    MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
           
    if (supported) {
      builder.messageKey(ConversionMessageConstants.SUPPORTED_DOCUMENT_KEY);
    } else {
      builder.messageKey(ConversionMessageConstants.UNSUPPORTED_DOCUMENT_KEY);
    }
   
    if(messagingService !=null){
      Gson gson= new Gson();
      String updateMsg=gson.toJson(builder.build().getMessage());
      log.debug("sending: "+updateMsg);
      messagingService.send(MessagingConstants.PRESENTATION_CHANNEL, updateMsg);
    } else {
      log.warn("MessagingService has not been set!");
    }
View Full Code Here


    }
    return false;
  }
 
  private void sendFailedToCountPageMessage(CountingPageException e, UploadedPresentation pres) {
    MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
   
    if (e.getExceptionType() == CountingPageException.ExceptionType.PAGE_COUNT_EXCEPTION) {
      builder.messageKey(ConversionMessageConstants.PAGE_COUNT_FAILED_KEY);     
    } else if (e.getExceptionType() == CountingPageException.ExceptionType.PAGE_EXCEEDED_EXCEPTION) {
      builder.numberOfPages(pres.getNumberOfPages());
      builder.maxNumberPages(e.getMaxNumberOfPages());
      builder.messageKey(ConversionMessageConstants.PAGE_COUNT_EXCEEDED_KEY);
    }
    notifier.sendConversionUpdateMessage(builder.build().getMessage());
  }
View Full Code Here

  public void sendConversionUpdateMessage(Map<String, Object> message) {
    notifyProgressListener(message);
  }
 
  public void sendConversionUpdateMessage(int slidesCompleted, UploadedPresentation pres) {
    MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
    builder.messageKey(ConversionMessageConstants.GENERATED_SLIDE_KEY);
    builder.numberOfPages(pres.getNumberOfPages());
    builder.pagesCompleted(slidesCompleted);
    notifyProgressListener(builder.build().getMessage());
  }
View Full Code Here

    builder.pagesCompleted(slidesCompleted);
    notifyProgressListener(builder.build().getMessage());
  }
 
  public void sendCreatingThumbnailsUpdateMessage(UploadedPresentation pres) {
    MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
    builder.messageKey(ConversionMessageConstants.GENERATING_THUMBNAIL_KEY);
    notifyProgressListener(builder.build().getMessage());   
  }
View Full Code Here

    String xml = generatedSlidesInfoHelper.generateUploadedPresentationInfo(pres);
   
   
    String escape_xml = StringEscapeUtils.escapeXml(xml);
   
    MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
    builder.messageKey(ConversionMessageConstants.CONVERSION_COMPLETED_KEY);   
    builder.slidesInfo(escape_xml);
    builder.numberOfPages(pres.getNumberOfPages());
    notifyProgressListener(builder.build().getMessage())
  }
View Full Code Here

  public void setGeneratedSlidesInfoHelper(GeneratedSlidesInfoHelper helper) {
    generatedSlidesInfoHelper = helper;
  }

  public void sendCreatingTextFilesUpdateMessage(UploadedPresentation pres) {
    MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
    builder.messageKey(ConversionMessageConstants.GENERATING_TEXTFILES_KEY);
    notifyProgressListener(builder.build().getMessage())
  }
View Full Code Here

    }
    return supported;
  }
 
  private void notifyProgressListener(boolean supported, UploadedPresentation pres) {
    MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
           
    if (supported) {
      builder.messageKey(ConversionMessageConstants.SUPPORTED_DOCUMENT_KEY);
    } else {
      builder.messageKey(ConversionMessageConstants.UNSUPPORTED_DOCUMENT_KEY);
    }
   
    if(messagingService !=null){
      Gson gson= new Gson();
      String updateMsg=gson.toJson(builder.build().getMessage());
      log.debug("sending: "+updateMsg);
      messagingService.send(MessagingConstants.TO_PRESENTATION_CHANNEL, updateMsg);
    } else {
      log.warn("MessagingService has not been set!");
    }
View Full Code Here

    }
    return false;
  }
 
  private void sendFailedToCountPageMessage(CountingPageException e, UploadedPresentation pres) {
    MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
   
    if (e.getExceptionType() == CountingPageException.ExceptionType.PAGE_COUNT_EXCEPTION) {
      builder.messageKey(ConversionMessageConstants.PAGE_COUNT_FAILED_KEY);     
    } else if (e.getExceptionType() == CountingPageException.ExceptionType.PAGE_EXCEEDED_EXCEPTION) {
      builder.numberOfPages(pres.getNumberOfPages());
      builder.maxNumberPages(e.getMaxNumberOfPages());
      builder.messageKey(ConversionMessageConstants.PAGE_COUNT_EXCEEDED_KEY);
    }
    notifier.sendConversionUpdateMessage(builder.build().getMessage());
  }
View Full Code Here

  public void sendConversionUpdateMessage(Map<String, Object> message) {
    notifyProgressListener(message);
  }
 
  public void sendConversionUpdateMessage(int slidesCompleted, UploadedPresentation pres) {
    MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
    builder.messageKey(ConversionMessageConstants.GENERATED_SLIDE_KEY);
    builder.numberOfPages(pres.getNumberOfPages());
    builder.pagesCompleted(slidesCompleted);
    notifyProgressListener(builder.build().getMessage());
  }
View Full Code Here

    builder.pagesCompleted(slidesCompleted);
    notifyProgressListener(builder.build().getMessage());
  }
 
  public void sendCreatingThumbnailsUpdateMessage(UploadedPresentation pres) {
    MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
    builder.messageKey(ConversionMessageConstants.GENERATING_THUMBNAIL_KEY);
    notifyProgressListener(builder.build().getMessage());   
  }
View Full Code Here

TOP

Related Classes of org.bigbluebutton.presentation.ConversionUpdateMessage.MessageBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.