Search in sources :

Example 6 with RoomServicePortType

use of org.apache.openmeetings.axis.services.RoomServicePortType in project OpenOLAT by OpenOLAT.

the class OpenMeetingsManagerImpl method deleteRoom.

@Override
public boolean deleteRoom(OpenMeetingsRoom room) {
    try {
        String adminSID = adminLogin();
        RoomServicePortType roomWs = getRoomWebService();
        long ret = roomWs.deleteRoom(adminSID, room.getRoomId());
        boolean ok = ret > 0;
        if (ok && room.getReference() != null) {
            openMeetingsDao.delete(room.getReference());
        }
        return ok;
    } catch (Exception e) {
        log.error("", e);
        return false;
    }
}
Also used : RoomServicePortType(org.apache.openmeetings.axis.services.RoomServicePortType) ConnectException(java.net.ConnectException)

Example 7 with RoomServicePortType

use of org.apache.openmeetings.axis.services.RoomServicePortType in project OpenOLAT by OpenOLAT.

the class OpenMeetingsManagerImpl method getRoomWebService.

private final RoomServicePortType getRoomWebService() {
    RoomService ss = new RoomService();
    RoomServicePortType port = ss.getRoomServiceHttpSoap11Endpoint();
    String endPoint = getOpenMeetingsEndPoint() + "RoomService?wsdl";
    ((BindingProvider) port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endPoint);
    return port;
}
Also used : RoomService(org.apache.openmeetings.axis.services.RoomService) RoomServicePortType(org.apache.openmeetings.axis.services.RoomServicePortType)

Example 8 with RoomServicePortType

use of org.apache.openmeetings.axis.services.RoomServicePortType in project openolat by klemens.

the class OpenMeetingsManagerImpl method deleteRecording.

@Override
public boolean deleteRecording(OpenMeetingsRecording recording) {
    try {
        String adminSID = adminLogin();
        RoomServicePortType roomWs = getRoomWebService();
        boolean resp = roomWs.deleteFlvRecording(adminSID, recording.getRecordingId());
        return resp;
    } catch (Exception e) {
        log.error("", e);
        return false;
    }
}
Also used : RoomServicePortType(org.apache.openmeetings.axis.services.RoomServicePortType) ConnectException(java.net.ConnectException)

Example 9 with RoomServicePortType

use of org.apache.openmeetings.axis.services.RoomServicePortType in project openolat by klemens.

the class OpenMeetingsManagerImpl method addRoom.

@Override
public OpenMeetingsRoom addRoom(BusinessGroup group, OLATResourceable ores, String subIdentifier, OpenMeetingsRoom room) {
    if (room.getRoomId() < 0) {
        updateRoom(group, ores, subIdentifier, room);
    }
    try {
        String sid = adminLogin();
        RoomServicePortType roomWs = getRoomWebService();
        long returned = roomWs.addRoomWithModerationAndRecordingFlags(sid, room.getName(), room.getType(), room.getComment(), room.getSize(), false, false, false, 0, room.isModerated(), getOpenOLATExternalType(), true, room.isAudioOnly(), false, true);
        if (returned >= 0) {
            room.setRoomId(returned);
            log.audit("Room created");
            OpenMeetingsRoomReference ref = openMeetingsDao.createReference(group, ores, subIdentifier, room);
            room.setReference(ref);
            return room;
        }
        return null;
    } catch (Exception e) {
        log.error("", e);
        return null;
    }
}
Also used : OpenMeetingsRoomReference(org.olat.modules.openmeetings.model.OpenMeetingsRoomReference) RoomServicePortType(org.apache.openmeetings.axis.services.RoomServicePortType) ConnectException(java.net.ConnectException)

Example 10 with RoomServicePortType

use of org.apache.openmeetings.axis.services.RoomServicePortType in project openolat by klemens.

the class OpenMeetingsManagerImpl method getUsersOf.

@Override
public List<OpenMeetingsUser> getUsersOf(OpenMeetingsRoom room) throws OpenMeetingsException {
    try {
        String adminSID = adminLogin();
        RoomServicePortType roomWs = getRoomWebService();
        RoomReturn roomClRet = roomWs.getRoomWithClientObjectsById(adminSID, room.getRoomId());
        if (roomClRet != null) {
            List<RoomUser> userArr = roomClRet.getRoomUser();
            return convert(userArr);
        }
        return Collections.emptyList();
    } catch (Exception e) {
        log.error("", e);
        throw translateException(e, 0);
    }
}
Also used : RoomUser(org.apache.openmeetings.axis.services.xsd.RoomUser) RoomReturn(org.apache.openmeetings.axis.services.xsd.RoomReturn) RoomServicePortType(org.apache.openmeetings.axis.services.RoomServicePortType) ConnectException(java.net.ConnectException)

Aggregations

RoomServicePortType (org.apache.openmeetings.axis.services.RoomServicePortType)20 ConnectException (java.net.ConnectException)18 ArrayList (java.util.ArrayList)4 RoomReturn (org.apache.openmeetings.axis.services.xsd.RoomReturn)4 RoomUser (org.apache.openmeetings.axis.services.xsd.RoomUser)4 OpenMeetingsRoom (org.olat.modules.openmeetings.model.OpenMeetingsRoom)4 OpenMeetingsRoomReference (org.olat.modules.openmeetings.model.OpenMeetingsRoomReference)4 HashMap (java.util.HashMap)2 GetRoomsWithCurrentUsersByListAndType (org.apache.openmeetings.axis.services.GetRoomsWithCurrentUsersByListAndType)2 RoomService (org.apache.openmeetings.axis.services.RoomService)2 FlvRecording (org.apache.openmeetings.persistence.beans.flvrecord.xsd.FlvRecording)2 Room (org.apache.openmeetings.persistence.beans.room.xsd.Room)2 OpenMeetingsRecording (org.olat.modules.openmeetings.model.OpenMeetingsRecording)2 RoomReturnInfo (org.olat.modules.openmeetings.model.RoomReturnInfo)2