Search in sources :

Example 26 with ViteroStatus

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

the class ViteroUserToGroupController method signIn.

private void signIn(List<Identity> identities) {
    try {
        ResourceMembers members = ((UserToGroupDataModel) tableCtr.getTableDataModel()).getMembers();
        for (Identity identity : identities) {
            boolean upgrade = members.getCoaches().contains(identity) || members.getOwners().contains(identity);
            GroupRole role = upgrade ? GroupRole.teamleader : null;
            ViteroStatus status = viteroManager.addToRoom(booking, identity, role);
            if (status.isOk()) {
                showInfo("signin.ok");
            } else {
                showInfo("signin.nok");
                break;
            }
        }
        loadModel();
    } catch (VmsNotAvailableException e) {
        showError(VmsNotAvailableException.I18N_KEY);
    }
}
Also used : VmsNotAvailableException(org.olat.modules.vitero.manager.VmsNotAvailableException) GroupRole(org.olat.modules.vitero.model.GroupRole) Identity(org.olat.core.id.Identity) ViteroStatus(org.olat.modules.vitero.model.ViteroStatus)

Aggregations

ViteroStatus (org.olat.modules.vitero.model.ViteroStatus)26 VmsNotAvailableException (org.olat.modules.vitero.manager.VmsNotAvailableException)12 ConnectException (java.net.ConnectException)10 WebServiceException (javax.xml.ws.WebServiceException)10 SOAPFaultException (javax.xml.ws.soap.SOAPFaultException)10 ErrorCode (org.olat.modules.vitero.model.ErrorCode)10 ViteroBooking (org.olat.modules.vitero.model.ViteroBooking)8 ChangeGroupRoleRequest (de.vitero.schema.group.ChangeGroupRoleRequest)4 Group (de.vitero.schema.group.Group)4 Groupiduserid (de.vitero.schema.group.Groupiduserid)4 Identity (org.olat.core.id.Identity)4 BusinessGroup (org.olat.group.BusinessGroup)4 GetUserInfo (org.olat.modules.vitero.model.GetUserInfo)4 GroupRole (org.olat.modules.vitero.model.GroupRole)4 ViteroGroup (org.olat.modules.vitero.model.ViteroGroup)4 Booking (de.vitero.schema.booking.Booking)2 Bookingtype (de.vitero.schema.booking.Bookingtype)2 CreateBookingRequest (de.vitero.schema.booking.CreateBookingRequest)2 CreateBookingResponse (de.vitero.schema.booking.CreateBookingResponse)2 Newbookingtype (de.vitero.schema.booking.Newbookingtype)2