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);
}
}
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();
}
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();
}
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());
}
}
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);
}
}
Aggregations