use of org.olat.modules.openmeetings.model.OpenMeetingsRecording in project OpenOLAT by OpenOLAT.
the class OpenMeetingsManagerImpl method getRecordings.
@Override
public List<OpenMeetingsRecording> getRecordings(long roomId) throws OpenMeetingsException {
try {
String adminSID = adminLogin();
RoomServicePortType roomWs = getRoomWebService();
List<FlvRecording> recordings = roomWs.getFlvRecordingByRoomId(adminSID, roomId);
List<OpenMeetingsRecording> recList = new ArrayList<OpenMeetingsRecording>();
if (recordings != null) {
for (FlvRecording recording : recordings) {
if (recording != null) {
OpenMeetingsRecording rec = new OpenMeetingsRecording();
rec.setRoomId(recording.getRoomId());
rec.setRecordingId(recording.getFlvRecordingId());
rec.setFilename(recording.getFileName());
rec.setDownloadName(recording.getFileHash());
rec.setDownloadNameAlt(recording.getAlternateDownload());
rec.setPreviewImage(recording.getPreviewImage());
rec.setWidth(recording.getFlvWidth());
rec.setHeight(recording.getFlvHeight());
recList.add(rec);
}
}
}
return recList;
} catch (Exception e) {
log.error("", e);
throw translateException(e, 0);
}
}
use of org.olat.modules.openmeetings.model.OpenMeetingsRecording in project OpenOLAT by OpenOLAT.
the class OpenMeetingsRecordingsController method event.
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (source == tableCtr) {
if (event instanceof TableEvent) {
TableEvent e = (TableEvent) event;
int row = e.getRowId();
OpenMeetingsRecording recording = (OpenMeetingsRecording) tableCtr.getTableDataModel().getObject(row);
if ("view".equals(e.getActionId())) {
doView(ureq, recording);
} else if ("delete".equals(e.getActionId())) {
String text = getTranslator().translate("recording.remove", new String[] { recording.getFilename() });
confirmRemoveRecording = activateYesNoDialog(ureq, null, text, confirmRemoveRecording);
confirmRemoveRecording.setUserObject(recording);
}
}
} else if (source == confirmRemoveRecording) {
if (DialogBoxUIFactory.isYesEvent(event)) {
// yes case
OpenMeetingsRecording recording = (OpenMeetingsRecording) confirmRemoveRecording.getUserObject();
doDelete(recording);
}
}
}
use of org.olat.modules.openmeetings.model.OpenMeetingsRecording in project openolat by klemens.
the class OpenMeetingsRecordingsController method event.
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (source == tableCtr) {
if (event instanceof TableEvent) {
TableEvent e = (TableEvent) event;
int row = e.getRowId();
OpenMeetingsRecording recording = (OpenMeetingsRecording) tableCtr.getTableDataModel().getObject(row);
if ("view".equals(e.getActionId())) {
doView(ureq, recording);
} else if ("delete".equals(e.getActionId())) {
String text = getTranslator().translate("recording.remove", new String[] { recording.getFilename() });
confirmRemoveRecording = activateYesNoDialog(ureq, null, text, confirmRemoveRecording);
confirmRemoveRecording.setUserObject(recording);
}
}
} else if (source == confirmRemoveRecording) {
if (DialogBoxUIFactory.isYesEvent(event)) {
// yes case
OpenMeetingsRecording recording = (OpenMeetingsRecording) confirmRemoveRecording.getUserObject();
doDelete(recording);
}
}
}
use of org.olat.modules.openmeetings.model.OpenMeetingsRecording in project OpenOLAT by OpenOLAT.
the class OpenMeetingsRecordingsController method loadModel.
private void loadModel() {
try {
List<OpenMeetingsRecording> recordings = openMeetingsManager.getRecordings(roomId);
List<OpenMeetingsRecording> readyRecordings = new ArrayList<OpenMeetingsRecording>(recordings.size());
for (OpenMeetingsRecording recording : recordings) {
if (StringHelper.containsNonWhitespace(recording.getDownloadName())) {
readyRecordings.add(recording);
}
}
((OpenMeetingsRecordingsDataModel) tableCtr.getTableDataModel()).setObjects(readyRecordings);
tableCtr.modelChanged();
} catch (OpenMeetingsException e) {
showError(e.i18nKey());
}
}
use of org.olat.modules.openmeetings.model.OpenMeetingsRecording in project openolat by klemens.
the class OpenMeetingsRecordingsController method loadModel.
private void loadModel() {
try {
List<OpenMeetingsRecording> recordings = openMeetingsManager.getRecordings(roomId);
List<OpenMeetingsRecording> readyRecordings = new ArrayList<OpenMeetingsRecording>(recordings.size());
for (OpenMeetingsRecording recording : recordings) {
if (StringHelper.containsNonWhitespace(recording.getDownloadName())) {
readyRecordings.add(recording);
}
}
((OpenMeetingsRecordingsDataModel) tableCtr.getTableDataModel()).setObjects(readyRecordings);
tableCtr.modelChanged();
} catch (OpenMeetingsException e) {
showError(e.i18nKey());
}
}
Aggregations