use of org.olat.modules.gotomeeting.GoToMeeting in project OpenOLAT by OpenOLAT.
the class GoToMeetingsAdminController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
if ("delete".equals(se.getCommand())) {
GoToMeeting meeting = tableModel.getObject(se.getIndex());
doConfirmDelete(ureq, meeting);
} else if ("resource".equals(se.getCommand())) {
GoToMeeting meeting = tableModel.getObject(se.getIndex());
doOpenResource(ureq, meeting);
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.modules.gotomeeting.GoToMeeting in project openolat by klemens.
the class GoToMeetingDAOTest method loadMeetingByKey.
@Test
public void loadMeetingByKey() {
RepositoryEntry entry = JunitTestHelper.createAndPersistRepositoryEntry();
String username = UUID.randomUUID().toString();
String accessToken = UUID.randomUUID().toString();
String organizerKey = UUID.randomUUID().toString();
GoToOrganizer organizer = organizerDao.createOrganizer(null, username, accessToken, organizerKey, "Levinus", "Memminger", null, null, 10l, null);
Assert.assertNotNull(organizer);
Date start = new Date();
Date end = new Date();
String trainingKey = Long.toString(CodeHelper.getForeverUniqueID());
GoToMeeting training = meetingDao.createTraining("Training by key", null, "Load training by key", trainingKey, start, end, organizer, entry, "d9915", null);
dbInstance.commitAndCloseSession();
Assert.assertNotNull(training);
GoToMeeting reloadedTraining = meetingDao.loadMeetingByKey(training.getKey());
Assert.assertNotNull(reloadedTraining);
Assert.assertEquals(training, reloadedTraining);
}
use of org.olat.modules.gotomeeting.GoToMeeting in project openolat by klemens.
the class GoToMeetingDAOTest method getMeetings_withRepositoryEntry.
@Test
public void getMeetings_withRepositoryEntry() {
RepositoryEntry entry = JunitTestHelper.createAndPersistRepositoryEntry();
String username = UUID.randomUUID().toString();
String accessToken = UUID.randomUUID().toString();
String organizerKey = UUID.randomUUID().toString();
GoToOrganizer organizer = organizerDao.createOrganizer(null, username, accessToken, organizerKey, "Michael", "Wolgemut", null, null, 10l, null);
Assert.assertNotNull(organizer);
Date start = new Date();
Date end = new Date();
String trainingKey = Long.toString(CodeHelper.getForeverUniqueID());
GoToMeeting training = meetingDao.createTraining("New training", null, "Very interessant", trainingKey, start, end, organizer, entry, "d9912", null);
dbInstance.commit();
Assert.assertNotNull(training);
List<GoToMeeting> meetings = meetingDao.getMeetings(GoToType.training, entry, "d9912", null);
Assert.assertNotNull(meetings);
Assert.assertEquals(1, meetings.size());
Assert.assertTrue(meetings.contains(training));
}
use of org.olat.modules.gotomeeting.GoToMeeting in project openolat by klemens.
the class GoToMeetingDAOTest method createMeeting_without.
@Test
public void createMeeting_without() {
String username = UUID.randomUUID().toString();
String accessToken = UUID.randomUUID().toString();
String organizerKey = UUID.randomUUID().toString();
GoToOrganizer organizer = organizerDao.createOrganizer("My account", username, accessToken, organizerKey, "Lucas", "de Leyde", null, null, 10l, null);
Assert.assertNotNull(organizer);
Date start = new Date();
Date end = new Date();
String trainingKey = Long.toString(CodeHelper.getForeverUniqueID());
GoToMeeting training = meetingDao.createTraining("New training", null, "Very interessant", trainingKey, start, end, organizer, null, null, null);
dbInstance.commit();
Assert.assertNotNull(training);
Assert.assertNotNull(training.getKey());
Assert.assertNotNull(training.getCreationDate());
Assert.assertNotNull(training.getLastModified());
Assert.assertEquals("New training", training.getName());
Assert.assertEquals("Very interessant", training.getDescription());
Assert.assertNotNull(training.getStartDate());
Assert.assertNotNull(training.getEndDate());
}
use of org.olat.modules.gotomeeting.GoToMeeting in project openolat by klemens.
the class GoToMeetingsController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (upcomingTableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
if ("select-upcoming".equals(se.getCommand())) {
GoToMeeting meeting = upcomingTableModel.getObject(se.getIndex());
fireEvent(ureq, new SelectGoToMeetingEvent(meeting));
}
}
} else if (pastTableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
if ("select-past".equals(se.getCommand())) {
GoToMeeting meeting = pastTableModel.getObject(se.getIndex());
fireEvent(ureq, new SelectGoToMeetingEvent(meeting));
}
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations