use of org.olat.modules.openmeetings.manager.OpenMeetingsException in project OpenOLAT by OpenOLAT.
the class OpenMeetingsRunController method doStart.
private void doStart(UserRequest ureq) {
if (room == null && room.getRoomId() <= 0) {
showError("room.notfound.error");
} else {
try {
String securedHash = openMeetingsManager.setUserToRoom(getIdentity(), room.getRoomId(), moderator);
String url = openMeetingsManager.getURL(getIdentity(), room.getRoomId(), securedHash, getLocale());
RedirectMediaResource redirect = new RedirectMediaResource(url);
ureq.getDispatchResult().setResultingMediaResource(redirect);
} catch (OpenMeetingsException e) {
showError(e.i18nKey());
}
}
}
use of org.olat.modules.openmeetings.manager.OpenMeetingsException in project OpenOLAT by OpenOLAT.
the class OpenMeetingsRunController method redirectToGuestRoom.
private void redirectToGuestRoom(String firstName, String lastName) {
if (room == null && room.getRoomId() <= 0) {
showError("room.notfound.error");
} else {
try {
String securedHash = openMeetingsManager.setGuestUserToRoom(firstName, lastName, room.getRoomId());
String url = openMeetingsManager.getURL(getIdentity(), room.getRoomId(), securedHash, getLocale());
DisplayOrDownloadComponent cmp = new DisplayOrDownloadComponent("openCommand", url);
mainVC.put("openCmd", cmp);
} catch (OpenMeetingsException e) {
showError(e.i18nKey());
}
}
}
use of org.olat.modules.openmeetings.manager.OpenMeetingsException in project OpenOLAT by OpenOLAT.
the class CollaborationTools method deleteTools.
/**
* delete all CollaborationTools stuff from the database, which is related to
* the calling OLATResourceable.
*/
public void deleteTools(BusinessGroup businessGroupTodelete) {
NarrowedPropertyManager npm = NarrowedPropertyManager.getInstance(ores);
/*
* delete the forum, if existing
*/
ForumManager fom = ForumManager.getInstance();
Property forumKeyProperty = npm.findProperty(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_FORUM);
if (forumKeyProperty != null) {
// if there was a forum, delete it
Long forumKey = forumKeyProperty.getLongValue();
if (forumKey == null)
throw new AssertException("property had no longValue, prop:" + forumKeyProperty);
fom.deleteForum(forumKey);
}
/*
* delete the folder, if existing
*/
OlatRootFolderImpl vfsContainer = new OlatRootFolderImpl(getFolderRelPath(), null);
File fFolderRoot = vfsContainer.getBasefile();
if (fFolderRoot.exists()) {
FileUtils.deleteDirsAndFiles(fFolderRoot, true, true);
}
/*
* delete the wiki if existing
*/
VFSContainer rootContainer = WikiManager.getInstance().getWikiRootContainer(ores);
if (rootContainer != null)
rootContainer.delete();
/*
* Delete calendar if exists
*/
if (businessGroupTodelete != null) {
CoreSpringFactory.getImpl(ImportToCalendarManager.class).deleteGroupImportedCalendars(businessGroupTodelete);
CoreSpringFactory.getImpl(CalendarManager.class).deleteGroupCalendar(businessGroupTodelete);
}
/*
* delete chatRoom
*/
// no cleanup needed, automatically done when last user exits the room
/*
* delete all Properties defining enabled/disabled CollabTool XY and the
* news content
*/
npm.deleteProperties(null, null, PROP_CAT_BG_COLLABTOOLS, null);
/*
* Delete OpenMeetings room
*/
OpenMeetingsModule omModule = CoreSpringFactory.getImpl(OpenMeetingsModule.class);
if (omModule.isEnabled()) {
OpenMeetingsManager omManager = CoreSpringFactory.getImpl(OpenMeetingsManager.class);
try {
omManager.deleteAll(ores, null, null);
} catch (OpenMeetingsException e) {
log.error("A room could not be deleted for group: " + ores, e);
}
}
/*
* and last but not least the cache is reseted
*/
cacheToolStates.clear();
this.dirty = true;
}
use of org.olat.modules.openmeetings.manager.OpenMeetingsException in project OpenOLAT by OpenOLAT.
the class OpenMeetingsRecordingController method event.
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (source == downloadLink) {
try {
String url = openMeetingsManager.getRecordingURL(recording);
MediaResource downloadUrl = new RedirectMediaResource(url);
ureq.getDispatchResult().setResultingMediaResource(downloadUrl);
} catch (OpenMeetingsException e) {
logError("", e);
}
}
}
use of org.olat.modules.openmeetings.manager.OpenMeetingsException 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());
}
}
Aggregations