Class RoomWebService
- java.lang.Object
-
- org.apache.openmeetings.webservice.BaseWebService
-
- org.apache.openmeetings.webservice.RoomWebService
-
@Service("roomWebService") @Produces("application/json") @Path("/room") public class RoomWebService extends BaseWebServiceRoomService contains methods to manipulate rooms and create invitation hash- Author:
- sebawagner
-
-
Field Summary
-
Fields inherited from class org.apache.openmeetings.webservice.BaseWebService
fileDao, roomDao, sessionDao, userDao
-
-
Constructor Summary
Constructors Constructor Description RoomWebService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description RoomDTOadd(String sid, RoomDTO room)Adds a new ROOM like through the FrontendServiceResultcleanWb(String sid, long id)Deprecated.please useWbWebService.resetWb(String, long)method instead Method to clean room white board (all objects will be purged)ServiceResultclose(String sid, long id)Method to remotely close rooms.ServiceResultcount(String sid, Long roomId)Returns the count of users currently in the ROOM with given idServiceResultdelete(String sid, long id)Delete a room by its room idRoomDTOgetExternal(String sid, String type, String externalType, String externalId, RoomDTO room)Checks if a room with this exteralId + externalType does exist, if yes it returns the room id if not, it will create the room and then return the room id of the newly created roomList<RoomDTO>getPublic(String sid, String type)Returns an Object of Type RoomsList which contains a list of ROOM-Objects.RoomDTOgetRoomById(String sid, Long id)returns a conference room objectServiceResulthash(String sid, InvitationDTO invite, boolean sendmail)Method to get invitation hash with given parametersServiceResultkick(String sid, long id, String externalType, String externalId)kick external USER from given roomServiceResultkickAll(String sid, long id)kick all uses of a certain roomServiceResultopen(String sid, long id)Method to remotely open rooms.List<UserDTO>users(String sid, Long roomId)Returns list of users currently in the ROOM with given id
-
-
-
Method Detail
-
getPublic
@GET @Path("/public/{type}") public List<RoomDTO> getPublic(@QueryParam("sid") String sid, @PathParam("type") String type) throws ServiceExceptionReturns an Object of Type RoomsList which contains a list of ROOM-Objects. Every ROOM-Object contains a Roomtype and all informations about that ROOM. The List of current-users in the room is Null if you get them via SOAP. The Roomtype can be 'conference', 'presentation' or 'interview'.- Parameters:
sid- The SID of the User. This SID must be marked as Loggedintype- Type of public rooms need to be retrieved- Returns:
- - list of public rooms
- Throws:
ServiceException
-
getRoomById
@GET @Path("/{id}") public RoomDTO getRoomById(@QueryParam("sid") String sid, @PathParam("id") Long id) throws ServiceExceptionreturns a conference room object- Parameters:
sid- - The SID of the User. This SID must be marked as Loggedinid- - the room id- Returns:
- - room with the id given
- Throws:
ServiceException
-
getExternal
@GET @Path("/{type}/{externaltype}/{externalid}") public RoomDTO getExternal(@QueryParam("sid") String sid, @PathParam("type") String type, @PathParam("externaltype") String externalType, @PathParam("externalid") String externalId, @QueryParam("room") RoomDTO room) throws ServiceExceptionChecks if a room with this exteralId + externalType does exist, if yes it returns the room id if not, it will create the room and then return the room id of the newly created room- Parameters:
sid- The SID of the User. This SID must be marked as Loggedintype- type of the roomexternalType- you can specify your system-name or type of room here, for example "moodle"externalId- your external room id may set hereroom- details of the room to be created if not found- Returns:
- - id of the room or error code
- Throws:
ServiceException
-
add
@POST @Path("/") public RoomDTO add(@QueryParam("sid") String sid, @FormParam("room") RoomDTO room) throws ServiceExceptionAdds a new ROOM like through the Frontend- Parameters:
sid- The SID from getSessionroom- room object- Returns:
- - Room object or throw error
- Throws:
ServiceException
-
delete
@DELETE @Path("/{id}") public ServiceResult delete(@QueryParam("sid") String sid, @PathParam("id") long id) throws ServiceExceptionDelete a room by its room id- Parameters:
sid- - The SID of the User. This SID must be marked as Loggedinid- - The id of the room- Returns:
- - id of the room deleted
- Throws:
ServiceException
-
close
@GET @Path("/close/{id}") public ServiceResult close(@QueryParam("sid") String sid, @PathParam("id") long id) throws ServiceExceptionMethod to remotely close rooms. If a room is closed all users inside the room and all users that try to enter it will be redirected to the redirectURL that is defined in the ROOM-Object. Returns positive value if authentication was successful.- Parameters:
sid- The SID of the User. This SID must be marked as Loggedinid- the room id- Returns:
- - 1 in case of success, -2 otherwise
- Throws:
ServiceException
-
open
@GET @Path("/open/{id}") public ServiceResult open(@QueryParam("sid") String sid, @PathParam("id") long id) throws ServiceExceptionMethod to remotely open rooms. If a room is closed all users inside the room and all users that try to enter it will be redirected to the redirectURL that is defined in the ROOM-Object. Returns positive value if authentication was successful.- Parameters:
sid- The SID of the User. This SID must be marked as Loggedinid- the room id- Returns:
- - 1 in case of success, -2 otherwise
- Throws:
ServiceException
-
kickAll
@GET @Path("/kick/{id}") public ServiceResult kickAll(@QueryParam("sid") String sid, @PathParam("id") long id) throws ServiceExceptionkick all uses of a certain room- Parameters:
sid- The SID of the User. This SID must be marked as Loggedin with SOAP privilegesid- the room id- Returns:
- - true if USER was kicked, false otherwise
- Throws:
ServiceException
-
kick
@GET @Path("/kick/{id}/{externalType}/{externalId}") public ServiceResult kick(@QueryParam("sid") String sid, @PathParam("id") long id, @PathParam("externalType") String externalType, @PathParam("externalId") String externalId) throws ServiceExceptionkick external USER from given room- Parameters:
sid- The SID of the User. This SID must be marked as Loggedin with SOAP privilegesid- the room idexternalType- external type of USER to kickexternalId- external id of USER to kick- Returns:
- - 'Kicked' if USER was 'Not kicked' otherwise
- Throws:
ServiceException
-
count
@GET @Path("/count/{roomid}") public ServiceResult count(@QueryParam("sid") String sid, @PathParam("roomid") Long roomId) throws ServiceExceptionReturns the count of users currently in the ROOM with given id- Parameters:
sid- The SID from UserService.getSessionroomId- id of the room to get users- Returns:
- number of users as int
- Throws:
ServiceException
-
users
@GET @Path("/users/{roomid}") public List<UserDTO> users(@QueryParam("sid") String sid, @PathParam("roomid") Long roomId) throws ServiceExceptionReturns list of users currently in the ROOM with given id- Parameters:
sid- The SID from UserService.getSessionroomId- id of the room to get users- Returns:
Listof users in the room- Throws:
ServiceException
-
hash
@POST @Path("/hash") public ServiceResult hash(@QueryParam("sid") String sid, @QueryParam("invite") InvitationDTO invite, @QueryParam("sendmail") boolean sendmail) throws ServiceExceptionMethod to get invitation hash with given parameters- Parameters:
sid- - The SID of the User. This SID must be marked as Loggedininvite- - parameters of the invitationsendmail- - flag to determine if email should be sent or not- Returns:
- - serviceResult object with the result
- Throws:
ServiceException
-
cleanWb
@Deprecated(since="5.0.0-M3") @GET @Path("/cleanwb/{id}") public ServiceResult cleanWb(@QueryParam("sid") String sid, @PathParam("id") long id) throws ServiceException
Deprecated.please useWbWebService.resetWb(String, long)method instead Method to clean room white board (all objects will be purged)- Parameters:
sid- - The SID of the User. This SID must be marked as Loggedinid- - id of the room to clean- Returns:
- - serviceResult object with the result
- Throws:
ServiceException
-
-