use of org.olat.modules.gotomeeting.model.GoToError in project OpenOLAT by OpenOLAT.
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 OpenOLAT.
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);
}
}
use of org.olat.modules.gotomeeting.model.GoToError in project OpenOLAT by OpenOLAT.
the class GoToMeetingController method doJoin.
private void doJoin(UserRequest ureq) {
boolean join = false;
GoToError error = new GoToError();
if (registrant == null) {
registrant = meetingMgr.registerTraining(meeting, getIdentity(), error);
}
if (registrant != null) {
String joinUrl = registrant.getJoinUrl();
if (joinUrl != null) {
RedirectMediaResource redirect = new RedirectMediaResource(joinUrl);
ureq.getDispatchResult().setResultingMediaResource(redirect);
join = true;
}
}
if (!join) {
final String errorMessage;
if (error.hasError()) {
if (error.getError() != null) {
errorMessage = translate(error.getError().i18nKey());
} else {
errorMessage = translate("error.code.unkown");
}
} else {
errorMessage = translate("error.code.unkown");
}
ControllerCreator creator = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, new ControllerCreator() {
@Override
public Controller createController(UserRequest lureq, WindowControl lwControl) {
// Wrap in column layout, popup window needs a layout controller
String title = "";
String text = errorMessage;
Controller ctr = MessageUIFactory.createErrorMessage(lureq, lwControl, title, text);
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, ctr);
layoutCtr.addDisposableChildController(ctr);
return layoutCtr;
}
});
openInNewBrowserWindow(ureq, creator);
}
updateButtons();
}
use of org.olat.modules.gotomeeting.model.GoToError in project OpenOLAT by OpenOLAT.
the class GoToRecordingsController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
// add the table
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RecordingsCols.name.i18nHeaderKey(), RecordingsCols.name.ordinal(), true, RecordingsCols.name.name()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RecordingsCols.start.i18nHeaderKey(), RecordingsCols.start.ordinal(), true, RecordingsCols.start.name()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RecordingsCols.end.i18nHeaderKey(), RecordingsCols.end.ordinal(), true, RecordingsCols.end.name()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("select", translate("select"), "select"));
tableModel = new GoToRecordingsTableModel(columnsModel);
GoToError error = new GoToError();
List<GoToRecordingsG2T> recordings = meetingMgr.getRecordings(meeting, error);
if (recordings == null) {
recordings = new ArrayList<>(1);
}
tableModel.setObjects(recordings);
tableEl = uifactory.addTableElement(getWindowControl(), "recordings", tableModel, getTranslator(), formLayout);
tableEl.setEmtpyTableMessageKey("recordings.empty");
tableEl.setCustomizeColumns(false);
}
use of org.olat.modules.gotomeeting.model.GoToError in project OpenOLAT by OpenOLAT.
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());
}
}
Aggregations