Skip to content
Snippets Groups Projects
Commit 41824477 authored by Florian Gnägi's avatar Florian Gnägi
Browse files

OO-4860 use meetingID and not identifier when query OpenCast for BBB

recordings
parent 86013cb2
No related branches found
No related tags found
No related merge requests found
...@@ -37,81 +37,208 @@ public interface BigBlueButtonMeeting extends ModifiedInfo, CreateInfo { ...@@ -37,81 +37,208 @@ public interface BigBlueButtonMeeting extends ModifiedInfo, CreateInfo {
public Long getKey(); public Long getKey();
/**
* The meeting ID used when creating a BBB Meeting via API. In the BBB recording
* metadata this is referred as "externalId".
*
* @return
*/
public String getMeetingId(); public String getMeetingId();
public String getAttendeePassword(); public String getAttendeePassword();
public String getModeratorPassword(); public String getModeratorPassword();
/**
* The name of the meeting used in OpenOlat and BBB
*
* @return
*/
public String getName(); public String getName();
public void setName(String name); public void setName(String name);
/**
* The description of the meeting is displayed in OpenOlat before joining
*
* @return
*/
public String getDescription(); public String getDescription();
public void setDescription(String description); public void setDescription(String description);
/**
* The welcome message is displayed in BBB after joining the meeting.
*
* @return
*/
public String getWelcome(); public String getWelcome();
public void setWelcome(String welcome); public void setWelcome(String welcome);
/**
* The layout pre sets arrangements of cams and presentations
* @return
*/
public BigBlueButtonMeetingLayoutEnum getMeetingLayout(); public BigBlueButtonMeetingLayoutEnum getMeetingLayout();
public void setMeetingLayout(BigBlueButtonMeetingLayoutEnum layout); public void setMeetingLayout(BigBlueButtonMeetingLayoutEnum layout);
/**
* Permanent meetings have no start and end date. E.g. for groups who want to
* make spontaneous meetings without scheduling meetings in the first place.
* Note that permanent can quickly consume the available meeting quota as the
* count as current active meetings.
*
* @return
*/
public boolean isPermanent(); public boolean isPermanent();
public void setPermanent(boolean permanent); public void setPermanent(boolean permanent);
/**
* Allow joining of external users via URL and name input field.
* @return
*/
public boolean isGuest(); public boolean isGuest();
public void setGuest(boolean guest); public void setGuest(boolean guest);
/**
* The identifier is used in the OpenOlat BBB dispatcher to not expose the real
* meeting ID to the user, e.g. when accessed by external guests. BBB does not now
* this ID, it is OO internal only.
*
* @return
*/
public String getIdentifier(); public String getIdentifier();
/**
* The readable identifier is similar to the identifier but can be modified by
* users in the edit for to create a human readable URL when sending the meeting
* join url via email to participants. BBB does not now this ID, it is OO
* internal only.
*
* @return
*/
public String getReadableIdentifier(); public String getReadableIdentifier();
public void setReadableIdentifier(String readableIdentifier); public void setReadableIdentifier(String readableIdentifier);
/**
* If not a permanent meeting, the meetings starts at this date. Participants
* and guests can join at this time.
*
* @return
*/
public Date getStartDate(); public Date getStartDate();
public void setStartDate(Date start); public void setStartDate(Date start);
/**
* The minutes a meeting can be joined by the coaches prior to the start time,
* e.g. for preparation of slides. Is not taken into account room quota
* calculation.
*
* @return
*/
public long getLeadTime(); public long getLeadTime();
public void setLeadTime(long leadTime); public void setLeadTime(long leadTime);
/**
* The calculated date when the BBB meeting can be opened technically
* @return
*/
public Date getStartWithLeadTime(); public Date getStartWithLeadTime();
/**
* If not a permanent meeting, the meetings ends at this date.
*
* @return
*/
public Date getEndDate(); public Date getEndDate();
public void setEndDate(Date end); public void setEndDate(Date end);
/**
* The minutes a meeting can be over time. Is not taken into account room quota
* calculation.
*
* @return
*/
public long getFollowupTime(); public long getFollowupTime();
public void setFollowupTime(long followupTime); public void setFollowupTime(long followupTime);
/**
* The calculated latest date when the BBB meeting is closed automatically
*
* @return
*/
public Date getEndWithFollowupTime(); public Date getEndWithFollowupTime();
/**
* Flag to auto or manual publish the recordings
*
* @return
*/
public BigBlueButtonRecordingsPublishingEnum getRecordingsPublishingEnum(); public BigBlueButtonRecordingsPublishingEnum getRecordingsPublishingEnum();
public void setRecordingsPublishingEnum(BigBlueButtonRecordingsPublishingEnum publishing); public void setRecordingsPublishingEnum(BigBlueButtonRecordingsPublishingEnum publishing);
/**
* The plain text name of the presenter or main organizer. By default the name
* of the creator but can be change to anything. Metadata just for display
* purposes.
*
* @return
*/
public String getMainPresenter(); public String getMainPresenter();
public void setMainPresenter(String name); public void setMainPresenter(String name);
/**
* The identity who create the meeting
*
* @return
*/
public Identity getCreator(); public Identity getCreator();
public BigBlueButtonMeetingTemplate getTemplate(); public BigBlueButtonMeetingTemplate getTemplate();
public void setTemplate(BigBlueButtonMeetingTemplate template); public void setTemplate(BigBlueButtonMeetingTemplate template);
/**
* The group if it is a group meeting. Can be null for non-group meetings.
* @return
*/
public BusinessGroup getBusinessGroup(); public BusinessGroup getBusinessGroup();
/**
* The course repository entry in which the meetings was created. Can be null,
* e.g. when it is a group meeting.
*
* @return
*/
public RepositoryEntry getEntry(); public RepositoryEntry getEntry();
/**
* The sub identifier for the repository entry, normally the course node ID. Can
* be null.
*
* @return
*/
public String getSubIdent(); public String getSubIdent();
/**
* The server on which the meeting runs. Can be null if the meeting has not yet
* been created on the BBB server. Permanent meetings will always run on the
* same BBB server.
*
* @return
*/
public BigBlueButtonServer getServer(); public BigBlueButtonServer getServer();
} }
...@@ -61,15 +61,18 @@ public class BigBlueButtonMeetingDAO { ...@@ -61,15 +61,18 @@ public class BigBlueButtonMeetingDAO {
meeting.setCreationDate(new Date()); meeting.setCreationDate(new Date());
meeting.setLastModified(meeting.getCreationDate()); meeting.setLastModified(meeting.getCreationDate());
meeting.setName(name); meeting.setName(name);
// ID for BBB used as meetingID, in metadata as "externalId"
meeting.setMeetingId(UUID.randomUUID().toString()); meeting.setMeetingId(UUID.randomUUID().toString());
meeting.setAttendeePassword(UUID.randomUUID().toString()); meeting.setAttendeePassword(UUID.randomUUID().toString());
meeting.setModeratorPassword(UUID.randomUUID().toString()); meeting.setModeratorPassword(UUID.randomUUID().toString());
meeting.setMeetingLayout(BigBlueButtonMeetingLayoutEnum.standard); meeting.setMeetingLayout(BigBlueButtonMeetingLayoutEnum.standard);
meeting.setGuest(false); meeting.setGuest(false);
// ID for OO internal dispatcher (guest access). BBB does not now this ID.
meeting.setIdentifier(UUID.randomUUID().toString()); meeting.setIdentifier(UUID.randomUUID().toString());
meeting.setEntry(entry); meeting.setEntry(entry);
// ID for OO internal context subinformation such as the course node ID
meeting.setSubIdent(subIdent); meeting.setSubIdent(subIdent);
meeting.setBusinessGroup(businessGroup); meeting.setBusinessGroup(businessGroup);
......
...@@ -105,12 +105,12 @@ public class BigBlueButtonOpenCastRecordingsHandler implements BigBlueButtonReco ...@@ -105,12 +105,12 @@ public class BigBlueButtonOpenCastRecordingsHandler implements BigBlueButtonReco
return Collections.emptyList(); return Collections.emptyList();
} }
List<OpencastEvent> events = opencastService.getEvents(meeting.getIdentifier()); List<OpencastEvent> events = opencastService.getEvents(meeting.getMeetingId());
List<BigBlueButtonRecording> recordings = new ArrayList<>(events.size()); List<BigBlueButtonRecording> recordings = new ArrayList<>(events.size());
for (OpencastEvent event : events) { for (OpencastEvent event : events) {
String recordId = event.getIdentifier(); String recordId = event.getIdentifier();
String name = event.getTitle(); String name = event.getTitle();
String meetingId = meeting.getIdentifier(); String meetingId = meeting.getMeetingId();
Date startTime = event.getStart(); Date startTime = event.getStart();
Date endTime = event.getEnd(); Date endTime = event.getEnd();
String url = null; String url = null;
...@@ -213,7 +213,16 @@ public class BigBlueButtonOpenCastRecordingsHandler implements BigBlueButtonReco ...@@ -213,7 +213,16 @@ public class BigBlueButtonOpenCastRecordingsHandler implements BigBlueButtonReco
errors.append(new BigBlueButtonError(BigBlueButtonErrorCodes.opencastDisabled)); errors.append(new BigBlueButtonError(BigBlueButtonErrorCodes.opencastDisabled));
return false; return false;
} }
boolean success = false;
return opencastService.deleteEvents(meeting.getIdentifier()); for (BigBlueButtonRecording recording : recordings) {
boolean ok = opencastService.deleteEvents(recording.getRecordId());
if (!ok) {
log.warn("Could not delete open case event::{} for meetingId::{})", recording.getRecordId(), meeting.getMeetingId());
errors.append(new BigBlueButtonError(BigBlueButtonErrorCodes.unkown));
return false;
}
success &= ok;
}
return success;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment