Skip to content

Commit

Permalink
[refactor-msg-builder] - refactor of OfficeDocConversionProgress name
Browse files Browse the repository at this point in the history
  • Loading branch information
GuiLeme committed Aug 15, 2022
1 parent bd17f77 commit 2aa7226
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.Map;

import org.bigbluebutton.api2.IBbbWebApiGWApp;
import org.bigbluebutton.presentation.messages.OfficeDocConversionProgress;
import org.bigbluebutton.presentation.messages.DocConversionProgress;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -52,7 +52,7 @@ public boolean didConversionSucceed(UploadedPresentation pres) {
}

public void sendProgress(UploadedPresentation pres) {
OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getPodId(),
DocConversionProgress progress = new DocConversionProgress(pres.getPodId(),
pres.getMeetingId(),
pres.getId(),
pres.getId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import org.apache.commons.io.FilenameUtils;
import org.bigbluebutton.api2.IBbbWebApiGWApp;
import org.bigbluebutton.presentation.messages.OfficeDocConversionProgress;
import org.bigbluebutton.presentation.messages.DocConversionProgress;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -59,7 +59,7 @@ private void notifyProgressListener(boolean supported, UploadedPresentation pres
}

if (gw != null) {
OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getPodId(), pres.getMeetingId(),
DocConversionProgress progress = new DocConversionProgress(pres.getPodId(), pres.getMeetingId(),
pres.getId(), pres.getId(),
pres.getName(), "notUsedYet", "notUsedYet",
pres.isDownloadable(), pres.isRemovable(), msgKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void sendConversionUpdateMessage(int slidesCompleted, UploadedPresentatio
}

public void sendCreatingThumbnailsUpdateMessage(UploadedPresentation pres) {
OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getPodId(), pres.getMeetingId(),
DocConversionProgress progress = new DocConversionProgress(pres.getPodId(), pres.getMeetingId(),
pres.getId(), pres.getId(),
pres.getName(), "notUsedYet", "notUsedYet",
pres.isDownloadable(), pres.isRemovable(), ConversionMessageConstants.GENERATING_THUMBNAIL_KEY);
Expand Down Expand Up @@ -105,15 +105,15 @@ public void setGeneratedSlidesInfoHelper(GeneratedSlidesInfoHelper helper) {
}

public void sendCreatingTextFilesUpdateMessage(UploadedPresentation pres) {
OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getPodId(), pres.getMeetingId(),
DocConversionProgress progress = new DocConversionProgress(pres.getPodId(), pres.getMeetingId(),
pres.getId(), pres.getId(),
pres.getName(), "notUsedYet", "notUsedYet",
pres.isDownloadable(), pres.isRemovable(), ConversionMessageConstants.GENERATING_TEXTFILES_KEY);
messagingService.sendDocConversionMsg(progress);
}

public void sendCreatingSvgImagesUpdateMessage(UploadedPresentation pres) {
OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getPodId(), pres.getMeetingId(),
DocConversionProgress progress = new DocConversionProgress(pres.getPodId(), pres.getMeetingId(),
pres.getId(), pres.getId(),
pres.getName(), "notUsedYet", "notUsedYet",
pres.isDownloadable(), pres.isRemovable(), ConversionMessageConstants.GENERATING_SVGIMAGES_KEY);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
package org.bigbluebutton.presentation.messages;

public class OfficeDocConversionProgress implements IDocConversionMsg {
public final String podId;
public final String meetingId;
public final String presId;
public final String presInstance;
public final String filename;
public final String uploaderId;
public final String authzToken;
public final Boolean downloadable;
public final Boolean removable;
public final String key;

public OfficeDocConversionProgress(String podId, String meetingId, String presId, String presInstance,
String filename, String uploaderId, String authzToken,
Boolean downloadable, Boolean removable, String key) {
this.podId = podId;
this.meetingId = meetingId;
this.presId = presId;
this.presInstance = presInstance;
this.filename = filename;
this.uploaderId = uploaderId;
this.authzToken = authzToken;
this.downloadable = downloadable;
this.removable = removable;
this.key = key;
}
}
package org.bigbluebutton.presentation.messages;

public class DocConversionProgress implements IDocConversionMsg {
public final String podId;
public final String meetingId;
public final String presId;
public final String presInstance;
public final String filename;
public final String uploaderId;
public final String authzToken;
public final Boolean downloadable;
public final Boolean removable;
public final String key;

public DocConversionProgress(String podId, String meetingId, String presId, String presInstance,
String filename, String uploaderId, String authzToken,
Boolean downloadable, Boolean removable, String key) {
this.podId = podId;
this.meetingId = meetingId;
this.presId = presId;
this.presInstance = presInstance;
this.filename = filename;
this.uploaderId = uploaderId;
this.authzToken = authzToken;
this.downloadable = downloadable;
this.removable = removable;
this.key = key;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ class BbbWebApiGWApp(
// Send new event with page urls
val newEvent = MsgBuilder.buildPresentationPageConvertedSysMsg(msg.asInstanceOf[DocPageGeneratedProgress])
msgToAkkaAppsEventBus.publish(MsgToAkkaApps(toAkkaAppsChannel, newEvent))
} else if (msg.isInstanceOf[OfficeDocConversionProgress]) {
val event = MsgBuilder.buildPresentationConversionUpdateSysPubMsg(msg.asInstanceOf[OfficeDocConversionProgress])
} else if (msg.isInstanceOf[DocConversionProgress]) {
val event = MsgBuilder.buildPresentationConversionUpdateSysPubMsg(msg.asInstanceOf[DocConversionProgress])
msgToAkkaAppsEventBus.publish(MsgToAkkaApps(toAkkaAppsChannel, event))
} else if (msg.isInstanceOf[DocPageCompletedProgress]) {
val event = MsgBuilder.buildPresentationConversionCompletedSysPubMsg(msg.asInstanceOf[DocPageCompletedProgress])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ object MsgBuilder {
BbbCommonEnvCoreMsg(envelope, req)
}

def buildPresentationConversionUpdateSysPubMsg(msg: OfficeDocConversionProgress): BbbCommonEnvCoreMsg = {
def buildPresentationConversionUpdateSysPubMsg(msg: DocConversionProgress): BbbCommonEnvCoreMsg = {
val routing = collection.immutable.HashMap("sender" -> "bbb-web")
val envelope = BbbCoreEnvelope(PresentationConversionUpdateSysPubMsg.NAME, routing)
val header = BbbClientMsgHeader(PresentationConversionUpdateSysPubMsg.NAME, msg.meetingId, msg.authzToken)
Expand Down

0 comments on commit 2aa7226

Please sign in to comment.