use of org.olat.modules.openmeetings.manager.OpenMeetingsException in project openolat by klemens.
the class OpenMeetingsRunController method doOpenMembers.
private void doOpenMembers(UserRequest ureq) {
cleanupPopups();
try {
OpenMeetingsRoom reloadedRoom = openMeetingsManager.getRoom(group, ores, subIdentifier);
membersController = new OpenMeetingsAdminRoomMembersController(ureq, getWindowControl(), reloadedRoom, readOnly);
listenTo(membersController);
cmc = new CloseableModalController(getWindowControl(), translate("close"), membersController.getInitialComponent(), true, translate("room.members"));
listenTo(cmc);
cmc.activate();
} catch (OpenMeetingsException e) {
showError(e.i18nKey());
}
}
use of org.olat.modules.openmeetings.manager.OpenMeetingsException in project openolat by klemens.
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 klemens.
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 klemens.
the class OpenMeetingsCourseNode method cleanupOnDelete.
@Override
public void cleanupOnDelete(ICourse course) {
super.cleanupOnDelete(course);
// load configuration
OpenMeetingsManager provider = CoreSpringFactory.getImpl(OpenMeetingsManager.class);
// remove meeting
OLATResourceable ores = OresHelper.createOLATResourceableInstance(course.getResourceableTypeName(), course.getResourceableId());
try {
provider.deleteAll(null, ores, getIdent());
} catch (OpenMeetingsException e) {
log.error("A room could not be deleted for course node: " + getIdent() + " of course:" + course, e);
}
}
Aggregations