Search in sources :

Example 11 with GoToError

use of org.olat.modules.gotomeeting.model.GoToError in project OpenOLAT by OpenOLAT.

the class GoToMeetingController method doStart.

private void doStart(UserRequest ureq) {
    if (registrant == null) {
        GoToError error = new GoToError();
        registrant = meetingMgr.registerTraining(meeting, getIdentity(), error);
    }
    GoToError error = new GoToError();
    String startUrl = meetingMgr.startTraining(meeting, error);
    if (startUrl != null) {
        RedirectMediaResource redirect = new RedirectMediaResource(startUrl);
        ureq.getDispatchResult().setResultingMediaResource(redirect);
    } else if (error.getError() == GoToErrors.TrainingInSession) {
        String joinUrl = registrant.getJoinUrl();
        RedirectMediaResource redirect = new RedirectMediaResource(joinUrl);
        ureq.getDispatchResult().setResultingMediaResource(redirect);
    }
}
Also used : GoToError(org.olat.modules.gotomeeting.model.GoToError) RedirectMediaResource(org.olat.core.gui.media.RedirectMediaResource)

Example 12 with GoToError

use of org.olat.modules.gotomeeting.model.GoToError in project OpenOLAT by OpenOLAT.

the class GoToMeetingController method doRegister.

private void doRegister() {
    if (registrant == null) {
        GoToError error = new GoToError();
        registrant = meetingMgr.registerTraining(meeting, getIdentity(), error);
        if (registrant != null) {
            showInfo("training.register.success");
        } else {
            showWarning("training.register.failed");
        }
    }
    updateButtons();
}
Also used : GoToError(org.olat.modules.gotomeeting.model.GoToError)

Example 13 with GoToError

use of org.olat.modules.gotomeeting.model.GoToError in project openolat by klemens.

the class GoToTrainingWebService method handleUnexpectedException.

private Response handleUnexpectedException() {
    GoToError status = new GoToError(GoToErrors.Unkown);
    GoToErrorVO error = new GoToErrorVO(status, "GoToTraining server returned an unexpected error");
    return Response.serverError().entity(error).status(Status.INTERNAL_SERVER_ERROR).build();
}
Also used : GoToError(org.olat.modules.gotomeeting.model.GoToError)

Example 14 with GoToError

use of org.olat.modules.gotomeeting.model.GoToError in project openolat by klemens.

the class EditOrganizerController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    String name = accountLabelEl.getValue();
    String username = usernameEl.getValue();
    String password = passwordEl.getValue();
    GoToError error = new GoToError();
    if (meetingManager.addOrganizer(name, username, password, owner, error)) {
        fireEvent(ureq, Event.DONE_EVENT);
    } else {
        showWarning("error.code." + error.getErrorCode());
    }
}
Also used : GoToError(org.olat.modules.gotomeeting.model.GoToError)

Example 15 with GoToError

use of org.olat.modules.gotomeeting.model.GoToError in project openolat by klemens.

the class EditTrainingController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    String name = nameEl.getValue();
    String description = descriptionEl.getValue();
    Date start = startDateEl.getDate();
    Date end = endDateEl.getDate();
    GoToError error = new GoToError();
    if (meeting == null) {
        String selectedKeyStr = organizersEl.getSelectedKey();
        int selectedIndex = Integer.parseInt(selectedKeyStr);
        GoToOrganizer organizer = availablesOrganizers.get(selectedIndex);
        meetingManager.scheduleTraining(organizer, name, null, description, start, end, entry, subIdent, businessGroup, error);
    } else {
        meetingManager.updateTraining(meeting, name, description, start, end, error);
    }
    if (error.hasError()) {
        fireEvent(ureq, new GoToErrorEvent(error));
    } else {
        fireEvent(ureq, Event.DONE_EVENT);
    }
}
Also used : GoToOrganizer(org.olat.modules.gotomeeting.GoToOrganizer) GoToError(org.olat.modules.gotomeeting.model.GoToError) Date(java.util.Date)

Aggregations

GoToError (org.olat.modules.gotomeeting.model.GoToError)16 RedirectMediaResource (org.olat.core.gui.media.RedirectMediaResource)4 GoToOrganizer (org.olat.modules.gotomeeting.GoToOrganizer)4 Date (java.util.Date)2 Response (javax.ws.rs.core.Response)2 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)2 UserRequest (org.olat.core.gui.UserRequest)2 DefaultFlexiColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)2 FlexiTableColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel)2 Controller (org.olat.core.gui.control.Controller)2 WindowControl (org.olat.core.gui.control.WindowControl)2 BasicController (org.olat.core.gui.control.controller.BasicController)2 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)2 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)2 GoToMeeting (org.olat.modules.gotomeeting.GoToMeeting)2 GoToRecordingsG2T (org.olat.modules.gotomeeting.model.GoToRecordingsG2T)2