forked from bigbluebutton/bigbluebutton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f0c185
commit 8199113
Showing
4 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...n/java/org/bigbluebutton/conference/service/recorder/polling/AbstractPollRecordEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ | ||
* | ||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below). | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under the | ||
* terms of the GNU Lesser General Public License as published by the Free Software | ||
* Foundation; either version 3.0 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License along | ||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
package org.bigbluebutton.conference.service.recorder.polling; | ||
|
||
import org.bigbluebutton.conference.service.recorder.RecordEvent; | ||
|
||
public abstract class AbstractPollRecordEvent extends RecordEvent { | ||
|
||
public AbstractPollRecordEvent() { | ||
setModule("POLL"); | ||
} | ||
} | ||
|
53 changes: 53 additions & 0 deletions
53
...in/java/org/bigbluebutton/conference/service/recorder/polling/PollCreatedRecordEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/** | ||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ | ||
* | ||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below). | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under the | ||
* terms of the GNU Lesser General Public License as published by the Free Software | ||
* Foundation; either version 3.0 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License along | ||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
package org.bigbluebutton.conference.service.recorder.polling; | ||
|
||
|
||
public class PollCreatedRecordEvent extends AbstractPollRecordEvent { | ||
private static final String POLL_ID = "pollID"; | ||
private static final String TITLE = "title"; | ||
private static final String QUESTION = "question"; | ||
private static final String DATETIME = "datetime"; | ||
private static final String ANSWERS = "answers"; | ||
|
||
public PollCreatedRecordEvent() { | ||
super(); | ||
setEvent("PollCreatedEvent"); | ||
} | ||
|
||
public void setPollID(String pollID) { | ||
eventMap.put(POLL_ID, pollID); | ||
} | ||
|
||
public void setTitle(String title) { | ||
eventMap.put(TITLE, title); | ||
} | ||
|
||
public void setQuestion(String question) { | ||
eventMap.put(QUESTION, question); | ||
} | ||
|
||
public void setDatetime(String datetime) { | ||
eventMap.put(DATETIME, datetime); | ||
} | ||
|
||
public void setAnswers(String answers) { | ||
eventMap.put(ANSWERS, answers); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...rc/main/java/org/bigbluebutton/conference/service/recorder/polling/PollEventRecorder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ | ||
* | ||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below). | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under the | ||
* terms of the GNU Lesser General Public License as published by the Free Software | ||
* Foundation; either version 3.0 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License along | ||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
package org.bigbluebutton.conference.service.recorder.polling; | ||
|
||
import org.bigbluebutton.conference.service.poll.Poll; | ||
import org.bigbluebutton.conference.service.poll.IPollRoomListener; | ||
import org.bigbluebutton.conference.service.recorder.RecorderApplication; | ||
|
||
public class PollEventRecorder implements IPollRoomListener{ | ||
|
||
private final RecorderApplication recorder; | ||
private final String session; | ||
|
||
String name = "RECORDER:POLL"; | ||
|
||
public PollEventRecorder(String session, RecorderApplication recorder){ | ||
this.recorder = recorder; | ||
this.session = session; | ||
} | ||
|
||
@Override | ||
public String getName(){ | ||
return name; | ||
} | ||
|
||
@Override | ||
public void savePoll(Poll poll ){ | ||
|
||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...n-apps/src/main/scala/org/bigbluebutton/core/apps/poll/redis/PollEventRedisRecorder.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.bigbluebutton.core.apps.poll.redis | ||
|
||
import org.bigbluebutton.conference.service.recorder.RecorderApplication | ||
import org.bigbluebutton.core.api.OutMessageListener2 | ||
import org.bigbluebutton.core.api.IOutMessage | ||
import org.bigbluebutton.core.apps.poll.messages._ | ||
import org.bigbluebutton.conference.service.recorder.polling.PollCreatedRecordEvent | ||
|
||
class PollEventRedisRecorder(recorder: RecorderApplication) extends OutMessageListener2 { | ||
|
||
def handleMessage(msg: IOutMessage) { | ||
msg match { | ||
/*case getPollsReplyOutMsg: GetPollsReplyOutMsg => handleGetPollsReplyOutMsg(getPollsReplyOutMsg) | ||
case pollClearedOutMsg : PollClearedOutMsg => handlePollClearedOutMsg(pollClearedOutMsg) | ||
case pollStartedOutMsg: PollStartedOutMsg => handlePollStartedOutMsg(pollStartedOutMsg) | ||
case pollStoppedOutMsg: PollStoppedOutMsg => handlePollStoppedOutMsg(pollStoppedOutMsg) | ||
case pollRemovedOutMsg: PollRemovedOutMsg => handlePollRemovedOutMsg(pollRemovedOutMsg) | ||
case pollUpdatedOutMsg: PollUpdatedOutMsg => handlePollUpdatedOutMsg(pollUpdatedOutMsg)*/ | ||
case pollCreatedOutMsg: PollCreatedOutMsg => handlePollCreatedOutMsg(pollCreatedOutMsg) | ||
case _ => // do nothing | ||
} | ||
} | ||
|
||
def handlePollCreatedOutMsg(msg: PollCreatedOutMsg):Unit = { | ||
if (msg.recorded) { | ||
val ev = new PollCreatedRecordEvent(); | ||
ev.setPollID(msg.pollVO.id) | ||
ev.setTitle(msg.pollVO.title) | ||
ev.setQuestion(msg.pollVO.questions(0).question) | ||
//ev.setDatetime(map.datetime) | ||
// probably the answer will be stored as json | ||
//ev.setAnswers("") | ||
ev.setTimestamp(System.currentTimeMillis()) | ||
ev.setMeetingId(msg.meetingID) | ||
recorder.record(msg.meetingID, ev) | ||
} | ||
|
||
} | ||
|
||
} |