Search in sources :

Example 11 with OpenMeetingsException

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());
    }
}
Also used : OpenMeetingsRoom(org.olat.modules.openmeetings.model.OpenMeetingsRoom) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) OpenMeetingsException(org.olat.modules.openmeetings.manager.OpenMeetingsException)

Example 12 with OpenMeetingsException

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());
        }
    }
}
Also used : DisplayOrDownloadComponent(org.olat.core.gui.components.download.DisplayOrDownloadComponent) OpenMeetingsException(org.olat.modules.openmeetings.manager.OpenMeetingsException)

Example 13 with OpenMeetingsException

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;
}
Also used : AssertException(org.olat.core.logging.AssertException) VFSContainer(org.olat.core.util.vfs.VFSContainer) OpenMeetingsModule(org.olat.modules.openmeetings.OpenMeetingsModule) ImportToCalendarManager(org.olat.commons.calendar.manager.ImportToCalendarManager) ImportToCalendarManager(org.olat.commons.calendar.manager.ImportToCalendarManager) CalendarManager(org.olat.commons.calendar.CalendarManager) OlatRootFolderImpl(org.olat.core.commons.modules.bc.vfs.OlatRootFolderImpl) ForumManager(org.olat.modules.fo.manager.ForumManager) OpenMeetingsException(org.olat.modules.openmeetings.manager.OpenMeetingsException) NarrowedPropertyManager(org.olat.properties.NarrowedPropertyManager) Property(org.olat.properties.Property) File(java.io.File) OpenMeetingsManager(org.olat.modules.openmeetings.manager.OpenMeetingsManager)

Example 14 with OpenMeetingsException

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);
    }
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) OpenMeetingsException(org.olat.modules.openmeetings.manager.OpenMeetingsException) OpenMeetingsManager(org.olat.modules.openmeetings.manager.OpenMeetingsManager)

Aggregations

OpenMeetingsException (org.olat.modules.openmeetings.manager.OpenMeetingsException)14 RedirectMediaResource (org.olat.core.gui.media.RedirectMediaResource)4 OpenMeetingsManager (org.olat.modules.openmeetings.manager.OpenMeetingsManager)4 File (java.io.File)2 ArrayList (java.util.ArrayList)2 CalendarManager (org.olat.commons.calendar.CalendarManager)2 ImportToCalendarManager (org.olat.commons.calendar.manager.ImportToCalendarManager)2 OlatRootFolderImpl (org.olat.core.commons.modules.bc.vfs.OlatRootFolderImpl)2 DisplayOrDownloadComponent (org.olat.core.gui.components.download.DisplayOrDownloadComponent)2 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)2 MediaResource (org.olat.core.gui.media.MediaResource)2 OLATResourceable (org.olat.core.id.OLATResourceable)2 AssertException (org.olat.core.logging.AssertException)2 VFSContainer (org.olat.core.util.vfs.VFSContainer)2 ForumManager (org.olat.modules.fo.manager.ForumManager)2 OpenMeetingsModule (org.olat.modules.openmeetings.OpenMeetingsModule)2 OpenMeetingsRecording (org.olat.modules.openmeetings.model.OpenMeetingsRecording)2 OpenMeetingsRoom (org.olat.modules.openmeetings.model.OpenMeetingsRoom)2 NarrowedPropertyManager (org.olat.properties.NarrowedPropertyManager)2 Property (org.olat.properties.Property)2