Class GroupWebService
- java.lang.Object
-
- org.apache.openmeetings.webservice.BaseWebService
-
- org.apache.openmeetings.webservice.GroupWebService
-
@Service("groupWebService") @Produces("application/json") @Path("/group") public class GroupWebService extends BaseWebServiceThe Service contains methods to login and create hash to directly enter conference rooms, recordings or the application in general- Author:
- sebawagner
-
-
Field Summary
-
Fields inherited from class org.apache.openmeetings.webservice.BaseWebService
fileDao, roomDao, sessionDao, userDao
-
-
Constructor Summary
Constructors Constructor Description GroupWebService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceResultadd(String sid, String name)add a new groupServiceResultaddRoom(String sid, Long id, Long roomid)Adds a room to an groupServiceResultaddUser(String sid, Long id, Long userid)Add USER to a certain groupServiceResultdelete(String sid, long id)Deletes a groupList<GroupDTO>get(String sid)Get the list of all groupsUserSearchResultgetUsers(String sid, long id, int start, int max, String orderby, boolean asc)Search users and return themServiceResultremoveUser(String sid, Long id, Long userid)Remove USER from a certain group
-
-
-
Method Detail
-
add
@POST @Path("/") public ServiceResult add(@QueryParam("sid") String sid, @QueryParam("name") String name) throws ServiceExceptionadd a new group- Parameters:
sid- The SID from getSessionname- the name of the group- Returns:
ServiceResultwith result type, and id of the group added- Throws:
ServiceException
-
get
@GET @Path("/") public List<GroupDTO> get(@QueryParam("sid") String sid) throws ServiceExceptionGet the list of all groups- Parameters:
sid- The SID from getSession- Returns:
- list of all groups
- Throws:
ServiceException
-
addUser
@POST @Path("/{id}/users/{userid}") public ServiceResult addUser(@QueryParam("sid") String sid, @PathParam("id") Long id, @PathParam("userid") Long userid) throws ServiceExceptionAdd USER to a certain group- Parameters:
sid- The SID from getSessionuserid- the USER idid- the group id- Returns:
ServiceResultwith result type, and id of the USER added, or error id in case of the error as text- Throws:
ServiceException
-
removeUser
@DELETE @Path("/{id}/users/{userid}") public ServiceResult removeUser(@QueryParam("sid") String sid, @PathParam("id") Long id, @PathParam("userid") Long userid) throws ServiceExceptionRemove USER from a certain group- Parameters:
sid- The SID from getSessionuserid- the USER idid- the group id- Returns:
ServiceResultwith result type, and id of the USER removed, or error id in case of the error as text- Throws:
ServiceException
-
addRoom
@POST @Path("/{id}/rooms/add/{roomid}") public ServiceResult addRoom(@QueryParam("sid") String sid, @PathParam("id") Long id, @PathParam("roomid") Long roomid) throws ServiceExceptionAdds a room to an group- Parameters:
sid- - The SID of the User. This SID must be marked as Loggedinid- - Id of group that the room is being paired withroomid- - Id of room to be added- Returns:
ServiceResultwith result type- Throws:
ServiceException
-
getUsers
@GET @Path("/users/{id}") public UserSearchResult getUsers(@QueryParam("sid") String sid, @PathParam("id") long id, @QueryParam("start") int start, @QueryParam("max") int max, @QueryParam("orderby") String orderby, @QueryParam("asc") boolean asc) throws ServiceExceptionSearch users and return them- Parameters:
sid- The SID from getSessionid- the group idstart- first recordmax- max recordsorderby- orderby clauseasc- asc or desc- Returns:
- - users found
- Throws:
ServiceException
-
delete
@DELETE @Path("/{id}") public ServiceResult delete(@QueryParam("sid") String sid, @PathParam("id") long id) throws ServiceExceptionDeletes a group- Parameters:
sid- The SID of the User. This SID must be marked as Loggedinid- the id of the group- Returns:
ServiceResultwith result type- Throws:
ServiceException
-
-