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
Constructors Constructor Description RoomWebService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.openmeetings.db.dto.room.RoomDTO
add(java.lang.String sid, org.apache.openmeetings.db.dto.room.RoomDTO room)
Adds a new Room like through the Frontendorg.apache.openmeetings.db.dto.basic.ServiceResult
cleanWb(java.lang.String sid, long id)
Deprecated.please useWbWebService.resetWb(String, long)
method instead Method to clean room white board (all objects will be purged)org.apache.openmeetings.db.dto.basic.ServiceResult
close(java.lang.String sid, long id)
Method to remotely close rooms.org.apache.openmeetings.db.dto.basic.ServiceResult
count(java.lang.String sid, java.lang.Long roomId)
Returns the count of users currently in the Room with given idorg.apache.openmeetings.db.dto.basic.ServiceResult
delete(java.lang.String sid, long id)
Delete a room by its room idorg.apache.openmeetings.db.dto.room.RoomDTO
getExternal(java.lang.String sid, java.lang.String type, java.lang.String externalType, java.lang.String externalId, org.apache.openmeetings.db.dto.room.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 roomjava.util.List<org.apache.openmeetings.db.dto.room.RoomDTO>
getPublic(java.lang.String sid, java.lang.String type)
Returns an Object of Type RoomsList which contains a list of Room-Objects.org.apache.openmeetings.db.dto.room.RoomDTO
getRoomById(java.lang.String sid, java.lang.Long id)
returns a conference room objectorg.apache.openmeetings.db.dto.basic.ServiceResult
hash(java.lang.String sid, org.apache.openmeetings.db.dto.room.InvitationDTO invite, boolean sendmail)
Method to get invitation hash with given parametersorg.apache.openmeetings.db.dto.basic.ServiceResult
kick(java.lang.String sid, long id, java.lang.String externalType, java.lang.String externalId)
kick external user from given roomorg.apache.openmeetings.db.dto.basic.ServiceResult
kickAll(java.lang.String sid, long id)
kick all uses of a certain roomorg.apache.openmeetings.db.dto.basic.ServiceResult
open(java.lang.String sid, long id)
Method to remotely open rooms.java.util.List<org.apache.openmeetings.db.dto.user.UserDTO>
users(java.lang.String sid, java.lang.Long roomId)
Returns list of users currently in the Room with given id
-
-
-
Method Detail
-
getPublic
@GET @Path("/public/{type}") public java.util.List<org.apache.openmeetings.db.dto.room.RoomDTO> getPublic(@QueryParam("sid") java.lang.String sid, @PathParam("type") java.lang.String type)
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
-
getRoomById
@GET @Path("/{id}") public org.apache.openmeetings.db.dto.room.RoomDTO getRoomById(@QueryParam("sid") java.lang.String sid, @PathParam("id") java.lang.Long id)
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
-
getExternal
@GET @Path("/{type}/{externaltype}/{externaliid}") public org.apache.openmeetings.db.dto.room.RoomDTO getExternal(@QueryParam("sid") java.lang.String sid, @PathParam("type") java.lang.String type, @PathParam("externaltype") java.lang.String externalType, @PathParam("externalid") java.lang.String externalId, @QueryParam("room") org.apache.openmeetings.db.dto.room.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 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
-
add
@POST @Path("/") public org.apache.openmeetings.db.dto.room.RoomDTO add(@QueryParam("sid") java.lang.String sid, @FormParam("room") org.apache.openmeetings.db.dto.room.RoomDTO room)
Adds a new Room like through the Frontend- Parameters:
sid
- The SID from getSessionroom
- room object- Returns:
- - id of the user added or error code
-
delete
@DELETE @Path("/{id}") public org.apache.openmeetings.db.dto.basic.ServiceResult delete(@QueryParam("sid") java.lang.String sid, @PathParam("id") long id)
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
-
close
@GET @Path("/close/{id}") public org.apache.openmeetings.db.dto.basic.ServiceResult close(@QueryParam("sid") java.lang.String sid, @PathParam("id") long id)
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
-
open
@GET @Path("/open/{id}") public org.apache.openmeetings.db.dto.basic.ServiceResult open(@QueryParam("sid") java.lang.String sid, @PathParam("id") long id)
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
-
kickAll
@GET @Path("/kick/{id}") public org.apache.openmeetings.db.dto.basic.ServiceResult kickAll(@QueryParam("sid") java.lang.String sid, @PathParam("id") long id)
kick all uses of a certain room- Parameters:
sid
- The SID of the User. This SID must be marked as Loggedin _Adminid
- the room id- Returns:
- - true if user was kicked, false otherwise
-
kick
@GET @Path("/kick/{id}/{externalType}/{externalId}") public org.apache.openmeetings.db.dto.basic.ServiceResult kick(@QueryParam("sid") java.lang.String sid, @PathParam("id") long id, @PathParam("externalType") java.lang.String externalType, @PathParam("externalId") java.lang.String externalId)
kick external user from given room- Parameters:
sid
- The SID of the User. This SID must be marked as Loggedin _Adminid
- the room idexternalType
- external type of user to kickexternalId
- external id of user to kick- Returns:
- - true if user was kicked, false otherwise
-
count
@GET @Path("/count/{roomid}") public org.apache.openmeetings.db.dto.basic.ServiceResult count(@QueryParam("sid") java.lang.String sid, @PathParam("roomid") java.lang.Long roomId)
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
-
users
@GET @Path("/users/{roomid}") public java.util.List<org.apache.openmeetings.db.dto.user.UserDTO> users(@QueryParam("sid") java.lang.String sid, @PathParam("roomid") java.lang.Long roomId)
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
-
hash
@POST @Path("/hash") public org.apache.openmeetings.db.dto.basic.ServiceResult hash(@QueryParam("sid") java.lang.String sid, @QueryParam("invite") org.apache.openmeetings.db.dto.room.InvitationDTO invite, @QueryParam("sendmail") boolean sendmail)
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
-
cleanWb
@Deprecated(since="5.0.0-M3") @GET @Path("/cleanwb/{id}") public org.apache.openmeetings.db.dto.basic.ServiceResult cleanWb(@QueryParam("sid") java.lang.String sid, @PathParam("id") long id)
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
-
-