Merge branch 'master' of https://github.com/bigbluebutton/bigbluebutton into user-manage-b

This commit is contained in:
Bobak Oftadeh 2018-10-12 09:17:19 -07:00
commit 21b84a5303
225 changed files with 3074 additions and 2246 deletions

View File

@ -6,7 +6,7 @@ organization := "org.bigbluebutton"
version := "0.0.2"
scalaVersion := "2.12.2"
scalaVersion := "2.12.6"
scalacOptions ++= Seq(
"-unchecked",
@ -38,15 +38,15 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console",
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports")
val akkaVersion = "2.5.1"
val scalaTestVersion = "3.0.1"
val akkaVersion = "2.5.14"
val scalaTestVersion = "3.0.5"
libraryDependencies ++= {
Seq(
"ch.qos.logback" % "logback-classic" % "1.0.13" % "runtime",
"ch.qos.logback" % "logback-classic" % "1.2.3" % "runtime",
"junit" % "junit" % "4.11",
"commons-codec" % "commons-codec" % "1.10",
"org.apache.commons" % "commons-lang3" % "3.2"
"commons-codec" % "commons-codec" % "1.11",
"org.apache.commons" % "commons-lang3" % "3.7"
)
}
@ -66,14 +66,14 @@ libraryDependencies += "com.typesafe.akka" % "akka-slf4j_2.12" % akkaVersion
// https://mvnrepository.com/artifact/com.github.etaty/rediscala_2.12
libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0"
libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.8"
libraryDependencies += "com.google.code.gson" % "gson" % "2.8.0"
libraryDependencies += "joda-time" % "joda-time" % "2.9.9"
libraryDependencies += "io.spray" % "spray-json_2.12" % "1.3.3"
libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.11"
libraryDependencies += "com.google.code.gson" % "gson" % "2.8.5"
libraryDependencies += "joda-time" % "joda-time" % "2.10"
libraryDependencies += "io.spray" % "spray-json_2.12" % "1.3.4"
libraryDependencies += "org.parboiled" % "parboiled-scala_2.12" % "1.1.8"
// https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-scala_2.12
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.8.8"
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.9.6"
// For generating test reports
@ -87,7 +87,7 @@ libraryDependencies += "org.scalactic" % "scalactic_2.12" % "3.0.3" % "test"
// https://mvnrepository.com/artifact/org.scalatest/scalatest_2.12
libraryDependencies += "org.scalatest" % "scalatest_2.12" % scalaTestVersion % "test"
libraryDependencies += "org.mockito" % "mockito-core" % "2.7.22" % "test"
libraryDependencies += "org.mockito" % "mockito-core" % "2.21.0" % "test"
@ -143,5 +143,3 @@ mappings in Universal <+= (packageBin in Compile, sourceDirectory ) map { (_, sr
val logConf = src / "main" / "resources" / "logback.xml"
logConf -> "conf/logback.xml"
}
debianPackageDependencies in Debian ++= Seq("java7-runtime-headless", "bash")

View File

@ -1,9 +1,11 @@
addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
//addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.6")
addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

View File

@ -23,16 +23,14 @@ object BigBlueButtonActor extends SystemConfiguration {
system: ActorSystem,
eventBus: InternalEventBus,
bbbMsgBus: BbbMsgRouterEventBus,
outGW: OutMessageGateway
): Props =
outGW: OutMessageGateway): Props =
Props(classOf[BigBlueButtonActor], system, eventBus, bbbMsgBus, outGW)
}
class BigBlueButtonActor(
val system: ActorSystem,
val eventBus: InternalEventBus, val bbbMsgBus: BbbMsgRouterEventBus,
val outGW: OutMessageGateway
) extends Actor
val outGW: OutMessageGateway) extends Actor
with ActorLogging with SystemConfiguration {
implicit def executionContext = system.dispatcher

View File

@ -6,14 +6,12 @@ import org.bigbluebutton.core.bus._
object OutMessageGatewayImp {
def apply(
outBus2: OutEventBus2
) =
outBus2: OutEventBus2) =
new OutMessageGatewayImp(outBus2)
}
class OutMessageGatewayImp(
outBus2: OutEventBus2
) extends OutMessageGateway
outBus2: OutEventBus2) extends OutMessageGateway
with SystemConfiguration {
def send(msg: BbbCommonEnvCoreMsg): Unit = {

View File

@ -11,18 +11,16 @@ object BreakoutModel {
sequence: Integer,
freeJoin: Boolean,
voiceConf: String,
assignedUsers: Vector[String]
): BreakoutRoom2x = {
assignedUsers: Vector[String]): BreakoutRoom2x = {
new BreakoutRoom2x(id, externalId, name, parentId, sequence, freeJoin, voiceConf, assignedUsers, Vector(), Vector(), None, false)
}
}
case class BreakoutModel(
startedOn: Option[Long],
durationInMinutes: Int,
rooms: Map[String, BreakoutRoom2x]
) {
startedOn: Option[Long],
durationInMinutes: Int,
rooms: Map[String, BreakoutRoom2x]) {
def find(id: String): Option[BreakoutRoom2x] = {
rooms.get(id)

View File

@ -57,8 +57,7 @@ object BreakoutRoomsUtil {
"isBreakout" -> urlEncode(isBreakout.toString()),
"meetingID" -> urlEncode(breakoutMeetingId),
"password" -> urlEncode(password),
"redirect" -> urlEncode("true")
)
"redirect" -> urlEncode("true"))
(params, params + ("joinViaHtml5" -> urlEncode("true")))
}

View File

@ -63,7 +63,6 @@ trait BreakoutHdlrHelpers extends SystemConfiguration {
eventBus.publish(BigBlueButtonEvent(
liveMeeting.props.breakoutProps.parentId,
new BreakoutRoomUsersUpdateInternalMsg(liveMeeting.props.breakoutProps.parentId, liveMeeting.props.meetingProp.intId,
breakoutUsers, breakoutVoiceUsers)
))
breakoutUsers, breakoutVoiceUsers)))
}
}

View File

@ -78,8 +78,7 @@ trait BreakoutRoomCreatedMsgHdlr extends BreakoutHdlrHelpers {
def build(meetingId: String, breakout: BreakoutRoomInfo): BbbCommonEnvCoreMsg = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, "not-used"
)
liveMeeting.props.meetingProp.intId, "not-used")
val envelope = BbbCoreEnvelope(BreakoutRoomStartedEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(BreakoutRoomStartedEvtMsg.NAME, liveMeeting.props.meetingProp.intId, "not-used")

View File

@ -24,8 +24,7 @@ trait CreateBreakoutRoomsCmdMsgHdlr extends RightsManagementTrait {
state.breakout match {
case Some(breakout) =>
log.warning(
"CreateBreakoutRooms event received while breakout created for meeting {}", liveMeeting.props.meetingProp.intId
)
"CreateBreakoutRooms event received while breakout created for meeting {}", liveMeeting.props.meetingProp.intId)
state
case None =>
processRequest(msg, state)
@ -60,8 +59,7 @@ trait CreateBreakoutRoomsCmdMsgHdlr extends RightsManagementTrait {
msg.body.durationInMinutes,
liveMeeting.props.password.moderatorPass,
liveMeeting.props.password.viewerPass,
presId, presSlide, msg.body.record
)
presId, presSlide, msg.body.record)
val event = buildCreateBreakoutRoomSysCmdMsg(liveMeeting.props.meetingProp.intId, roomDetail)
outGW.send(event)

View File

@ -34,8 +34,7 @@ class CaptionApp2x(implicit val context: ActorContext) extends RightsManagementT
def broadcastEvent(msg: EditCaptionHistoryPubMsg): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, msg.header.userId
)
liveMeeting.props.meetingProp.intId, msg.header.userId)
val envelope = BbbCoreEnvelope(EditCaptionHistoryEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(EditCaptionHistoryEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)

View File

@ -28,8 +28,7 @@ trait CreateDefaultPublicGroupChat {
val respMsg = buildGroupChatCreatedEvtMsg(
liveMeeting.props.meetingProp.intId,
SystemUser.ID,
groupChat
)
groupChat)
bus.outGW.send(respMsg)
val groupChats = state.groupChats.add(groupChat)

View File

@ -27,8 +27,7 @@ trait GetGroupChatMsgsReqMsgHdlr {
m.sender, m.color, m.message))
val respMsg = buildGetGroupChatMsgsRespMsg(
liveMeeting.props.meetingProp.intId,
msg.header.userId, msgs, gc.id
)
msg.header.userId, msgs, gc.id)
bus.outGW.send(respMsg)
}
}

View File

@ -88,8 +88,7 @@ trait SendGroupChatMessageMsgHdlr {
val event = buildGroupChatMessageBroadcastEvtMsg(
liveMeeting.props.meetingProp.intId,
msg.header.userId, msg.body.chatId, gcm
)
msg.header.userId, msg.body.chatId, gcm)
bus.outGW.send(event)

View File

@ -31,8 +31,7 @@ trait BroadcastLayoutMsgHdlr extends RightsManagementTrait {
val body = BroadcastLayoutEvtMsgBody(
Layouts.getCurrentLayout(liveMeeting.layouts),
MeetingStatus2x.getPermissions(liveMeeting.status).lockedLayout,
Layouts.getLayoutSetter(liveMeeting.layouts), affectedUsers
)
Layouts.getLayoutSetter(liveMeeting.layouts), affectedUsers)
val event = BroadcastLayoutEvtMsg(header, body)
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)

View File

@ -22,8 +22,7 @@ trait GetCurrentLayoutReqMsgHdlr {
val body = GetCurrentLayoutRespMsgBody(
Layouts.getCurrentLayout(liveMeeting.layouts),
MeetingStatus2x.getPermissions(liveMeeting.status).lockedLayout,
Layouts.getLayoutSetter(liveMeeting.layouts)
)
Layouts.getLayoutSetter(liveMeeting.layouts))
val event = GetCurrentLayoutRespMsg(header, body)
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)

View File

@ -13,8 +13,7 @@ trait ValidateConnAuthTokenSysMsgHdlr {
val regUser = RegisteredUsers.getRegisteredUserWithToken(
msg.body.authToken,
msg.body.userId,
liveMeeting.registeredUsers
)
liveMeeting.registeredUsers)
regUser match {
case Some(u) =>

View File

@ -11,8 +11,7 @@ trait PreuploadedPresentationsPubMsgHdlr {
def handle(
msg: PreuploadedPresentationsSysPubMsg,
liveMeeting: LiveMeeting, bus: MessageBus
): Unit = {
liveMeeting: LiveMeeting, bus: MessageBus): Unit = {
val presos = new collection.mutable.HashMap[String, Presentation]

View File

@ -17,8 +17,7 @@ trait CreateDefaultPresentationPod {
liveMeeting.props.meetingProp.intId,
resultPod.currentPresenter,
resultPod.id,
SYSTEM_ID
)
SYSTEM_ID)
bus.outGW.send(respMsg)
val pods = state.presentationPodManager.addPod(resultPod)

View File

@ -16,8 +16,7 @@ trait CreateNewPresentationPodPubMsgHdlr extends RightsManagementTrait {
if (permissionFailed(
PermissionCheck.MOD_LEVEL,
PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId
)) {
PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId)) {
val meetingId = liveMeeting.props.meetingProp.intId
val reason = "No permission to create new presentation pod."
PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, bus.outGW, liveMeeting)
@ -30,8 +29,7 @@ trait CreateNewPresentationPodPubMsgHdlr extends RightsManagementTrait {
liveMeeting.props.meetingProp.intId,
resultPod.currentPresenter,
resultPod.id,
msg.header.userId
)
msg.header.userId)
bus.outGW.send(respMsg)
val pods = state.presentationPodManager.addPod(resultPod)

View File

@ -4,7 +4,7 @@ import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.domain.MeetingState2x
import org.bigbluebutton.core.running.LiveMeeting
import org.bigbluebutton.common2.domain.{ PageVO, PresentationVO }
import org.bigbluebutton.common2.domain.{ PageVO }
import org.bigbluebutton.core.models.PresentationInPod
trait PresentationConversionCompletedSysPubMsgHdlr {
@ -13,8 +13,7 @@ trait PresentationConversionCompletedSysPubMsgHdlr {
def handle(
msg: PresentationConversionCompletedSysPubMsg, state: MeetingState2x,
liveMeeting: LiveMeeting, bus: MessageBus
): MeetingState2x = {
liveMeeting: LiveMeeting, bus: MessageBus): MeetingState2x = {
val meetingId = liveMeeting.props.meetingProp.intId

View File

@ -14,13 +14,11 @@ trait PresentationConversionUpdatePubMsgHdlr {
def broadcastEvent(msg: PresentationConversionUpdateSysPubMsg): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, msg.header.userId
)
liveMeeting.props.meetingProp.intId, msg.header.userId)
val envelope = BbbCoreEnvelope(PresentationConversionUpdateEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(
PresentationConversionUpdateEvtMsg.NAME,
liveMeeting.props.meetingProp.intId, msg.header.userId
)
liveMeeting.props.meetingProp.intId, msg.header.userId)
val body = PresentationConversionUpdateEvtMsgBody(msg.body.podId, msg.body.messageKey,
msg.body.code, msg.body.presentationId, msg.body.presName)

View File

@ -10,19 +10,16 @@ trait PresentationPageCountErrorPubMsgHdlr {
def handle(
msg: PresentationPageCountErrorSysPubMsg, state: MeetingState2x,
liveMeeting: LiveMeeting, bus: MessageBus
): MeetingState2x = {
liveMeeting: LiveMeeting, bus: MessageBus): MeetingState2x = {
def broadcastEvent(msg: PresentationPageCountErrorSysPubMsg): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, msg.header.userId
)
liveMeeting.props.meetingProp.intId, msg.header.userId)
val envelope = BbbCoreEnvelope(PresentationPageCountErrorEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(
PresentationPageCountErrorEvtMsg.NAME,
liveMeeting.props.meetingProp.intId, msg.header.userId
)
liveMeeting.props.meetingProp.intId, msg.header.userId)
val body = PresentationPageCountErrorEvtMsgBody(msg.body.podId, msg.body.messageKey, msg.body.code, msg.body.presentationId, msg.body.numberOfPages, msg.body.maxNumberPages, msg.body.presName)
val event = PresentationPageCountErrorEvtMsg(header, body)

View File

@ -14,13 +14,11 @@ trait PresentationPageGeneratedPubMsgHdlr {
def broadcastEvent(msg: PresentationPageGeneratedSysPubMsg): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, msg.header.userId
)
liveMeeting.props.meetingProp.intId, msg.header.userId)
val envelope = BbbCoreEnvelope(PresentationPageGeneratedEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(
PresentationPageGeneratedEvtMsg.NAME,
liveMeeting.props.meetingProp.intId, msg.header.userId
)
liveMeeting.props.meetingProp.intId, msg.header.userId)
val body = PresentationPageGeneratedEvtMsgBody(msg.body.podId, msg.body.messageKey, msg.body.code, msg.body.presentationId, msg.body.numberOfPages, msg.body.pagesCompleted, msg.body.presName)
val event = PresentationPageGeneratedEvtMsg(header, body)

View File

@ -11,12 +11,10 @@ object PresentationSender {
podId: String, userId: String,
presentationId: String,
downloadable: Boolean,
presFilename: String
): Unit = {
presFilename: String): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
meetingId, userId
)
meetingId, userId)
val envelope = BbbCoreEnvelope(SetPresentationDownloadableEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(SetPresentationDownloadableEvtMsg.NAME, meetingId, userId)
@ -30,12 +28,10 @@ object PresentationSender {
bus: MessageBus,
meetingId: String,
podId: String, userId: String, messageKey: String,
code: String, presentation: PresentationVO
): Unit = {
code: String, presentation: PresentationVO): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
meetingId, userId
)
meetingId, userId)
val envelope = BbbCoreEnvelope(PresentationConversionCompletedEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(PresentationConversionCompletedEvtMsg.NAME, meetingId, userId)

View File

@ -11,8 +11,7 @@ trait RemovePresentationPubMsgHdlr extends RightsManagementTrait {
def handle(
msg: RemovePresentationPubMsg, state: MeetingState2x,
liveMeeting: LiveMeeting, bus: MessageBus
): MeetingState2x = {
liveMeeting: LiveMeeting, bus: MessageBus): MeetingState2x = {
if (filterPresentationMessage(liveMeeting.users2x, msg.header.userId) &&
permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) {
@ -24,8 +23,7 @@ trait RemovePresentationPubMsgHdlr extends RightsManagementTrait {
def broadcastRemovePresentationEvtMsg(podId: String, userId: String, presentationId: String): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, userId
)
liveMeeting.props.meetingProp.intId, userId)
val envelope = BbbCoreEnvelope(RemovePresentationEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(RemovePresentationEvtMsg.NAME, liveMeeting.props.meetingProp.intId, userId)

View File

@ -16,13 +16,11 @@ trait ResizeAndMovePagePubMsgHdlr extends RightsManagementTrait {
def broadcastEvent(msg: ResizeAndMovePagePubMsg, podId: String, page: PageVO): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, msg.header.userId
)
liveMeeting.props.meetingProp.intId, msg.header.userId)
val envelope = BbbCoreEnvelope(ResizeAndMovePageEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(
ResizeAndMovePageEvtMsg.NAME,
liveMeeting.props.meetingProp.intId, msg.header.userId
)
liveMeeting.props.meetingProp.intId, msg.header.userId)
val body = ResizeAndMovePageEvtMsgBody(podId, msg.body.presentationId, page.id,
page.xOffset, page.yOffset, page.widthRatio, page.heightRatio)

View File

@ -12,8 +12,7 @@ trait SetCurrentPagePubMsgHdlr extends RightsManagementTrait {
def handle(
msg: SetCurrentPagePubMsg, state: MeetingState2x,
liveMeeting: LiveMeeting, bus: MessageBus
): MeetingState2x = {
liveMeeting: LiveMeeting, bus: MessageBus): MeetingState2x = {
if (filterPresentationMessage(liveMeeting.users2x, msg.header.userId) &&
permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) {
@ -25,8 +24,7 @@ trait SetCurrentPagePubMsgHdlr extends RightsManagementTrait {
def broadcastSetCurrentPageEvtMsg(podId: String, presentationId: String, pageId: String, userId: String): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, userId
)
liveMeeting.props.meetingProp.intId, userId)
val envelope = BbbCoreEnvelope(SetCurrentPageEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(SetCurrentPageEvtMsg.NAME, liveMeeting.props.meetingProp.intId, userId)

View File

@ -11,8 +11,7 @@ trait SetCurrentPresentationPubMsgHdlr extends RightsManagementTrait {
def handle(
msg: SetCurrentPresentationPubMsg, state: MeetingState2x,
liveMeeting: LiveMeeting, bus: MessageBus
): MeetingState2x = {
liveMeeting: LiveMeeting, bus: MessageBus): MeetingState2x = {
if (filterPresentationMessage(liveMeeting.users2x, msg.header.userId) &&
permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) {

View File

@ -11,8 +11,7 @@ trait SetPresentationDownloadablePubMsgHdlr extends RightsManagementTrait {
def handle(
msg: SetPresentationDownloadablePubMsg, state: MeetingState2x,
liveMeeting: LiveMeeting, bus: MessageBus
): MeetingState2x = {
liveMeeting: LiveMeeting, bus: MessageBus): MeetingState2x = {
val meetingId = liveMeeting.props.meetingProp.intId

View File

@ -13,8 +13,7 @@ trait SetPresenterInPodReqMsgHdlr {
def handle(
msg: SetPresenterInPodReqMsg, state: MeetingState2x,
liveMeeting: LiveMeeting, bus: MessageBus
): MeetingState2x = {
liveMeeting: LiveMeeting, bus: MessageBus): MeetingState2x = {
if (msg.body.podId == PresentationPod.DEFAULT_PRESENTATION_POD) {
// Swith presenter as default presenter pod has changed.
AssignPresenterActionHandler.handleAction(liveMeeting, bus.outGW, msg.header.userId, msg.body.nextPresenterId)
@ -30,8 +29,7 @@ object SetPresenterInPodActionHandler extends RightsManagementTrait {
outGW: OutMsgRouter,
assignedBy: String,
podId: String,
newPresenterId: String
): MeetingState2x = {
newPresenterId: String): MeetingState2x = {
if (permissionFailed(PermissionCheck.MOD_LEVEL, PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, assignedBy)) {
val meetingId = liveMeeting.props.meetingProp.intId
@ -42,8 +40,7 @@ object SetPresenterInPodActionHandler extends RightsManagementTrait {
def broadcastSetPresenterInPodRespMsg(podId: String, nextPresenterId: String, requesterId: String): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, requesterId
)
liveMeeting.props.meetingProp.intId, requesterId)
val envelope = BbbCoreEnvelope(SetPresenterInPodRespMsg.NAME, routing)
val header = BbbClientMsgHeader(SetPresenterInPodRespMsg.NAME, liveMeeting.props.meetingProp.intId, requesterId)

View File

@ -16,8 +16,7 @@ trait GetScreenshareStatusReqMsgHdlr {
val envelope = BbbCoreEnvelope(ScreenshareRtmpBroadcastStartedEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(
ScreenshareRtmpBroadcastStartedEvtMsg.NAME,
liveMeeting.props.meetingProp.intId, "not-used"
)
liveMeeting.props.meetingProp.intId, "not-used")
val voiceConf = ScreenshareModel.getVoiceConf(liveMeeting.screenshareModel)
val screenshareConf = ScreenshareModel.getScreenshareConf(liveMeeting.screenshareModel)

View File

@ -14,13 +14,11 @@ trait ScreenshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, "not-used"
)
liveMeeting.props.meetingProp.intId, "not-used")
val envelope = BbbCoreEnvelope(ScreenshareRtmpBroadcastStartedEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(
ScreenshareRtmpBroadcastStartedEvtMsg.NAME,
liveMeeting.props.meetingProp.intId, "not-used"
)
liveMeeting.props.meetingProp.intId, "not-used")
val body = ScreenshareRtmpBroadcastStartedEvtMsgBody(voiceConf, screenshareConf,
stream, vidWidth, vidHeight, timestamp)

View File

@ -16,13 +16,11 @@ trait ScreenshareRtmpBroadcastStoppedVoiceConfEvtMsgHdlr {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, "not-used"
)
liveMeeting.props.meetingProp.intId, "not-used")
val envelope = BbbCoreEnvelope(ScreenshareRtmpBroadcastStoppedEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(
ScreenshareRtmpBroadcastStoppedEvtMsg.NAME,
liveMeeting.props.meetingProp.intId, "not-used"
)
liveMeeting.props.meetingProp.intId, "not-used")
val body = ScreenshareRtmpBroadcastStoppedEvtMsgBody(voiceConf, screenshareConf,
stream, vidWidth, vidHeight, timestamp)

View File

@ -16,8 +16,7 @@ trait ScreenshareStartedVoiceConfEvtMsgHdlr {
val envelope = BbbCoreEnvelope(ScreenshareStartRtmpBroadcastVoiceConfMsg.NAME, routing)
val header = BbbCoreHeaderWithMeetingId(
ScreenshareStartRtmpBroadcastVoiceConfMsg.NAME,
liveMeeting.props.meetingProp.intId
)
liveMeeting.props.meetingProp.intId)
val body = ScreenshareStartRtmpBroadcastVoiceConfMsgBody(voiceConf: String, screenshareConf: String, url: String, timestamp: String)
val event = ScreenshareStartRtmpBroadcastVoiceConfMsg(header, body)

View File

@ -10,12 +10,10 @@ trait ScreenshareStoppedVoiceConfEvtMsgHdlr {
def handle(
msg: ScreenshareStoppedVoiceConfEvtMsg,
liveMeeting: LiveMeeting, bus: MessageBus
): Unit = {
liveMeeting: LiveMeeting, bus: MessageBus): Unit = {
handleScreenshareStoppedVoiceConfEvtMsg(
msg.body.voiceConf,
msg.body.screenshareConf, liveMeeting, bus
)
msg.body.screenshareConf, liveMeeting, bus)
}
def handleScreenshareStoppedVoiceConfEvtMsg(voiceConf: String, screenshareConf: String,
@ -26,8 +24,7 @@ trait ScreenshareStoppedVoiceConfEvtMsgHdlr {
val envelope = BbbCoreEnvelope(ScreenshareStopRtmpBroadcastVoiceConfMsg.NAME, routing)
val header = BbbCoreHeaderWithMeetingId(
ScreenshareStopRtmpBroadcastVoiceConfMsg.NAME,
liveMeeting.props.meetingProp.intId
)
liveMeeting.props.meetingProp.intId)
val body = ScreenshareStopRtmpBroadcastVoiceConfMsgBody(voiceConf, screenshareConf, url, timestamp)
val event = ScreenshareStopRtmpBroadcastVoiceConfMsg(header, body)

View File

@ -31,8 +31,7 @@ object AssignPresenterActionHandler extends RightsManagementTrait {
// unassign old presenter
val routingUnassign = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, oldPres.intId
)
liveMeeting.props.meetingProp.intId, oldPres.intId)
val envelopeUnassign = BbbCoreEnvelope(PresenterUnassignedEvtMsg.NAME, routingUnassign)
val headerUnassign = BbbClientMsgHeader(PresenterUnassignedEvtMsg.NAME, liveMeeting.props.meetingProp.intId,
oldPres.intId)
@ -47,8 +46,7 @@ object AssignPresenterActionHandler extends RightsManagementTrait {
// set new presenter
val routingAssign = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, newPres.intId
)
liveMeeting.props.meetingProp.intId, newPres.intId)
val envelopeAssign = BbbCoreEnvelope(PresenterAssignedEvtMsg.NAME, routingAssign)
val headerAssign = BbbClientMsgHeader(PresenterAssignedEvtMsg.NAME, liveMeeting.props.meetingProp.intId,
newPres.intId)

View File

@ -26,8 +26,7 @@ trait ChangeLockSettingsInMeetingCmdMsgHdlr extends RightsManagementTrait {
disablePubChat = msg.body.disablePubChat,
lockedLayout = msg.body.lockedLayout,
lockOnJoin = msg.body.lockOnJoin,
lockOnJoinConfigurable = msg.body.lockOnJoinConfigurable
)
lockOnJoinConfigurable = msg.body.lockOnJoinConfigurable)
if (!MeetingStatus2x.permissionsEqual(liveMeeting.status, settings) || !MeetingStatus2x.permisionsInitialized(liveMeeting.status)) {
MeetingStatus2x.initializePermissions(liveMeeting.status)
@ -37,12 +36,10 @@ trait ChangeLockSettingsInMeetingCmdMsgHdlr extends RightsManagementTrait {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
props.meetingProp.intId,
msg.body.setBy
)
msg.body.setBy)
val envelope = BbbCoreEnvelope(
LockSettingsInMeetingChangedEvtMsg.NAME,
routing
)
routing)
val body = LockSettingsInMeetingChangedEvtMsgBody(
disableCam = settings.disableCam,
disableMic = settings.disableMic,
@ -51,13 +48,11 @@ trait ChangeLockSettingsInMeetingCmdMsgHdlr extends RightsManagementTrait {
lockedLayout = settings.lockedLayout,
lockOnJoin = settings.lockOnJoin,
lockOnJoinConfigurable = settings.lockOnJoinConfigurable,
msg.body.setBy
)
msg.body.setBy)
val header = BbbClientMsgHeader(
LockSettingsInMeetingChangedEvtMsg.NAME,
props.meetingProp.intId,
msg.body.setBy
)
msg.body.setBy)
outGW.send(BbbCommonEnvCoreMsg(envelope, LockSettingsInMeetingChangedEvtMsg(header, body)))
}

View File

@ -21,8 +21,7 @@ trait EjectUserFromMeetingCmdMsgHdlr extends RightsManagementTrait {
PermissionCheck.MOD_LEVEL,
PermissionCheck.VIEWER_LEVEL,
liveMeeting.users2x,
msg.header.userId
)) {
msg.header.userId)) {
val reason = "No permission to eject user from meeting."
PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, outGW, liveMeeting)

View File

@ -19,8 +19,7 @@ trait GetLockSettingsReqMsgHdlr {
disableCam = settings.disableCam,
disableMic = settings.disableMic, disablePrivChat = settings.disablePrivChat,
disablePubChat = settings.disablePubChat, lockedLayout = settings.lockedLayout,
lockOnJoin = settings.lockOnJoin, lockOnJoinConfigurable = settings.lockOnJoinConfigurable
)
lockOnJoin = settings.lockOnJoin, lockOnJoinConfigurable = settings.lockOnJoinConfigurable)
val header = BbbClientMsgHeader(GetLockSettingsRespMsg.NAME, meetingId, requestedBy)
val event = GetLockSettingsRespMsg(header, body)

View File

@ -13,8 +13,7 @@ trait MeetingActivityResponseCmdMsgHdlr {
def handleMeetingActivityResponseCmdMsg(
msg: MeetingActivityResponseCmdMsg,
state: MeetingState2x
): MeetingState2x = {
state: MeetingState2x): MeetingState2x = {
processMeetingActivityResponse(liveMeeting.props, outGW, msg)
val tracker = state.inactivityTracker.resetWarningSentAndTimestamp()
state.update(tracker)
@ -23,8 +22,7 @@ trait MeetingActivityResponseCmdMsgHdlr {
def processMeetingActivityResponse(
props: DefaultProps,
outGW: OutMsgRouter,
msg: MeetingActivityResponseCmdMsg
): Unit = {
msg: MeetingActivityResponseCmdMsg): Unit = {
def buildMeetingIsActiveEvtMsg(meetingId: String): BbbCommonEnvCoreMsg = {
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, "not-used")

View File

@ -16,8 +16,7 @@ trait MuteUserCmdMsgHdlr extends RightsManagementTrait {
def handleMuteUserCmdMsg(msg: MuteUserCmdMsg) {
if (msg.body.userId != msg.header.userId && (msg.body.mute == false || permissionFailed(
PermissionCheck.MOD_LEVEL,
PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId
))) {
PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId))) {
val meetingId = liveMeeting.props.meetingProp.intId
val muteUnmuteStr: String = if (msg.body.mute) "mute" else "unmute"
val reason = "No permission to " + muteUnmuteStr + " user."

View File

@ -31,8 +31,7 @@ trait SyncGetUsersMeetingRespMsgHdlr {
locked = u.locked,
presenter = u.presenter,
avatar = u.avatar,
clientType = u.clientType
)
clientType = u.clientType)
}
val body = SyncGetUsersMeetingRespMsgBody(webUsers)

View File

@ -1,6 +1,5 @@
package org.bigbluebutton.core.apps.users
import org.bigbluebutton.common2.domain.MeetingStatus
import org.bigbluebutton.common2.msgs.UserLeaveReqMsg
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.apps.presentationpod.PresentationPodsApp
@ -21,8 +20,7 @@ trait UserLeaveReqMsgHdlr {
def broadcastSetPresenterInPodRespMsg(podId: String, nextPresenterId: String, requesterId: String): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, requesterId
)
liveMeeting.props.meetingProp.intId, requesterId)
val envelope = BbbCoreEnvelope(SetPresenterInPodRespMsg.NAME, routing)
val header = BbbClientMsgHeader(SetPresenterInPodRespMsg.NAME, liveMeeting.props.meetingProp.intId, requesterId)
@ -57,8 +55,7 @@ trait UserLeaveReqMsgHdlr {
screenshareApp2x.handleScreenshareStoppedVoiceConfEvtMsg(
liveMeeting.props.voiceProp.voiceConf,
liveMeeting.props.screenshareProps.screenshareConf,
liveMeeting, msgBus
)
liveMeeting, msgBus)
// request ongoing poll to end
pollApp.stopPoll(state, u.intId, liveMeeting, msgBus)

View File

@ -32,8 +32,7 @@ object UsersApp {
val event = MsgBuilder.buildGuestApprovedEvtMsg(
liveMeeting.props.meetingProp.intId,
guest.guest, guest.status, approvedBy
)
guest.guest, guest.status, approvedBy)
outGW.send(event)
@ -61,8 +60,7 @@ object UsersApp {
// send a message to client
Sender.sendUserEjectedFromMeetingClientEvtMsg(
meetingId,
userId, ejectedBy, reason, reasonCode, outGW
)
userId, ejectedBy, reason, reasonCode, outGW)
}
def sendUserLeftMeetingToAllClients(outGW: OutMsgRouter, meetingId: String,
@ -76,13 +74,11 @@ object UsersApp {
outGW: OutMsgRouter,
meetingId: String,
voiceConf: String,
voiceUserId: String
): Unit = {
voiceUserId: String): Unit = {
val ejectFromVoiceEvent = MsgBuilder.buildEjectUserFromVoiceConfSysMsg(
meetingId,
voiceConf,
voiceUserId
)
voiceUserId)
outGW.send(ejectFromVoiceEvent)
}
@ -108,8 +104,7 @@ object UsersApp {
sendEjectUserFromVoiceToFreeswitch(
outGW,
liveMeeting.props.meetingProp.intId,
liveMeeting.props.voiceProp.voiceConf, vu.voiceUserId
)
liveMeeting.props.voiceProp.voiceConf, vu.voiceUserId)
}
}
@ -118,8 +113,7 @@ object UsersApp {
class UsersApp(
val liveMeeting: LiveMeeting,
val outGW: OutMsgRouter,
val eventBus: InternalEventBus
)(implicit val context: ActorContext)
val eventBus: InternalEventBus)(implicit val context: ActorContext)
extends ValidateAuthTokenReqMsgHdlr
with GetUsersMeetingReqMsgHdlr

View File

@ -26,13 +26,11 @@ trait UserJoinedVoiceConfEvtMsgHdlr extends BreakoutHdlrHelpers with SystemConfi
def broadcastEvent(voiceUserState: VoiceUserState): Unit = {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId, voiceUserState.intId
)
liveMeeting.props.meetingProp.intId, voiceUserState.intId)
val envelope = BbbCoreEnvelope(UserJoinedVoiceConfToClientEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(
UserJoinedVoiceConfToClientEvtMsg.NAME,
liveMeeting.props.meetingProp.intId, voiceUserState.intId
)
liveMeeting.props.meetingProp.intId, voiceUserState.intId)
val body = UserJoinedVoiceConfToClientEvtMsgBody(voiceConf, voiceUserState.intId, voiceUserState.voiceUserId,
voiceUserState.callerName, voiceUserState.callerNum, voiceUserState.muted, voiceUserState.talking,

View File

@ -16,13 +16,11 @@ trait UserMutedInVoiceConfEvtMsgHdlr {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId,
vu.intId
)
vu.intId)
val envelope = BbbCoreEnvelope(UserMutedVoiceEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(
UserMutedVoiceEvtMsg.NAME,
liveMeeting.props.meetingProp.intId, vu.intId
)
liveMeeting.props.meetingProp.intId, vu.intId)
val body = UserMutedVoiceEvtMsgBody(voiceConf = msg.header.voiceConf, intId = vu.intId, voiceUserId = vu.intId, vu.muted)

View File

@ -16,13 +16,11 @@ trait UserTalkingInVoiceConfEvtMsgHdlr {
val routing = Routing.addMsgToClientRouting(
MessageTypes.BROADCAST_TO_MEETING,
liveMeeting.props.meetingProp.intId,
vu.intId
)
vu.intId)
val envelope = BbbCoreEnvelope(UserTalkingVoiceEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(
UserTalkingVoiceEvtMsg.NAME,
liveMeeting.props.meetingProp.intId, vu.intId
)
liveMeeting.props.meetingProp.intId, vu.intId)
val body = UserTalkingVoiceEvtMsgBody(voiceConf = msg.header.voiceConf, intId = vu.intId, voiceUserId = vu.intId, vu.talking)

View File

@ -19,8 +19,7 @@ object VoiceApp {
val event = MsgBuilder.buildStartRecordingVoiceConfSysMsg(
liveMeeting.props.meetingProp.intId,
liveMeeting.props.voiceProp.voiceConf,
stream
)
stream)
outGW.send(event)
}
@ -31,8 +30,7 @@ object VoiceApp {
recStreams foreach { rs =>
val event = MsgBuilder.buildStopRecordingVoiceConfSysMsg(
liveMeeting.props.meetingProp.intId,
liveMeeting.props.voiceProp.voiceConf, rs.stream
)
liveMeeting.props.voiceProp.voiceConf, rs.stream)
outGW.send(event)
}

View File

@ -29,8 +29,7 @@ trait SendWhiteboardAnnotationPubMsgHdlr extends RightsManagementTrait {
if (!excludedWbMsg(msg.body.annotation) && filterWhiteboardMessage(msg.body.annotation.wbId, liveMeeting) && permissionFailed(
PermissionCheck.GUEST_LEVEL,
PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId
)) {
PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) {
//val meetingId = liveMeeting.props.meetingProp.intId
//val reason = "No permission to send a whiteboard annotation."

View File

@ -1,19 +1,18 @@
package org.bigbluebutton.core.domain
case class BreakoutRoom2x(
id: String,
externalId: String,
name: String,
parentId: String,
sequence: Int,
freeJoin: Boolean,
voiceConf: String,
assignedUsers: Vector[String],
users: Vector[BreakoutUser],
voiceUsers: Vector[BreakoutVoiceUser],
startedOn: Option[Long],
started: Boolean
) {
id: String,
externalId: String,
name: String,
parentId: String,
sequence: Int,
freeJoin: Boolean,
voiceConf: String,
assignedUsers: Vector[String],
users: Vector[BreakoutUser],
voiceUsers: Vector[BreakoutVoiceUser],
startedOn: Option[Long],
started: Boolean) {
}

View File

@ -1,12 +1,11 @@
package org.bigbluebutton.core.domain
case class MeetingInactivityTracker(
val maxInactivityTimeoutInMs: Long,
val warningBeforeMaxInMs: Long,
lastActivityTimestampInMs: Long,
warningSent: Boolean,
warningSentOnTimestampInMs: Long
) {
val maxInactivityTimeoutInMs: Long,
val warningBeforeMaxInMs: Long,
lastActivityTimestampInMs: Long,
warningSent: Boolean,
warningSentOnTimestampInMs: Long) {
def setWarningSentAndTimestamp(nowInMs: Long): MeetingInactivityTracker = {
copy(warningSent = true, warningSentOnTimestampInMs = nowInMs)
}
@ -35,17 +34,16 @@ case class MeetingInactivityTracker(
}
case class MeetingExpiryTracker(
startedOnInMs: Long,
userHasJoined: Boolean,
isBreakout: Boolean,
lastUserLeftOnInMs: Option[Long],
durationInMs: Long,
meetingExpireIfNoUserJoinedInMs: Long,
meetingExpireWhenLastUserLeftInMs: Long,
userInactivityInspectTimerInMs: Long,
userInactivityThresholdInMs: Long,
userActivitySignResponseDelayInMs: Long
) {
startedOnInMs: Long,
userHasJoined: Boolean,
isBreakout: Boolean,
lastUserLeftOnInMs: Option[Long],
durationInMs: Long,
meetingExpireIfNoUserJoinedInMs: Long,
meetingExpireWhenLastUserLeftInMs: Long,
userInactivityInspectTimerInMs: Long,
userInactivityThresholdInMs: Long,
userActivitySignResponseDelayInMs: Long) {
def setUserHasJoined(): MeetingExpiryTracker = {
if (!userHasJoined) {
copy(userHasJoined = true, lastUserLeftOnInMs = None)
@ -98,10 +96,9 @@ case class MeetingExpiryTracker(
}
case class MeetingRecordingTracker(
startedOnInMs: Long,
previousDurationInMs: Long,
currentDurationInMs: Long
) {
startedOnInMs: Long,
previousDurationInMs: Long,
currentDurationInMs: Long) {
def startTimer(nowInMs: Long): MeetingRecordingTracker = {
copy(startedOnInMs = nowInMs)

View File

@ -9,13 +9,12 @@ object MeetingState2x {
}
case class MeetingState2x(
groupChats: GroupChats,
presentationPodManager: PresentationPodManager,
breakout: Option[BreakoutModel],
inactivityTracker: MeetingInactivityTracker,
expiryTracker: MeetingExpiryTracker,
recordingTracker: MeetingRecordingTracker
) {
groupChats: GroupChats,
presentationPodManager: PresentationPodManager,
breakout: Option[BreakoutModel],
inactivityTracker: MeetingInactivityTracker,
expiryTracker: MeetingExpiryTracker,
recordingTracker: MeetingRecordingTracker) {
def update(groupChats: GroupChats): MeetingState2x = copy(groupChats = groupChats)
def update(presPodManager: PresentationPodManager): MeetingState2x = copy(presentationPodManager = presPodManager)

View File

@ -227,8 +227,7 @@ case class UserState(
avatar: String,
roleChangedOn: Long = System.currentTimeMillis(),
lastActivityTime: Long = TimeUtil.timeNowInMs(),
clientType: String
)
clientType: String)
case class UserIdAndName(id: String, name: String)

View File

@ -10,8 +10,7 @@ case class Voice(
callerId: CallerId = CallerId(),
muted: Boolean = false,
talking: Boolean = false,
locked: Boolean = false
)
locked: Boolean = false)
case class UserV(
id: String,
@ -19,5 +18,4 @@ case class UserV(
name: String,
role: String = Roles.VIEWER_ROLE,
status: Status = Status(),
voice: Voice = Voice()
)
voice: Voice = Voice())

View File

@ -15,8 +15,7 @@ object ReceivedJsonMsgHandlerActor {
class ReceivedJsonMsgHandlerActor(
val eventBus: BbbMsgRouterEventBus,
val incomingJsonMessageBus: IncomingJsonMessageBus
)
val incomingJsonMessageBus: IncomingJsonMessageBus)
extends Actor with ActorLogging
with SystemConfiguration
with ReceivedJsonMsgDeserializer

View File

@ -8,8 +8,7 @@ trait AuditHelpers {
def getUsersInVoiceConf(
props: DefaultProps,
outGW: OutMsgRouter
): Unit = {
outGW: OutMsgRouter): Unit = {
def buildGetUsersInVoiceConfSysMsg(meetingId: String): BbbCommonEnvCoreMsg = {
val routing = collection.immutable.HashMap("sender" -> "bbb-apps-akka")
val envelope = BbbCoreEnvelope(GetUsersInVoiceConfSysMsg.NAME, routing)
@ -26,8 +25,7 @@ trait AuditHelpers {
def sendBreakoutRoomCreatedToParent(
props: DefaultProps,
eventBus: InternalEventBus
): Unit = {
eventBus: InternalEventBus): Unit = {
// eventBus.publish(BigBlueButtonEvent(
// props.breakoutProps.parentId,
// BreakoutRoomCreated(props.breakoutProps.parentId, props.meetingProp.intId)

View File

@ -43,8 +43,7 @@ trait HandlerHelpers extends SystemConfiguration {
presenter = false,
locked = MeetingStatus2x.getPermissions(liveMeeting.status).lockOnJoin,
avatar = regUser.avatarURL,
clientType = clientType
)
clientType = clientType)
}
nu match {
@ -95,8 +94,7 @@ trait HandlerHelpers extends SystemConfiguration {
val event = buildRecordingStatusChangedEvtMsg(
liveMeeting.props.meetingProp.intId,
"system", MeetingStatus2x.isRecording(liveMeeting.status)
)
"system", MeetingStatus2x.isRecording(liveMeeting.status))
outGW.send(event)
newState = state.update(tracker)
}
@ -124,8 +122,7 @@ trait HandlerHelpers extends SystemConfiguration {
val event = buildRecordingStatusChangedEvtMsg(
liveMeeting.props.meetingProp.intId,
"system", MeetingStatus2x.isRecording(liveMeeting.status)
)
"system", MeetingStatus2x.isRecording(liveMeeting.status))
outGW.send(event)
newState = state.update(tracker)
}
@ -172,8 +169,7 @@ trait HandlerHelpers extends SystemConfiguration {
if (liveMeeting.props.meetingProp.isBreakout) {
eventBus.publish(BigBlueButtonEvent(
liveMeeting.props.breakoutProps.parentId,
new BreakoutRoomEndedInternalMsg(liveMeeting.props.meetingProp.intId)
))
new BreakoutRoomEndedInternalMsg(liveMeeting.props.meetingProp.intId)))
}
}
@ -213,8 +209,7 @@ trait HandlerHelpers extends SystemConfiguration {
if (liveMeeting.props.meetingProp.isBreakout) {
eventBus.publish(BigBlueButtonEvent(
liveMeeting.props.breakoutProps.parentId,
new BreakoutRoomEndedInternalMsg(meetingId)
))
new BreakoutRoomEndedInternalMsg(meetingId)))
}
val event = MsgBuilder.buildEjectAllFromVoiceConfMsg(meetingId, liveMeeting.props.voiceProp.voiceConf)

View File

@ -20,5 +20,4 @@ class LiveMeeting(
val webcams: Webcams,
val voiceUsers: VoiceUsers,
val users2x: Users2x,
val guestsWaiting: GuestsWaiting
)
val guestsWaiting: GuestsWaiting)

View File

@ -51,34 +51,34 @@ class MeetingActor(
val eventBus: InternalEventBus,
val outGW: OutMsgRouter,
val liveMeeting: LiveMeeting)
extends BaseMeetingActor
with SystemConfiguration
with GuestsApp
with LayoutApp2x
with VoiceApp2x
with BreakoutApp2x
with UsersApp2x
extends BaseMeetingActor
with SystemConfiguration
with GuestsApp
with LayoutApp2x
with VoiceApp2x
with BreakoutApp2x
with UsersApp2x
with UserBroadcastCamStartMsgHdlr
with UserJoinMeetingReqMsgHdlr
with UserJoinMeetingAfterReconnectReqMsgHdlr
with UserBroadcastCamStopMsgHdlr
with UserConnectedToGlobalAudioMsgHdlr
with UserDisconnectedFromGlobalAudioMsgHdlr
with MuteAllExceptPresentersCmdMsgHdlr
with MuteMeetingCmdMsgHdlr
with IsMeetingMutedReqMsgHdlr
with UserBroadcastCamStartMsgHdlr
with UserJoinMeetingReqMsgHdlr
with UserJoinMeetingAfterReconnectReqMsgHdlr
with UserBroadcastCamStopMsgHdlr
with UserConnectedToGlobalAudioMsgHdlr
with UserDisconnectedFromGlobalAudioMsgHdlr
with MuteAllExceptPresentersCmdMsgHdlr
with MuteMeetingCmdMsgHdlr
with IsMeetingMutedReqMsgHdlr
with EjectUserFromVoiceCmdMsgHdlr
with EndMeetingSysCmdMsgHdlr
with DestroyMeetingSysCmdMsgHdlr
with SendTimeRemainingUpdateHdlr
with SendBreakoutTimeRemainingMsgHdlr
with ChangeLockSettingsInMeetingCmdMsgHdlr
with SyncGetMeetingInfoRespMsgHdlr
with ClientToServerLatencyTracerMsgHdlr
with ValidateConnAuthTokenSysMsgHdlr
with UserActivitySignCmdMsgHdlr {
with EjectUserFromVoiceCmdMsgHdlr
with EndMeetingSysCmdMsgHdlr
with DestroyMeetingSysCmdMsgHdlr
with SendTimeRemainingUpdateHdlr
with SendBreakoutTimeRemainingMsgHdlr
with ChangeLockSettingsInMeetingCmdMsgHdlr
with SyncGetMeetingInfoRespMsgHdlr
with ClientToServerLatencyTracerMsgHdlr
with ValidateConnAuthTokenSysMsgHdlr
with UserActivitySignCmdMsgHdlr {
override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {
case e: Exception => {

View File

@ -20,8 +20,7 @@ object MeetingActorAudit {
def props(
props: DefaultProps,
eventBus: InternalEventBus,
outGW: OutMsgRouter
): Props =
outGW: OutMsgRouter): Props =
Props(classOf[MeetingActorAudit], props, eventBus, outGW)
}
@ -29,8 +28,7 @@ object MeetingActorAudit {
// periodically sends messages to the meeting actor
class MeetingActorAudit(
val props: DefaultProps,
val eventBus: InternalEventBus, val outGW: OutMsgRouter
)
val eventBus: InternalEventBus, val outGW: OutMsgRouter)
extends Actor with ActorLogging with SystemConfiguration with AuditHelpers {
object AuditMonitorInternalMsg
@ -56,8 +54,7 @@ class MeetingActorAudit(
// This is a breakout room. Inform our parent meeting that we have been successfully created.
eventBus.publish(BigBlueButtonEvent(
props.breakoutProps.parentId,
BreakoutRoomCreatedInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId)
))
BreakoutRoomCreatedInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId)))
}
@ -78,8 +75,7 @@ class MeetingActorAudit(
// This is a breakout room. Update the main meeting with list of users in this breakout room.
eventBus.publish(BigBlueButtonEvent(
props.meetingProp.intId,
SendBreakoutUsersAuditInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId)
))
SendBreakoutUsersAuditInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId)))
// Trigger recording timer, only for meeting allowing recording
if (props.recordProp.record) {

View File

@ -11,8 +11,7 @@ trait MeetingExpiryTrackerHelper extends HandlerHelpers {
outGW: OutMsgRouter,
eventBus: InternalEventBus,
liveMeeting: LiveMeeting,
state: MeetingState2x
): (MeetingState2x, Option[String]) = {
state: MeetingState2x): (MeetingState2x, Option[String]) = {
val nowInMs = TimeUtil.timeNowInMs()
val (expired, reason) = state.expiryTracker.hasMeetingExpired(nowInMs)
@ -32,8 +31,7 @@ trait MeetingExpiryTrackerHelper extends HandlerHelpers {
outGW: OutMsgRouter,
eventBus: InternalEventBus,
liveMeeting: LiveMeeting,
state: MeetingState2x
): (MeetingState2x, Option[String]) = {
state: MeetingState2x): (MeetingState2x, Option[String]) = {
val nowInMs = TimeUtil.timeNowInMs()
if (!state.inactivityTracker.hasRecentActivity(nowInMs)) {

View File

@ -42,8 +42,7 @@ class RunningMeeting(val props: DefaultProps, outGW: OutMessageGateway,
GuestsWaiting.setGuestPolicy(
liveMeeting.guestsWaiting,
GuestPolicy(props.usersProp.guestPolicy, SystemUser.ID)
)
GuestPolicy(props.usersProp.guestPolicy, SystemUser.ID))
val outMsgRouter = new OutMsgRouter(props.recordProp.record, outGW)

View File

@ -11,8 +11,7 @@ case class Permissions(
disablePubChat: Boolean = false,
lockedLayout: Boolean = false,
lockOnJoin: Boolean = true,
lockOnJoinConfigurable: Boolean = false
)
lockOnJoinConfigurable: Boolean = false)
case class MeetingExtensionProp(maxExtensions: Int = 2, numExtensions: Int = 0, extendByMinutes: Int = 20,
sendNotice: Boolean = true, sent15MinNotice: Boolean = false,

View File

@ -16,8 +16,7 @@ trait GetGuestsWaitingApprovalReqMsgHdlr extends HandlerHelpers {
val event = MsgBuilder.buildGetGuestsWaitingApprovalRespMsg(
liveMeeting.props.meetingProp.intId,
msg.body.requesterId,
guests
)
guests)
outGW.send(event)

View File

@ -37,8 +37,7 @@ trait GuestsWaitingApprovedMsgHdlr extends HandlerHelpers with RightsManagementT
mods foreach { m =>
val event = MsgBuilder.buildGuestsWaitingApprovedEvtMsg(
liveMeeting.props.meetingProp.intId,
m.intId, guests, approvedBy
)
m.intId, guests, approvedBy)
outGW.send(event)
}
}

View File

@ -24,8 +24,7 @@ trait SetGuestPolicyMsgHdlr extends RightsManagementTrait {
val policy = GuestPolicy(newPolicy, msg.body.setBy)
GuestsWaiting.setGuestPolicy(liveMeeting.guestsWaiting, policy)
val event = MsgBuilder.buildGuestPolicyChangedEvtMsg(
liveMeeting.props.meetingProp.intId, msg.header.userId, newPolicy, msg.body.setBy
)
liveMeeting.props.meetingProp.intId, msg.header.userId, newPolicy, msg.body.setBy)
outGW.send(event)
}
}

View File

@ -16,8 +16,7 @@ trait DestroyMeetingSysCmdMsgHdlr {
if (liveMeeting.props.meetingProp.isBreakout) {
log.info(
"Informing parent meeting {} that a breakout room has been ended {}",
liveMeeting.props.breakoutProps.parentId, liveMeeting.props.meetingProp.intId
)
liveMeeting.props.breakoutProps.parentId, liveMeeting.props.meetingProp.intId)
// send out BreakoutRoomEndedEvtMsg to inform clients the breakout has ended
outGW.send(MsgBuilder.buildBreakoutRoomEndedEvtMsg(liveMeeting.props.meetingProp.intId, "not-used",
@ -30,8 +29,7 @@ trait DestroyMeetingSysCmdMsgHdlr {
// Eject all users from the voice conference
outGW.send(MsgBuilder.buildEjectAllFromVoiceConfMsg(
liveMeeting.props.meetingProp.intId,
liveMeeting.props.voiceProp.voiceConf
))
liveMeeting.props.voiceProp.voiceConf))
// send a system message to force disconnection
outGW.send(MsgBuilder.buildDisconnectAllClientsSysMsg(liveMeeting.props.meetingProp.intId, "meeting-destroyed"))

View File

@ -31,8 +31,7 @@ class AppsRedisSubscriberActor(jsonMsgBus: IncomingJsonMessageBus, redisHost: St
channels: Seq[String] = Nil, patterns: Seq[String] = Nil)
extends RedisSubscriberActor(
new InetSocketAddress(redisHost, redisPort),
channels, patterns, onConnectStatus = connected => { println(s"connected: $connected") }
) with SystemConfiguration {
channels, patterns, onConnectStatus = connected => { println(s"connected: $connected") }) with SystemConfiguration {
override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {
case e: Exception => {

View File

@ -464,7 +464,7 @@ class RedisRecorderActor(val system: ActorSystem)
record(msg.header.meetingId, ev.toMap)
}
private def handleRecordStatusResetSysMsg(msg: RecordStatusResetSysMsg) {
val ev = new RecordStatusResetEvent()
ev.setMeetingId(msg.header.meetingId)

View File

@ -6,7 +6,7 @@ organization := "org.bigbluebutton"
version := "0.0.1"
scalaVersion := "2.12.2"
scalaVersion := "2.12.6"
scalacOptions ++= Seq(
"-unchecked",
@ -37,17 +37,17 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console",
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports")
val akkaVersion = "2.5.1"
val akkaVersion = "2.5.14"
val scalaTestV = "2.2.6"
libraryDependencies ++= {
Seq(
"ch.qos.logback" % "logback-classic" % "1.0.3",
"ch.qos.logback" % "logback-classic" % "1.2.3" % "runtime",
"junit" % "junit" % "4.11",
"commons-codec" % "commons-codec" % "1.10",
"joda-time" % "joda-time" % "2.3",
"org.apache.commons" % "commons-lang3" % "3.2"
"commons-codec" % "commons-codec" % "1.11",
"joda-time" % "joda-time" % "2.10",
"org.apache.commons" % "commons-lang3" % "3.7"
)}
@ -56,9 +56,9 @@ libraryDependencies += "org.bigbluebutton" % "bbb-common-message_2.12" % "0.0.19
libraryDependencies += "org.bigbluebutton" % "bbb-fsesl-client" % "0.0.6"
// https://mvnrepository.com/artifact/org.scala-lang/scala-library
libraryDependencies += "org.scala-lang" % "scala-library" % "2.12.2"
libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value
// https://mvnrepository.com/artifact/org.scala-lang/scala-compiler
libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.12.2"
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
// https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor_2.12
libraryDependencies += "com.typesafe.akka" % "akka-actor_2.12" % akkaVersion
@ -72,19 +72,29 @@ libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0"
// For generating test reports
libraryDependencies += "org.pegdown" % "pegdown" % "1.6.0" % "test"
// https://mvnrepository.com/artifact/com.typesafe.akka/akka-testkit_2.12
libraryDependencies += "com.typesafe.akka" % "akka-testkit_2.12" % "2.5.1" % "test"
libraryDependencies += "com.typesafe.akka" % "akka-testkit_2.12" % "2.5.14" % "test"
// https://mvnrepository.com/artifact/org.scalactic/scalactic_2.12
libraryDependencies += "org.scalactic" % "scalactic_2.12" % "3.0.3" % "test"
libraryDependencies += "org.scalactic" % "scalactic_2.12" % "3.0.5" % "test"
// https://mvnrepository.com/artifact/org.scalatest/scalatest_2.12
libraryDependencies += "org.scalatest" % "scalatest_2.12" % "3.0.3" % "test"
libraryDependencies += "org.scalatest" % "scalatest_2.12" % "3.0.5" % "test"
libraryDependencies += "org.mockito" % "mockito-core" % "2.7.22" % "test"
libraryDependencies += "org.mockito" % "mockito-core" % "2.21.0" % "test"
seq(Revolver.settings: _*)
scalariformSettings
import com.typesafe.sbt.SbtScalariform
import scalariform.formatter.preferences._
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
SbtScalariform.defaultScalariformSettings
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(AlignParameters, true)
//-----------
// Packaging
@ -123,4 +133,4 @@ mappings in Universal <+= (packageBin in Compile, sourceDirectory ) map { (_, sr
logConf -> "conf/logback.xml"
}
debianPackageDependencies in Debian ++= Seq("java7-runtime-headless", "bash")
debianPackageDependencies in Debian ++= Seq("java8-runtime-headless", "bash")

View File

@ -1,7 +1,11 @@
addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.6")
addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

View File

@ -28,11 +28,13 @@ object AppsRedisSubscriberActor extends SystemConfiguration {
channels, patterns).withDispatcher("akka.rediscala-subscriber-worker-dispatcher")
}
class AppsRedisSubscriberActor(val system: ActorSystem,
class AppsRedisSubscriberActor(
val system: ActorSystem,
inJsonMgBus: InsonMsgBus, redisHost: String,
redisPort: Int,
channels: Seq[String] = Nil, patterns: Seq[String] = Nil)
extends RedisSubscriberActor(new InetSocketAddress(redisHost, redisPort),
channels: Seq[String] = Nil, patterns: Seq[String] = Nil)
extends RedisSubscriberActor(
new InetSocketAddress(redisHost, redisPort),
channels, patterns, onConnectStatus = connected => { println(s"connected: $connected") }) with SystemConfiguration {
override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {

View File

@ -37,7 +37,7 @@ class VoiceConferenceService(sender: RedisPublisher) extends IVoiceConferenceSer
}
def userJoinedVoiceConf(voiceConfId: String, voiceUserId: String, userId: String, callerIdName: String,
callerIdNum: String, muted: java.lang.Boolean, talking: java.lang.Boolean, avatarURL: String) {
callerIdNum: String, muted: java.lang.Boolean, talking: java.lang.Boolean, avatarURL: String) {
val header = BbbCoreVoiceConfHeader(UserJoinedVoiceConfEvtMsg.NAME, voiceConfId)
val body = UserJoinedVoiceConfEvtMsgBody(voiceConfId, voiceUserId, userId, callerIdName, callerIdNum,

View File

@ -1,4 +1,5 @@
enablePlugins(JavaServerAppPackaging)
enablePlugins(SystemdPlugin)
name := "bbb-transcode-akka"
@ -6,7 +7,7 @@ organization := "org.bigbluebutton"
version := "0.0.2"
scalaVersion := "2.12.2"
scalaVersion := "2.12.6"
scalacOptions ++= Seq(
"-unchecked",
@ -37,24 +38,24 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console",
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports")
val akkaVersion = "2.5.1"
val scalaTestV = "2.2.6"
val akkaVersion = "2.5.14"
val scalaTestV = "3.0.5"
libraryDependencies ++= {
Seq(
"ch.qos.logback" % "logback-classic" % "1.0.3",
"ch.qos.logback" % "logback-classic" % "1.2.3" % "runtime",
"junit" % "junit" % "4.11",
"commons-codec" % "commons-codec" % "1.10",
"commons-codec" % "commons-codec" % "1.11",
"joda-time" % "joda-time" % "2.3",
"org.apache.commons" % "commons-lang3" % "3.2"
"org.apache.commons" % "commons-lang3" % "3.7"
)}
libraryDependencies += "org.bigbluebutton" % "bbb-common-message_2.12" % "0.0.19-SNAPSHOT"
// https://mvnrepository.com/artifact/org.scala-lang/scala-library
libraryDependencies += "org.scala-lang" % "scala-library" % "2.12.2"
libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value
// https://mvnrepository.com/artifact/org.scala-lang/scala-compiler
libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.12.2"
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
// https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor_2.12
libraryDependencies += "com.typesafe.akka" % "akka-actor_2.12" % akkaVersion
@ -80,7 +81,18 @@ libraryDependencies += "org.mockito" % "mockito-core" % "2.7.22" % "test"
seq(Revolver.settings: _*)
scalariformSettings
import com.typesafe.sbt.SbtScalariform
import scalariform.formatter.preferences._
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
SbtScalariform.defaultScalariformSettings
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(AlignParameters, true)
//-----------
// Packaging

View File

@ -1,7 +1,11 @@
addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.6")
addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

View File

@ -31,11 +31,13 @@ object AppsRedisSubscriberActor extends SystemConfiguration {
channels, patterns).withDispatcher("akka.rediscala-subscriber-worker-dispatcher")
}
class AppsRedisSubscriberActor(val system: ActorSystem,
msgBus: InJsonMsgBus, redisHost: String,
class AppsRedisSubscriberActor(
val system: ActorSystem,
msgBus: InJsonMsgBus, redisHost: String,
redisPort: Int,
channels: Seq[String] = Nil, patterns: Seq[String] = Nil)
extends RedisSubscriberActor(new InetSocketAddress(redisHost, redisPort),
channels: Seq[String] = Nil, patterns: Seq[String] = Nil)
extends RedisSubscriberActor(
new InetSocketAddress(redisHost, redisPort),
channels, patterns, onConnectStatus = connected => { println(s"connected: $connected") }) with SystemConfiguration {
override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {

View File

@ -20,12 +20,12 @@ class MessageSenderActor(val msgSender: RedisPublisher)
val routing = collection.immutable.HashMap("sender" -> "bbb-transcode")
def receive = {
case msg: StartTranscoderReply => handleStartTranscoderReply(msg)
case msg: StopTranscoderReply => handleStopTranscoderReply(msg)
case msg: UpdateTranscoderReply => handleUpdateTranscoderReply(msg)
case msg: StartTranscoderReply => handleStartTranscoderReply(msg)
case msg: StopTranscoderReply => handleStopTranscoderReply(msg)
case msg: UpdateTranscoderReply => handleUpdateTranscoderReply(msg)
case msg: TranscoderStatusUpdate => handleTranscoderStatusUpdate(msg)
case msg: StartProbingReply => handleStartProbingReply(msg)
case _ => // do nothing
case msg: StartProbingReply => handleStartProbingReply(msg)
case _ => // do nothing
}
private def handleStartTranscoderReply(msg: StartTranscoderReply) {

View File

@ -21,21 +21,21 @@ class TranscodersModel {
def removeTranscoder(meetingId: String, transcoderId: String) {
meetings.get(meetingId) match {
case Some(transcoders) => transcoders -= transcoderId
case _ =>
case _ =>
}
}
def getTranscoder(meetingId: String, transcoderId: String): Option[ActorRef] = {
meetings.get(meetingId) match {
case Some(transcoders) => transcoders.get(transcoderId)
case _ => None
case _ => None
}
}
def getTranscoders(meetingId: String): Array[ActorRef] = {
meetings.get(meetingId) match {
case Some(transcoders) => transcoders.values toArray
case _ => Array.empty
case _ => Array.empty
}
}
}

View File

@ -19,21 +19,21 @@ class TranscodingActor(val system: ActorSystem, messageSender: RedisPublisher)
val messageSenderActor = context.actorOf(MessageSenderActor.props(messageSender), "bbb-sender-actor")
def receive = {
case msg: StartTranscoderRequest => handleStartTranscoderRequest(msg)
case msg: UpdateTranscoderRequest => handleUpdateTranscoderRequest(msg)
case msg: StopTranscoderRequest => handleStopTranscoderRequest(msg)
case msg: StopMeetingTranscoders => handleStopMeetingTranscoders(msg)
case msg: StartProbingRequest => handleStartProbingRequest(msg)
case msg: StartTranscoderRequest => handleStartTranscoderRequest(msg)
case msg: UpdateTranscoderRequest => handleUpdateTranscoderRequest(msg)
case msg: StopTranscoderRequest => handleStopTranscoderRequest(msg)
case msg: StopMeetingTranscoders => handleStopMeetingTranscoders(msg)
case msg: StartProbingRequest => handleStartProbingRequest(msg)
//internal messages
case msg: StartVideoTranscoderReply => handleStartVideoTranscoderReply(msg)
case msg: UpdateVideoTranscoderReply => handleUpdateVideoTranscoderReply(msg)
case msg: DestroyVideoTranscoderReply => handleDestroyVideoTranscoderReply(msg)
case msg: StartVideoTranscoderReply => handleStartVideoTranscoderReply(msg)
case msg: UpdateVideoTranscoderReply => handleUpdateVideoTranscoderReply(msg)
case msg: DestroyVideoTranscoderReply => handleDestroyVideoTranscoderReply(msg)
case msg: TranscodingFinishedUnsuccessfully => handleTranscodingFinishedUnsuccessfully(msg)
case msg: TranscodingFinishedSuccessfully => handleTranscodingFinishedSuccessfully(msg)
case msg: RestartVideoTranscoderReply => handleRestartVideoTranscoderReply(msg)
case msg: StartVideoProbingReply => handleStartVideoProbingReply(msg)
case _ => // do nothing
case msg: TranscodingFinishedSuccessfully => handleTranscodingFinishedSuccessfully(msg)
case msg: RestartVideoTranscoderReply => handleRestartVideoTranscoderReply(msg)
case msg: StartVideoProbingReply => handleStartVideoProbingReply(msg)
case _ => // do nothing
}
private def handleStartTranscoderRequest(msg: StartTranscoderRequest) {

View File

@ -5,7 +5,7 @@ organization := "org.bigbluebutton"
version := "0.0.3-SNAPSHOT"
scalaVersion := "2.12.2"
scalaVersion := "2.12.6"
scalacOptions ++= Seq(
"-unchecked",
@ -26,14 +26,13 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console",
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports")
val scalaV = "2.12.2"
val akkaVersion = "2.5.1"
val akkaVersion = "2.5.14"
val scalaTestV = "2.2.6"
// https://mvnrepository.com/artifact/org.scala-lang/scala-library
libraryDependencies += "org.scala-lang" % "scala-library" % "2.12.2"
libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value
// https://mvnrepository.com/artifact/org.scala-lang/scala-compiler
libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.12.2"
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
// https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor_2.12
libraryDependencies += "com.typesafe.akka" % "akka-actor_2.12" % "2.5.1"
@ -43,18 +42,17 @@ libraryDependencies += "com.typesafe.akka" % "akka-slf4j_2.12" % "2.5.1"
// https://mvnrepository.com/artifact/com.github.etaty/rediscala_2.12
libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0"
libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.8"
libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.11"
libraryDependencies += "org.bigbluebutton" % "bbb-common-message_2.12" % "0.0.19-SNAPSHOT"
libraryDependencies += "com.google.code.gson" % "gson" % "2.8.0"
libraryDependencies += "com.google.code.gson" % "gson" % "2.8.5"
libraryDependencies += "redis.clients" % "jedis" % "2.9.0"
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.5"
libraryDependencies += "commons-io" % "commons-io" % "2.4"
libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.3"
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.7"
libraryDependencies += "commons-io" % "commons-io" % "2.4"
libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.6.0"
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.23" % "provided"

View File

@ -1,3 +1,2 @@
sbt clean
sbt publish publishLocal

View File

@ -4,6 +4,6 @@ addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
//addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.2")
addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

View File

@ -4,7 +4,7 @@ organization := "org.bigbluebutton"
version := "0.0.19-SNAPSHOT"
scalaVersion := "2.12.2"
scalaVersion := "2.12.6"
scalacOptions ++= Seq(
"-unchecked",
@ -32,9 +32,9 @@ libraryDependencies ++= {
)}
// https://mvnrepository.com/artifact/org.scala-lang/scala-library
libraryDependencies += "org.scala-lang" % "scala-library" % "2.12.2"
libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value
// https://mvnrepository.com/artifact/org.scala-lang/scala-compiler
libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.12.2"
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
libraryDependencies += "junit" % "junit" % "4.12" % "test"
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
@ -49,7 +49,7 @@ libraryDependencies += "org.pegdown" % "pegdown" % "1.6.0" % "test"
libraryDependencies += "org.scalatest" % "scalatest_2.12" % "3.0.3" % "test"
// https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-scala_2.12
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.8.8"
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.9.6"
seq(Revolver.settings: _*)

View File

@ -1,2 +1,2 @@
sbt clean
sbt publish publishLocal

View File

@ -1,8 +1,9 @@
addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

View File

@ -1,6 +0,0 @@
package org.bigbluebutton.common2.util
object Util {
}

View File

@ -4,7 +4,7 @@ organization := "org.bigbluebutton"
version := "0.0.2-SNAPSHOT"
scalaVersion := "2.12.2"
scalaVersion := "2.12.6"
scalacOptions ++= Seq(
"-unchecked",
@ -25,13 +25,12 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console",
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports")
val scalaV = "2.12.2"
val akkaVersion = "2.5.1"
val akkaVersion = "2.5.14"
// https://mvnrepository.com/artifact/org.scala-lang/scala-library
libraryDependencies += "org.scala-lang" % "scala-library" % scalaV
libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value
// https://mvnrepository.com/artifact/org.scala-lang/scala-compiler
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaV
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
// https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor_2.12
libraryDependencies += "com.typesafe.akka" % "akka-actor_2.12" % akkaVersion
@ -41,50 +40,48 @@ libraryDependencies += "com.typesafe.akka" % "akka-slf4j_2.12" % akkaVersion
// https://mvnrepository.com/artifact/com.github.etaty/rediscala_2.12
libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0"
libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.8"
libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.11"
libraryDependencies += "org.bigbluebutton" % "bbb-common-message_2.12" % "0.0.19-SNAPSHOT"
// https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-scala_2.12
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.8.8"
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.9.6"
libraryDependencies += "redis.clients" % "jedis" % "2.7.2"
libraryDependencies += "com.google.code.gson" % "gson" % "2.5"
libraryDependencies += "redis.clients" % "jedis" % "2.9.0"
libraryDependencies += "com.google.code.gson" % "gson" % "2.8.5"
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.5"
libraryDependencies += "commons-io" % "commons-io" % "2.4"
libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.3"
libraryDependencies += "commons-io" % "commons-io" % "2.4"
libraryDependencies += "com.zaxxer" % "nuprocess" % "1.1.0"
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.7"
libraryDependencies += "commons-io" % "commons-io" % "2.6"
libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.6.0"
libraryDependencies += "com.zaxxer" % "nuprocess" % "1.2.4"
// https://mvnrepository.com/artifact/org.jodconverter/jodconverter-core
libraryDependencies += "org.jodconverter" % "jodconverter-core" % "4.0.0-RELEASE"
libraryDependencies += "org.jodconverter" % "jodconverter-local" % "4.2.0"
// https://mvnrepository.com/artifact/org.libreoffice/unoil
libraryDependencies += "org.libreoffice" % "unoil" % "5.3.2"
libraryDependencies += "org.libreoffice" % "unoil" % "5.4.2"
// https://mvnrepository.com/artifact/org.libreoffice/ridl
libraryDependencies += "org.libreoffice" % "ridl" % "5.3.2"
libraryDependencies += "org.libreoffice" % "ridl" % "5.4.2"
// https://mvnrepository.com/artifact/org.libreoffice/juh
libraryDependencies += "org.libreoffice" % "juh" % "5.3.2"
libraryDependencies += "org.libreoffice" % "juh" % "5.4.2"
// https://mvnrepository.com/artifact/org.libreoffice/jurt
libraryDependencies += "org.libreoffice" % "jurt" % "5.3.2"
libraryDependencies += "org.libreoffice" % "jurt" % "5.4.2"
libraryDependencies += "org.apache.poi" % "poi-ooxml" % "3.17"
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.5"
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.25"
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.3"
libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6"
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpasyncclient
libraryDependencies += "org.apache.httpcomponents" % "httpasyncclient" % "4.1.3"
libraryDependencies += "org.apache.httpcomponents" % "httpasyncclient" % "4.1.4"
libraryDependencies += "org.freemarker" % "freemarker" % "2.3.23"
libraryDependencies += "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.6.3"
libraryDependencies += "org.freemarker" % "freemarker" % "2.3.28"
libraryDependencies += "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.9.6"
// https://mvnrepository.com/artifact/org.codehaus.woodstox/woodstox-core-asl
libraryDependencies += "org.codehaus.woodstox" % "woodstox-core-asl" % "4.4.1"
@ -100,7 +97,7 @@ libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test"
libraryDependencies += "com.typesafe.akka" % "akka-testkit_2.12" % akkaVersion % "test"
// https://mvnrepository.com/artifact/org.scala-lang.modules/scala-xml_2.12
libraryDependencies += "org.scala-lang.modules" % "scala-xml_2.12" % "1.0.6"
libraryDependencies += "org.scala-lang.modules" % "scala-xml_2.12" % "1.1.0"
seq(Revolver.settings: _*)

View File

@ -1,9 +1,11 @@
addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.2")
addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.7")
addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

View File

@ -27,10 +27,13 @@ public class ApiParams {
public static final String BANNER_COLOR = "bannerColor";
public static final String BANNER_TEXT = "bannerText";
public static final String CHECKSUM = "checksum";
public static final String COPYRIGHT = "copyright";
public static final String DIAL_NUMBER = "dialNumber";
public static final String DURATION = "duration";
public static final String FREE_JOIN = "freeJoin";
public static final String GUEST_POLICY = "guestPolicy";
public static final String IS_BREAKOUT = "isBreakout";
public static final String LOGO = "logo";
public static final String LOGOUT_TIMER = "logoutTimer";
public static final String LOGOUT_URL = "logoutURL";
public static final String MAX_PARTICIPANTS = "maxParticipants";
@ -38,9 +41,11 @@ public class ApiParams {
public static final String META = "meta";
public static final String MODERATOR_ONLY_MESSAGE = "moderatorOnlyMessage";
public static final String MODERATOR_PW = "moderatorPW";
public static final String MUTE_ON_START = "muteOnStart";
public static final String NAME = "name";
public static final String PARENT_MEETING_ID = "parentMeetingID";
public static final String RECORD = "record";
public static final String SEQUENCE = "sequence";
public static final String VOICE_BRIDGE = "voiceBridge";
public static final String WEB_VOICE = "webVoice";
public static final String WEBCAMS_ONLY_FOR_MODERATOR = "webcamsOnlyForModerator";

View File

@ -20,7 +20,6 @@ package org.bigbluebutton.api;
import java.io.File;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
@ -50,7 +49,6 @@ import org.bigbluebutton.api.messaging.converters.messages.DestroyMeetingMessage
import org.bigbluebutton.api.messaging.converters.messages.EndMeetingMessage;
import org.bigbluebutton.api.messaging.messages.CreateBreakoutRoom;
import org.bigbluebutton.api.messaging.messages.CreateMeeting;
import org.bigbluebutton.api.messaging.messages.EndBreakoutRoom;
import org.bigbluebutton.api.messaging.messages.EndMeeting;
import org.bigbluebutton.api.messaging.messages.GuestPolicyChanged;
import org.bigbluebutton.api.messaging.messages.GuestStatusChangedEventMsg;
@ -78,13 +76,11 @@ import org.bigbluebutton.presentation.PresentationUrlDownloadService;
import org.bigbluebutton.web.services.RegisteredUserCleanupTimerTask;
import org.bigbluebutton.web.services.callback.CallbackUrlService;
import org.bigbluebutton.web.services.callback.MeetingEndedEvent;
import org.bigbluebutton.web.services.turn.StunServer;
import org.bigbluebutton.web.services.turn.StunTurnService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.Gson;
import scala.Option;
public class MeetingService implements MessageListener {
private static Logger log = LoggerFactory.getLogger(MeetingService.class);
@ -222,13 +218,6 @@ public class MeetingService implements MessageListener {
return valid;
}
private void processMeetingForRemoval(Meeting m) {
kickOffProcessingOfRecording(m);
destroyMeeting(m.getInternalId());
meetings.remove(m.getInternalId());
removeUserSessions(m.getInternalId());
}
private void removeUserSessions(String meetingId) {
Iterator<Map.Entry<String, UserSession>> iterator = sessions.entrySet().iterator();
while (iterator.hasNext()) {
@ -367,16 +356,17 @@ public class MeetingService implements MessageListener {
message.authed, message.guestStatus);
}
public Meeting getMeeting(String meetingId) {
if (meetingId == null)
return null;
for (String key : meetings.keySet()) {
if (key.startsWith(meetingId))
return meetings.get(key);
}
public Meeting getMeeting(String meetingId) {
if (meetingId == null)
return null;
for (Map.Entry<String, Meeting> entry : meetings.entrySet()) {
String key = entry.getKey();
if (key.startsWith(meetingId))
return entry.getValue();
}
return null;
}
return null;
}
public Collection<Meeting> getMeetingsWithId(String meetingId) {
if (meetingId == null)
@ -384,80 +374,49 @@ public class MeetingService implements MessageListener {
Collection<Meeting> m = new HashSet<>();
for (String key : meetings.keySet()) {
if (key.startsWith(meetingId))
m.add(meetings.get(key));
for (Map.Entry<String, Meeting> entry : meetings.entrySet()) {
String key = entry.getKey();
if (key.startsWith(meetingId))
m.add(entry.getValue());
}
return m;
}
public Meeting getNotEndedMeetingWithId(String meetingId) {
if (meetingId == null)
return null;
for (String key : meetings.keySet()) {
if (key.startsWith(meetingId)) {
Meeting m = meetings.get(key);
if (!m.isForciblyEnded())
return m;
if (meetingId == null)
return null;
for (Map.Entry<String, Meeting> entry : meetings.entrySet()) {
String key = entry.getKey();
if (key.startsWith(meetingId)) {
Meeting m = entry.getValue();
if (!m.isForciblyEnded())
return m;
}
}
}
return null;
return null;
}
public String getRecordingTextTracks(String recordId) {
return recordingService.getRecordingTextTracks(recordId);
}
public String putRecordingTextTrack(String recordId,
String kind,
String lang,
File file,
String label,
String origFilename,
String trackId) {
public String putRecordingTextTrack(String recordId, String kind, String lang, File file, String label,
String origFilename, String trackId) {
UploadedTrack track = new UploadedTrack(recordId,
kind,
lang,
label,
origFilename,
file,
trackId,
getCaptionTrackInboxDir());
return recordingService.putRecordingTextTrack(track);
UploadedTrack track = new UploadedTrack(recordId, kind, lang, label, origFilename, file, trackId,
getCaptionTrackInboxDir());
return recordingService.putRecordingTextTrack(track);
}
public String getCaptionTrackInboxDir() {
return recordingService.getCaptionTrackInboxDir();
}
public String getRecordings2x(ArrayList<String> idList, ArrayList<String> states, Map<String, String> metadataFilters) {
public String getRecordings2x(List<String> idList, List<String> states, Map<String, String> metadataFilters) {
return recordingService.getRecordings2x(idList, states, metadataFilters);
}
private int getDurationRecording(String playbackDuration, String end,
String start) {
int duration;
try {
if (!"".equals(playbackDuration)) {
duration = (int) Math
.ceil((Long.parseLong(playbackDuration)) / 60000.0);
} else {
duration = (int) Math.ceil((Long.parseLong(end) - Long
.parseLong(start)) / 60000.0);
}
} catch (Exception e) {
log.debug(e.getMessage());
duration = 0;
}
return duration;
}
public boolean existsAnyRecording(List<String> idList) {
return recordingService.existAnyRecording(idList);
}
@ -488,15 +447,6 @@ public class MeetingService implements MessageListener {
recordingService.startIngestAndProcessing(meetingId);
}
public boolean isMeetingWithVoiceBridgeExist(String voiceBridge) {
/*
* Collection<Meeting> confs = meetings.values(); for (Meeting c :
* confs) { if (voiceBridge == c.getVoiceBridge()) { return true; } }
*/
return false;
}
public void endMeeting(String meetingId) {
handle(new EndMeeting(meetingId));
}
@ -542,10 +492,6 @@ public class MeetingService implements MessageListener {
}
}
private void processEndBreakoutRoom(EndBreakoutRoom message) {
processEndMeeting(new EndMeeting(message.breakoutMeetingId));
}
private void processEndMeeting(EndMeeting message) {
gw.endMeeting(new EndMeetingMessage(message.meetingId));
}
@ -636,7 +582,6 @@ public class MeetingService implements MessageListener {
log.info("Meeting restarted: data={}", logStr);
}
return;
}
}
@ -659,8 +604,6 @@ public class MeetingService implements MessageListener {
String logStr = gson.toJson(logData);
log.info("Meeting destroyed: data={}", logStr);
return;
}
}
@ -684,16 +627,14 @@ public class MeetingService implements MessageListener {
log.info("Meeting ended: data={}", logStr);
String END_CALLBACK_URL = "endCallbackUrl".toLowerCase();
String endCallbackUrl = "endCallbackUrl".toLowerCase();
Map<String, String> metadata = m.getMetadata();
if (metadata.containsKey(END_CALLBACK_URL)) {
String callbackUrl = metadata.get(END_CALLBACK_URL);
if (metadata.containsKey(endCallbackUrl)) {
String callbackUrl = metadata.get(endCallbackUrl);
callbackUrlService.handleMessage(new MeetingEndedEvent(callbackUrl));
}
processRemoveEndedMeeting(message);
return;
}
}
@ -733,10 +674,7 @@ public class MeetingService implements MessageListener {
Gson gson = new Gson();
String logStr = gson.toJson(logData);
log.info("User joined meeting: data={}", logStr);
return;
}
return;
}
private void userLeft(UserLeft message) {
@ -775,11 +713,7 @@ public class MeetingService implements MessageListener {
} else {
log.info("User was not unregistered from meeting because it was not found");
}
return;
}
return;
}
}
@ -789,9 +723,7 @@ public class MeetingService implements MessageListener {
User user = m.getUserById(message.userId);
if (user != null) {
user.setStatus(message.status, message.value);
return;
}
return;
}
}
@ -815,23 +747,15 @@ public class MeetingService implements MessageListener {
User user = m.getUserById(message.userId);
if (user != null) {
user.setVoiceJoined(true);
return;
} else {
if (message.userId.startsWith("v_")) {
// A dial-in user joined the meeting. Dial-in users by convention has userId that starts with "v_".
User vuser = new User(message.userId,
message.userId,
message.name,
"DIAL-IN-USER",
"no-avatar-url",
true,
GuestPolicy.ALLOW,
"DIAL-IN");
User vuser = new User(message.userId, message.userId, message.name, "DIAL-IN-USER", "no-avatar-url",
true, GuestPolicy.ALLOW, "DIAL-IN");
vuser.setVoiceJoined(true);
m.userJoined(vuser);
}
}
return;
}
}
@ -846,10 +770,7 @@ public class MeetingService implements MessageListener {
} else {
user.setVoiceJoined(false);
}
return;
}
return;
}
}
@ -859,9 +780,7 @@ public class MeetingService implements MessageListener {
User user = m.getUserById(message.userId);
if (user != null) {
user.setListeningOnly(message.listenOnly);
return;
}
return;
}
}
@ -871,9 +790,7 @@ public class MeetingService implements MessageListener {
User user = m.getUserById(message.userId);
if (user != null) {
user.addStream(message.stream);
return;
}
return;
}
}
@ -883,9 +800,7 @@ public class MeetingService implements MessageListener {
User user = m.getUserById(message.userId);
if (user != null) {
user.removeStream(message.stream);
return;
}
return;
}
}

View File

@ -146,148 +146,28 @@ public class ParamsProcessorUtil {
errors.missingParamError(ApiParams.MEETING_ID);
}
}
public void updateMeeting(Map<String, Object> updateParams, Meeting existing) {
// TODO: Assign new values to meeting.
/*
String meetingName = (String) updateParams.get("name");
if (meetingName != null) {
existing.setM("name", meetingName);
}
String viewerPass = params.get("attendeePW");
if (! StringUtils.isEmpty(viewerPass) ) {
newParams.put("attendeePW", viewerPass);
}
String modPass = params.get("moderatorPW");
if (! StringUtils.isEmpty(modPass) ) {
newParams.put("moderatorPW", modPass);
}
String telVoice = params.get("voiceBridge");
if (! StringUtils.isEmpty(telVoice) ) {
newParams.put("voiceBridge", telVoice);
}
String webVoice = params.get("webVoice");
if (! StringUtils.isEmpty(webVoice)) {
newParams.put("webVoice", webVoice);
}
String dialNumber = params.get("dialNumber");
if (! StringUtils.isEmpty(dialNumber)) {
newParams.put("dialNumber", dialNumber);
}
String logoutUrl = params.get("logoutURL");
if (! StringUtils.isEmpty(logoutUrl)) {
newParams.put("logoutURL", logoutUrl);
}
String record = params.get("record");
if (! StringUtils.isEmpty(record)) {
newParams.put("record", record);
}
String maxUsers = params.get("maxParticipants");
if (! StringUtils.isEmpty(maxUsers)) {
newParams.put("maxParticipants", maxUsers);
}
String meetingDuration = params.get("duration");
if (! StringUtils.isEmpty(meetingDuration)) {
newParams.put("duration", meetingDuration);
}
String welcomeMessage = params.get("welcome");
if (! StringUtils.isEmpty(welcomeMessage)) {
newParams.put("welcome", welcomeMessage);
}
// Collect metadata for this meeting that the third-party app wants to store if meeting is recorded.
Map<String, String> meetingInfo = new HashMap<String, String>();
for (String key: params.keySet()) {
if (key.contains("meta")){
String[] meta = key.split("_");
if(meta.length == 2){
meetingInfo.put(meta[1], params.get(key));
}
}
}
if (! meetingInfo.isEmpty()) {
newParams.put("metadata", meetingInfo);
}
*/
}
public Map<String, Object> processUpdateCreateParams(Map<String, String> params) {
Map<String, Object> newParams = new HashMap<>();
// Do we have a meeting name? If not, complain.
String meetingName = params.get(ApiParams.NAME);
if (! StringUtils.isEmpty(meetingName) ) {
newParams.put(ApiParams.NAME, meetingName);
}
String viewerPass = params.get(ApiParams.ATTENDEE_PW);
if (! StringUtils.isEmpty(viewerPass) ) {
newParams.put(ApiParams.ATTENDEE_PW, viewerPass);
}
String modPass = params.get(ApiParams.MODERATOR_PW);
if (! StringUtils.isEmpty(modPass) ) {
newParams.put(ApiParams.MODERATOR_PW, modPass);
}
String telVoice = params.get(ApiParams.VOICE_BRIDGE);
if (! StringUtils.isEmpty(telVoice) ) {
newParams.put(ApiParams.VOICE_BRIDGE, telVoice);
}
String webVoice = params.get(ApiParams.WEB_VOICE);
if (! StringUtils.isEmpty(webVoice)) {
newParams.put(ApiParams.WEB_VOICE, webVoice);
}
String dialNumber = params.get(ApiParams.DIAL_NUMBER);
if (! StringUtils.isEmpty(dialNumber)) {
newParams.put(ApiParams.DIAL_NUMBER, dialNumber);
}
String logoutUrl = params.get(ApiParams.LOGOUT_URL);
if (! StringUtils.isEmpty(logoutUrl)) {
newParams.put(ApiParams.LOGOUT_URL, logoutUrl);
}
String record = params.get(ApiParams.RECORD);
if (! StringUtils.isEmpty(record)) {
newParams.put(ApiParams.RECORD, record);
}
String maxUsers = params.get(ApiParams.MAX_PARTICIPANTS);
if (! StringUtils.isEmpty(maxUsers)) {
newParams.put(ApiParams.MAX_PARTICIPANTS, maxUsers);
}
String meetingDuration = params.get(ApiParams.DURATION);
if (! StringUtils.isEmpty(meetingDuration)) {
newParams.put(ApiParams.DURATION, meetingDuration);
}
String welcomeMessage = params.get(ApiParams.WELCOME);
if (! StringUtils.isEmpty(welcomeMessage)) {
newParams.put(ApiParams.WELCOME, welcomeMessage);
}
// Collect metadata for this meeting that the third-party app wants to store if meeting is recorded.
String[] createParams = { ApiParams.NAME, ApiParams.ATTENDEE_PW, ApiParams.MODERATOR_PW, ApiParams.VOICE_BRIDGE,
ApiParams.WEB_VOICE, ApiParams.DIAL_NUMBER, ApiParams.LOGOUT_URL, ApiParams.RECORD,
ApiParams.MAX_PARTICIPANTS, ApiParams.DURATION, ApiParams.WELCOME };
for (String paramName : createParams) {
String parameter = params.get(paramName);
if (!StringUtils.isEmpty(parameter)) {
newParams.put(paramName, parameter);
}
}
// Collect metadata for this meeting that the third-party application wants to store if meeting is recorded.
Map<String, String> meetingInfo = new HashMap<>();
for (String key: params.keySet()) {
if (key.contains(ApiParams.META)){
String[] meta = key.split("_");
for (Map.Entry<String, String> entry : params.entrySet()) {
if (entry.getKey().contains(ApiParams.META)){
String[] meta = entry.getKey().split("_");
if(meta.length == 2){
meetingInfo.put(meta[1], params.get(key));
meetingInfo.put(meta[1], entry.getValue());
}
}
}
@ -304,7 +184,7 @@ public class ParamsProcessorUtil {
Matcher metaMatcher = META_VAR_PATTERN.matcher(param);
if (metaMatcher.matches()) {
return true;
}
}
return false;
}
@ -314,12 +194,12 @@ public class ParamsProcessorUtil {
public static Map<String, String> processMetaParam(Map<String, String> params) {
Map<String, String> metas = new HashMap<>();
for (String key : params.keySet()) {
if (isMetaValid(key)) {
for (Map.Entry<String, String> entry : params.entrySet()) {
if (isMetaValid(entry.getKey())) {
// Need to lowercase to maintain backward compatibility with
// 0.81
String metaName = removeMetaString(key).toLowerCase();
metas.put(metaName, params.get(key));
String metaName = removeMetaString(entry.getKey()).toLowerCase();
metas.put(metaName, params.get(entry.getValue()));
}
}
@ -448,7 +328,7 @@ public class ParamsProcessorUtil {
// meeting, the shared timestamp and the sequence number
String timeStamp = StringUtils.substringAfter(internalMeetingId, "-");
String externalHash = DigestUtils
.sha1Hex((parentMeetingId + "-" + timeStamp + "-" + params.get("sequence")));
.sha1Hex((parentMeetingId + "-" + timeStamp + "-" + params.get(ApiParams.SEQUENCE)));
externalMeetingId = externalHash + "-" + timeStamp;
}
@ -476,7 +356,7 @@ public class ParamsProcessorUtil {
meeting.storeConfig(true, configXML);
if (!StringUtils.isEmpty(params.get(ApiParams.MODERATOR_ONLY_MESSAGE))) {
String moderatorOnlyMessageTemplate = params.get("moderatorOnlyMessage");
String moderatorOnlyMessageTemplate = params.get(ApiParams.MODERATOR_ONLY_MESSAGE);
String moderatorOnlyMessage = substituteKeywords(moderatorOnlyMessageTemplate,
dialNumber, telVoice, meetingName);
meeting.setModeratorOnlyMessage(moderatorOnlyMessage);
@ -492,21 +372,21 @@ public class ParamsProcessorUtil {
// Add extra parameters for breakout room
if (isBreakout) {
meeting.setSequence(Integer.parseInt(params.get("sequence")));
meeting.setFreeJoin(Boolean.parseBoolean(params.get("freeJoin")));
meeting.setSequence(Integer.parseInt(params.get(ApiParams.SEQUENCE)));
meeting.setFreeJoin(Boolean.parseBoolean(params.get(ApiParams.FREE_JOIN)));
meeting.setParentMeetingId(parentMeetingId);
}
if (!StringUtils.isEmpty(params.get("logo"))) {
meeting.setCustomLogoURL(params.get("logo"));
if (!StringUtils.isEmpty(params.get(ApiParams.LOGO))) {
meeting.setCustomLogoURL(params.get(ApiParams.LOGO));
}
if (!StringUtils.isEmpty(params.get("copyright"))) {
meeting.setCustomCopyright(params.get("copyright"));
if (!StringUtils.isEmpty(params.get(ApiParams.COPYRIGHT))) {
meeting.setCustomCopyright(params.get(ApiParams.COPYRIGHT));
}
Boolean muteOnStart = defaultMuteOnStart;
if (!StringUtils.isEmpty(params.get("muteOnStart"))) {
muteOnStart = Boolean.parseBoolean(params.get("muteOnStart"));
if (!StringUtils.isEmpty(params.get(ApiParams.MUTE_ON_START))) {
muteOnStart = Boolean.parseBoolean(params.get(ApiParams.MUTE_ON_START));
}
meeting.setMuteOnStart(muteOnStart);
@ -694,20 +574,19 @@ public class ParamsProcessorUtil {
return mDuration;
}
public boolean isTestMeeting(String telVoice) {
return ((! StringUtils.isEmpty(telVoice)) &&
(! StringUtils.isEmpty(testVoiceBridge)) &&
(telVoice == testVoiceBridge));
}
public boolean isTestMeeting(String telVoice) {
return ((!StringUtils.isEmpty(telVoice)) && (!StringUtils.isEmpty(testVoiceBridge))
&& (telVoice.equals(testVoiceBridge)));
}
public String getIntMeetingIdForTestMeeting(String telVoice) {
if ((testVoiceBridge != null) && (telVoice == testVoiceBridge)) {
if (StringUtils.isEmpty(testConferenceMock))
return testConferenceMock;
}
return "";
}
public String getIntMeetingIdForTestMeeting(String telVoice) {
if ((testVoiceBridge != null) && (testVoiceBridge.equals(telVoice))
&& StringUtils.isEmpty(testConferenceMock)) {
return testConferenceMock;
}
return "";
}
public boolean isConfigXMLChecksumSame(String meetingID, String configXML, String checksum) {
if (StringUtils.isEmpty(securitySalt)) {
@ -755,7 +634,7 @@ public class ParamsProcessorUtil {
cs = DigestUtils.sha256Hex(data);
log.info("SHA256 {}", cs);
}
if (cs == null || cs.equals(checksum) == false) {
if (cs == null || !cs.equals(checksum)) {
log.info("query string after checksum removed: [{}]", queryString);
log.info("checksumError: query string checksum failed. our: [{}], client: [{}]", cs, checksum);
return false;
@ -764,7 +643,7 @@ public class ParamsProcessorUtil {
return true;
}
public boolean isPostChecksumSame(String apiCall, HashMap<String, String[]> params) {
public boolean isPostChecksumSame(String apiCall, Map<String, String[]> params) {
if (StringUtils.isEmpty(securitySalt)) {
log.warn("Security is disabled in this service. Make sure this is intentional.");
return true;

View File

@ -46,10 +46,10 @@ import org.slf4j.LoggerFactory;
public class RecordingService {
private static Logger log = LoggerFactory.getLogger(RecordingService.class);
private String processDir = "/var/bigbluebutton/recording/process";
private String publishedDir = "/var/bigbluebutton/published";
private String unpublishedDir = "/var/bigbluebutton/unpublished";
private String deletedDir = "/var/bigbluebutton/deleted";
private static String processDir = "/var/bigbluebutton/recording/process";
private static String publishedDir = "/var/bigbluebutton/published";
private static String unpublishedDir = "/var/bigbluebutton/unpublished";
private static String deletedDir = "/var/bigbluebutton/deleted";
private RecordingMetadataReaderHelper recordingServiceHelper;
private String recordStatusDir;
private String captionsDir;
@ -59,7 +59,7 @@ public class RecordingService {
try {
FileUtils.copyFile(presFile, dlownloadableFile);
} catch (IOException ex) {
log.error("Failed to copy file: " + ex);
log.error("Failed to copy file: {}", ex);
}
}
@ -71,7 +71,7 @@ public class RecordingService {
if (msg.downloadable) {
String fileExt = FilenameUtils.getExtension(msg.presFilename);
File presFile = new File(presDir.getAbsolutePath() + File.separatorChar + msg.presId + "." + fileExt);
log.info("Make file downloadable. " + downloadableFile.getAbsolutePath());
log.info("Make file downloadable. {}", downloadableFile.getAbsolutePath());
copyPresentationFile(presFile, downloadableFile);
} else {
if (downloadableFile.exists()) {
@ -86,13 +86,10 @@ public class RecordingService {
}
public File getDownloadablePresentationFile(String meetingId, String presId, String presFilename) {
log.info("Find downloadable presentation for meetingId=" + meetingId + " presId=" + presId + " filename=" + presFilename);
log.info("Find downloadable presentation for meetingId={} presId={} filename={}", meetingId, presId, presFilename);
File presDir = Util.getPresentationDir(presentationBaseDir, meetingId, presId);
File downloadableFile = new File(presDir.getAbsolutePath() + File.separatorChar + presFilename);
log.info("Found downloadable presentation file " + downloadableFile.getAbsolutePath());
return downloadableFile;
return new File(presDir.getAbsolutePath() + File.separatorChar + presFilename);
}
public void kickOffRecordingChapterBreak(String meetingId, Long timestamp) {
@ -103,9 +100,9 @@ public class RecordingService {
try {
doneFile.createNewFile();
if (!doneFile.exists())
log.error("Failed to create file.", done);
log.error("Failed to create {} file.", done);
} catch (IOException e) {
log.error("Failed to create {} file", done);
log.error("Exception occured when trying to create {} file", done);
}
} else {
log.error("{} file already exists.", done);
@ -122,7 +119,7 @@ public class RecordingService {
if (!doneFile.exists())
log.error("Failed to create {} file.", done);
} catch (IOException e) {
log.error("Failed to create {} file.", done);
log.error("Exception occured when trying to create {} file.", done);
}
} else {
log.error("{} file already exists.", done);
@ -162,7 +159,7 @@ public class RecordingService {
return recordingServiceHelper.putRecordingTextTrack(track);
}
public String getRecordings2x(ArrayList<String> idList, ArrayList<String> states, Map<String, String> metadataFilters) {
public String getRecordings2x(List<String> idList, List<String> states, Map<String, String> metadataFilters) {
List<RecordingMetadata> recsList = getRecordingsMetadata(idList, states);
ArrayList<RecordingMetadata> recs = filterRecordingsByMetadata(recsList, metadataFilters);
return recordingServiceHelper.getRecordings2x(recs);
@ -170,8 +167,7 @@ public class RecordingService {
private RecordingMetadata getRecordingMetadata(File dir) {
File file = new File(dir.getPath() + File.separatorChar + "metadata.xml");
RecordingMetadata rec = recordingServiceHelper.getRecordingMetadata(file);
return rec;
return recordingServiceHelper.getRecordingMetadata(file);
}
public boolean recordingMatchesMetadata(RecordingMetadata recording, Map<String, String> metadataFilters) {
@ -579,8 +575,6 @@ public class RecordingService {
}
}
}
return;
}
public void updateRecordingMetadata(File srxMetadataXml, Map<String,String> metaParams, File destMetadataXml) {

View File

@ -5,6 +5,10 @@ import java.io.File;
import org.apache.commons.codec.digest.DigestUtils;
public final class Util {
private Util() {
throw new IllegalStateException("Utility class");
}
public static String generatePresentationId(String name) {
long timestamp = System.currentTimeMillis();

View File

@ -416,66 +416,70 @@ public class Meeting {
}
public User userLeft(String userid){
return (User) users.remove(userid);
return users.remove(userid);
}
public User getUserById(String id){
return this.users.get(id);
}
public User getUserWithExternalId(String externalUserId) {
for (String key : users.keySet()) {
User u = users.get(key);
if (u.getExternalUserId().equals(externalUserId)) {
return u;
}
}
return null;
}
public User getUserWithExternalId(String externalUserId) {
for (Map.Entry<String, User> entry : users.entrySet()) {
User u = entry.getValue();
if (u.getExternalUserId().equals(externalUserId)) {
return u;
}
}
return null;
}
public int getNumUsers(){
return this.users.size();
}
public int getNumModerators(){
int sum = 0;
for (String key : users.keySet()) {
User u = users.get(key);
if (u.isModerator()) sum++;
}
return sum;
}
public int getNumModerators() {
int sum = 0;
for (Map.Entry<String, User> entry : users.entrySet()) {
User u = entry.getValue();
if (u.isModerator())
sum++;
}
return sum;
}
public String getDialNumber() {
return dialNumber;
}
public int getNumListenOnly() {
int sum = 0;
for (String key : users.keySet()) {
User u = users.get(key);
if (u.isListeningOnly()) sum++;
}
return sum;
}
public int getNumListenOnly() {
int sum = 0;
for (Map.Entry<String, User> entry : users.entrySet()) {
User u = entry.getValue();
if (u.isListeningOnly())
sum++;
}
return sum;
}
public int getNumVoiceJoined() {
int sum = 0;
for (String key : users.keySet()) {
User u = users.get(key);
if (u.isVoiceJoined()) sum++;
}
return sum;
}
public int getNumVoiceJoined() {
int sum = 0;
for (Map.Entry<String, User> entry : users.entrySet()) {
User u = entry.getValue();
if (u.isVoiceJoined())
sum++;
}
return sum;
}
public int getNumVideos() {
int sum = 0;
for (String key : users.keySet()) {
User u = users.get(key);
sum += u.getStreams().size();
}
return sum;
}
public int getNumVideos() {
int sum = 0;
for (Map.Entry<String, User> entry : users.entrySet()) {
User u = entry.getValue();
sum += u.getStreams().size();
}
return sum;
}
public void addUserCustomData(String userID, Map<String, String> data) {
userCustomData.put(userID, data);

View File

@ -46,7 +46,7 @@ public class ReceivedMessageHandler implements IReceivedOldMessageHandler {
};
msgProcessorExec.execute(messageProcessor);
} catch (Exception e) {
log.error("Error subscribing to channels: {}", e.getMessage());
log.error("Error subscribing to channels: {}", e);
}
}

View File

@ -38,7 +38,7 @@ public class RedisStorageService {
log.debug("Saving metadata in {}", meetingId);
jedis.hmset("meeting:info:" + meetingId, info);
} catch (Exception e) {
log.warn("Cannot record the info meeting:" + meetingId, e);
log.warn("Cannot record the info meeting: {}" + meetingId, e);
} finally {
jedis.close();
}

View File

@ -2,6 +2,8 @@ package org.bigbluebutton.common.messages;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.StringUtils;
import com.google.gson.Gson;
public class MessageBuilder {
@ -21,7 +23,7 @@ public class MessageBuilder {
header.put(NAME, name);
header.put(VERSION, version);
header.put(TIMESTAMP, generateTimestamp());
if (replyTo != null && replyTo != "")
if (!StringUtils.isEmpty(replyTo))
header.put(REPLY_TO, replyTo);
return header;

View File

@ -20,19 +20,23 @@
package org.bigbluebutton.presentation;
public class ConversionMessageConstants {
public static final String OFFICE_DOC_CONVERSION_SUCCESS_KEY = "OFFICE_DOC_CONVERSION_SUCCESS";
public static final String OFFICE_DOC_CONVERSION_FAILED_KEY = "OFFICE_DOC_CONVERSION_FAILED";
public static final String OFFICE_DOC_CONVERSION_INVALID_KEY = "OFFICE_DOC_CONVERSION_INVALID";
public static final String SUPPORTED_DOCUMENT_KEY = "SUPPORTED_DOCUMENT";
public static final String UNSUPPORTED_DOCUMENT_KEY = "UNSUPPORTED_DOCUMENT";
public static final String PAGE_COUNT_FAILED_KEY = "PAGE_COUNT_FAILED";
public static final String PAGE_COUNT_EXCEEDED_KEY = "PAGE_COUNT_EXCEEDED";
public static final String GENERATED_SLIDE_KEY = "GENERATED_SLIDE";
public static final String GENERATING_THUMBNAIL_KEY = "GENERATING_THUMBNAIL";
public static final String GENERATED_THUMBNAIL_KEY = "GENERATED_THUMBNAIL";
public static final String GENERATING_TEXTFILES_KEY = "GENERATING_TEXTFILES";
public static final String GENERATED_TEXTFILES_KEY = "GENERATED_TEXTFILES";
public static final String GENERATING_SVGIMAGES_KEY = "GENERATING_SVGIMAGES";
public static final String GENERATED_SVGIMAGES_KEY = "GENERATED_SVGIMAGES";
public static final String CONVERSION_COMPLETED_KEY = "CONVERSION_COMPLETED";
public static final String OFFICE_DOC_CONVERSION_SUCCESS_KEY = "OFFICE_DOC_CONVERSION_SUCCESS";
public static final String OFFICE_DOC_CONVERSION_FAILED_KEY = "OFFICE_DOC_CONVERSION_FAILED";
public static final String OFFICE_DOC_CONVERSION_INVALID_KEY = "OFFICE_DOC_CONVERSION_INVALID";
public static final String SUPPORTED_DOCUMENT_KEY = "SUPPORTED_DOCUMENT";
public static final String UNSUPPORTED_DOCUMENT_KEY = "UNSUPPORTED_DOCUMENT";
public static final String PAGE_COUNT_FAILED_KEY = "PAGE_COUNT_FAILED";
public static final String PAGE_COUNT_EXCEEDED_KEY = "PAGE_COUNT_EXCEEDED";
public static final String GENERATED_SLIDE_KEY = "GENERATED_SLIDE";
public static final String GENERATING_THUMBNAIL_KEY = "GENERATING_THUMBNAIL";
public static final String GENERATED_THUMBNAIL_KEY = "GENERATED_THUMBNAIL";
public static final String GENERATING_TEXTFILES_KEY = "GENERATING_TEXTFILES";
public static final String GENERATED_TEXTFILES_KEY = "GENERATED_TEXTFILES";
public static final String GENERATING_SVGIMAGES_KEY = "GENERATING_SVGIMAGES";
public static final String GENERATED_SVGIMAGES_KEY = "GENERATED_SVGIMAGES";
public static final String CONVERSION_COMPLETED_KEY = "CONVERSION_COMPLETED";
private ConversionMessageConstants() {
throw new IllegalStateException("ConversionMessageConstants is a utility class. Instanciation is forbidden.");
}
}

View File

@ -32,11 +32,10 @@ public class OfficeToPdfConversionSuccessFilter {
private final IBbbWebApiGWApp gw;
private static Map<String, String> conversionMessagesMap;
private static Map<String, String> conversionMessagesMap = new HashMap<String, String>();
public OfficeToPdfConversionSuccessFilter(IBbbWebApiGWApp m) {
gw = m;
conversionMessagesMap = new HashMap<String, String>();
conversionMessagesMap.put(
ConversionMessageConstants.OFFICE_DOC_CONVERSION_SUCCESS_KEY,
"Office document successfully converted.");
@ -50,8 +49,7 @@ public class OfficeToPdfConversionSuccessFilter {
public boolean didConversionSucceed(UploadedPresentation pres) {
notifyProgressListener(pres);
return pres
.getConversionStatus() == ConversionMessageConstants.OFFICE_DOC_CONVERSION_SUCCESS_KEY;
return ConversionMessageConstants.OFFICE_DOC_CONVERSION_SUCCESS_KEY.equals(pres.getConversionStatus());
}
private void notifyProgressListener(UploadedPresentation pres) {
@ -66,7 +64,7 @@ public class OfficeToPdfConversionSuccessFilter {
msg.put("message", conversionMessagesMap.get(pres.getConversionStatus()));
msg.put("messageKey", pres.getConversionStatus());
log.info("Notifying of {} for ", pres.getConversionStatus(), pres.getUploadedFile().getAbsolutePath());
log.info("Notifying of {} for {}", pres.getConversionStatus(), pres.getUploadedFile().getAbsolutePath());
sendProgress(pres);
}

View File

@ -31,7 +31,7 @@ public class PresentationUrlDownloadService {
private static Logger log = LoggerFactory
.getLogger(PresentationUrlDownloadService.class);
private final int maxRedirects = 5;
private static final int MAX_REDIRECTS = 5;
private PageExtractor pageExtractor;
private DocumentConversionService documentConversionService;
private String presentationBaseURL;
@ -171,7 +171,7 @@ public class PresentationUrlDownloadService {
private String followRedirect(String meetingId, String redirectUrl,
int redirectCount, String origUrl) {
if (redirectCount > maxRedirects) {
if (redirectCount > MAX_REDIRECTS) {
log.error("Max redirect reached for meeting=[{}] with url=[{}]",
meetingId, origUrl);
return null;

Some files were not shown because too many files have changed in this diff Show More