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 BaseWebService
RoomService 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
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new ROOM like through the FrontendMethod to remotely close rooms.Returns the count of users currently in the ROOM with given idDelete a room by its room idChecks 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 roomReturns an Object of Type RoomsList which contains a list of ROOM-Objects.getRoomById
(String sid, Long id) returns a conference room objecthash
(String sid, InvitationDTO invite, boolean sendmail) Method to get invitation hash with given parameterskick external USER from given roomkick all uses of a certain roomMethod to remotely open rooms.Returns list of users currently in the ROOM with given id
-
Constructor Details
-
RoomWebService
public RoomWebService()
-
-
Method Details
-
getPublic
@GET @Path("/public/{type}") public List<RoomDTO> getPublic(@QueryParam("sid") String sid, @PathParam("type") String type) throws ServiceException Returns 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 ServiceException returns 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 ServiceException 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 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 ServiceException Adds 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 ServiceException Delete 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 ServiceException Method 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 ServiceException Method 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 ServiceException kick 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 ServiceException kick 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 ServiceException Returns 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 ServiceException Returns 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:
List
of 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 ServiceException Method 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
-