Search in sources :

Example 1 with OpenMeetingsUser

use of org.olat.modules.openmeetings.model.OpenMeetingsUser in project OpenOLAT by OpenOLAT.

the class OpenMeetingsAdminRoomMembersController method event.

@Override
protected void event(UserRequest ureq, Controller source, Event event) {
    if (source == tableCtr) {
        if (event instanceof TableEvent) {
            TableEvent e = (TableEvent) event;
            int row = e.getRowId();
            OpenMeetingsUser identity = (OpenMeetingsUser) tableCtr.getTableDataModel().getObject(row);
            if ("kickout".equals(e.getActionId())) {
                signOut(Collections.singletonList(identity));
            }
        } else if (event instanceof TableMultiSelectEvent) {
            TableMultiSelectEvent e = (TableMultiSelectEvent) event;
            List<OpenMeetingsUser> identities = new ArrayList<OpenMeetingsUser>();
            for (int i = e.getSelection().nextSetBit(0); i >= 0; i = e.getSelection().nextSetBit(i + 1)) {
                OpenMeetingsUser identity = (OpenMeetingsUser) tableCtr.getTableDataModel().getObject(i);
                identities.add(identity);
            }
            if ("kickout".equals(e.getAction())) {
                signOut(identities);
            }
        }
    }
    super.event(ureq, source, event);
}
Also used : OpenMeetingsUser(org.olat.modules.openmeetings.model.OpenMeetingsUser) TableEvent(org.olat.core.gui.components.table.TableEvent) TableMultiSelectEvent(org.olat.core.gui.components.table.TableMultiSelectEvent) ArrayList(java.util.ArrayList) List(java.util.List)

Example 2 with OpenMeetingsUser

use of org.olat.modules.openmeetings.model.OpenMeetingsUser in project OpenOLAT by OpenOLAT.

the class OpenMeetingsManagerImpl method convert.

private OpenMeetingsUser convert(RoomUser client) {
    if (client == null) {
        return null;
    }
    OpenMeetingsUser user = new OpenMeetingsUser();
    user.setPublicSID(client.getPublicSID());
    user.setFirstName(client.getFirstname());
    user.setLastName(client.getLastname());
    return user;
}
Also used : OpenMeetingsUser(org.olat.modules.openmeetings.model.OpenMeetingsUser)

Example 3 with OpenMeetingsUser

use of org.olat.modules.openmeetings.model.OpenMeetingsUser in project openolat by klemens.

the class OpenMeetingsManagerImpl method convert.

private OpenMeetingsUser convert(RoomUser client) {
    if (client == null) {
        return null;
    }
    OpenMeetingsUser user = new OpenMeetingsUser();
    user.setPublicSID(client.getPublicSID());
    user.setFirstName(client.getFirstname());
    user.setLastName(client.getLastname());
    return user;
}
Also used : OpenMeetingsUser(org.olat.modules.openmeetings.model.OpenMeetingsUser)

Example 4 with OpenMeetingsUser

use of org.olat.modules.openmeetings.model.OpenMeetingsUser in project openolat by klemens.

the class OpenMeetingsAdminRoomMembersController method event.

@Override
protected void event(UserRequest ureq, Controller source, Event event) {
    if (source == tableCtr) {
        if (event instanceof TableEvent) {
            TableEvent e = (TableEvent) event;
            int row = e.getRowId();
            OpenMeetingsUser identity = (OpenMeetingsUser) tableCtr.getTableDataModel().getObject(row);
            if ("kickout".equals(e.getActionId())) {
                signOut(Collections.singletonList(identity));
            }
        } else if (event instanceof TableMultiSelectEvent) {
            TableMultiSelectEvent e = (TableMultiSelectEvent) event;
            List<OpenMeetingsUser> identities = new ArrayList<OpenMeetingsUser>();
            for (int i = e.getSelection().nextSetBit(0); i >= 0; i = e.getSelection().nextSetBit(i + 1)) {
                OpenMeetingsUser identity = (OpenMeetingsUser) tableCtr.getTableDataModel().getObject(i);
                identities.add(identity);
            }
            if ("kickout".equals(e.getAction())) {
                signOut(identities);
            }
        }
    }
    super.event(ureq, source, event);
}
Also used : OpenMeetingsUser(org.olat.modules.openmeetings.model.OpenMeetingsUser) TableEvent(org.olat.core.gui.components.table.TableEvent) TableMultiSelectEvent(org.olat.core.gui.components.table.TableMultiSelectEvent) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

OpenMeetingsUser (org.olat.modules.openmeetings.model.OpenMeetingsUser)4 ArrayList (java.util.ArrayList)2 List (java.util.List)2 TableEvent (org.olat.core.gui.components.table.TableEvent)2 TableMultiSelectEvent (org.olat.core.gui.components.table.TableMultiSelectEvent)2