Search in sources :

Example 1 with ViteroUser

use of org.olat.modules.vitero.model.ViteroUser in project openolat by klemens.

the class ViteroManager method convert.

private final ViteroUser convert(Usertype userType) {
    ViteroUser vu = new ViteroUser();
    vu.setUserId(userType.getId());
    vu.setFirstName(userType.getFirstname());
    vu.setLastName(userType.getSurname());
    vu.setEmail(userType.getEmail());
    return vu;
}
Also used : ViteroUser(org.olat.modules.vitero.model.ViteroUser)

Example 2 with ViteroUser

use of org.olat.modules.vitero.model.ViteroUser in project openolat by klemens.

the class ViteroAdminBookingMembersController 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();
            ViteroUser identity = (ViteroUser) tableCtr.getTableDataModel().getObject(row);
            if ("signout".equals(e.getActionId())) {
                signOut(Collections.singletonList(identity));
            }
        } else if (event instanceof TableMultiSelectEvent) {
            TableMultiSelectEvent e = (TableMultiSelectEvent) event;
            List<ViteroUser> identities = new ArrayList<ViteroUser>();
            for (int i = e.getSelection().nextSetBit(0); i >= 0; i = e.getSelection().nextSetBit(i + 1)) {
                ViteroUser identity = (ViteroUser) tableCtr.getTableDataModel().getObject(i);
                identities.add(identity);
            }
            if ("signout".equals(e.getAction())) {
                signOut(identities);
            }
        }
    }
    super.event(ureq, source, event);
}
Also used : TableEvent(org.olat.core.gui.components.table.TableEvent) ViteroUser(org.olat.modules.vitero.model.ViteroUser) TableMultiSelectEvent(org.olat.core.gui.components.table.TableMultiSelectEvent) ArrayList(java.util.ArrayList) List(java.util.List)

Example 3 with ViteroUser

use of org.olat.modules.vitero.model.ViteroUser in project OpenOLAT by OpenOLAT.

the class ViteroManager method convert.

private final ViteroUser convert(Usertype userType) {
    ViteroUser vu = new ViteroUser();
    vu.setUserId(userType.getId());
    vu.setFirstName(userType.getFirstname());
    vu.setLastName(userType.getSurname());
    vu.setEmail(userType.getEmail());
    return vu;
}
Also used : ViteroUser(org.olat.modules.vitero.model.ViteroUser)

Example 4 with ViteroUser

use of org.olat.modules.vitero.model.ViteroUser in project OpenOLAT by OpenOLAT.

the class ViteroAdminBookingMembersController 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();
            ViteroUser identity = (ViteroUser) tableCtr.getTableDataModel().getObject(row);
            if ("signout".equals(e.getActionId())) {
                signOut(Collections.singletonList(identity));
            }
        } else if (event instanceof TableMultiSelectEvent) {
            TableMultiSelectEvent e = (TableMultiSelectEvent) event;
            List<ViteroUser> identities = new ArrayList<ViteroUser>();
            for (int i = e.getSelection().nextSetBit(0); i >= 0; i = e.getSelection().nextSetBit(i + 1)) {
                ViteroUser identity = (ViteroUser) tableCtr.getTableDataModel().getObject(i);
                identities.add(identity);
            }
            if ("signout".equals(e.getAction())) {
                signOut(identities);
            }
        }
    }
    super.event(ureq, source, event);
}
Also used : TableEvent(org.olat.core.gui.components.table.TableEvent) ViteroUser(org.olat.modules.vitero.model.ViteroUser) TableMultiSelectEvent(org.olat.core.gui.components.table.TableMultiSelectEvent) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

ViteroUser (org.olat.modules.vitero.model.ViteroUser)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