Search in sources :

Example 26 with GoToMeeting

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);
}
Also used : GoToMeeting(org.olat.modules.gotomeeting.GoToMeeting) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)

Example 27 with GoToMeeting

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);
}
Also used : GoToOrganizer(org.olat.modules.gotomeeting.GoToOrganizer) GoToMeeting(org.olat.modules.gotomeeting.GoToMeeting) RepositoryEntry(org.olat.repository.RepositoryEntry) Date(java.util.Date) Test(org.junit.Test)

Example 28 with GoToMeeting

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));
}
Also used : GoToOrganizer(org.olat.modules.gotomeeting.GoToOrganizer) GoToMeeting(org.olat.modules.gotomeeting.GoToMeeting) RepositoryEntry(org.olat.repository.RepositoryEntry) Date(java.util.Date) Test(org.junit.Test)

Example 29 with GoToMeeting

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());
}
Also used : GoToOrganizer(org.olat.modules.gotomeeting.GoToOrganizer) GoToMeeting(org.olat.modules.gotomeeting.GoToMeeting) Date(java.util.Date) Test(org.junit.Test)

Example 30 with GoToMeeting

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);
}
Also used : GoToMeeting(org.olat.modules.gotomeeting.GoToMeeting) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)

Aggregations

GoToMeeting (org.olat.modules.gotomeeting.GoToMeeting)34 Date (java.util.Date)20 GoToOrganizer (org.olat.modules.gotomeeting.GoToOrganizer)18 Test (org.junit.Test)16 RepositoryEntry (org.olat.repository.RepositoryEntry)10 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)6 Identity (org.olat.core.id.Identity)4 GoToRegistrant (org.olat.modules.gotomeeting.GoToRegistrant)4 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 Calendar (java.util.Calendar)2 GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 Produces (javax.ws.rs.Produces)2 Response (javax.ws.rs.core.Response)2 HttpResponse (org.apache.http.HttpResponse)2 HttpPost (org.apache.http.client.methods.HttpPost)2 StringEntity (org.apache.http.entity.StringEntity)2 CloseableHttpClient (org.apache.http.impl.client.CloseableHttpClient)2 JSONObject (org.json.JSONObject)2