use of org.olat.modules.gotomeeting.GoToOrganizer in project OpenOLAT by OpenOLAT.
the class EditTrainingController method doSetPersonalAccount.
private void doSetPersonalAccount() {
availablesOrganizers = meetingManager.getOrganizersFor(getIdentity());
String selectedKey = null;
String[] organizerKeys = new String[availablesOrganizers.size()];
String[] organizerValues = new String[availablesOrganizers.size()];
for (int i = availablesOrganizers.size(); i-- > 0; ) {
GoToOrganizer organizer = availablesOrganizers.get(i);
organizerKeys[i] = Integer.toString(i);
organizerValues[i] = organizer.getUsername();
if (organizer.getOwner() != null) {
selectedKey = organizerKeys[i];
}
}
organizersEl.setKeysAndValues(organizerKeys, organizerValues, null);
if (selectedKey != null) {
organizersEl.select(selectedKey, true);
addMeAsOrganizerButton.setVisible(false);
}
}
use of org.olat.modules.gotomeeting.GoToOrganizer in project OpenOLAT by OpenOLAT.
the class GoToOrganizerListAdminController method event.
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (addOrganizerController == source) {
if (event == Event.DONE_EVENT) {
updateModel();
}
cmc.deactivate();
cleanUp();
} else if (updateOrganizerController == source) {
if (event == Event.DONE_EVENT) {
updateModel();
}
cmc.deactivate();
cleanUp();
} else if (confirmRemoveOrganizer == source) {
if (DialogBoxUIFactory.isYesEvent(event)) {
GoToOrganizer organizer = (GoToOrganizer) confirmRemoveOrganizer.getUserObject();
doRemoveOrganizer(organizer);
updateModel();
}
cleanUp();
} else if (cmc == source) {
cleanUp();
}
super.event(ureq, source, event);
}
use of org.olat.modules.gotomeeting.GoToOrganizer 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.GoToOrganizer 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.GoToOrganizer 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());
}
Aggregations