You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@openmeetings.apache.org by Dario Guida <pr...@infotelsistemi.com> on 2014/11/03 17:52:49 UTC
check if user is in a Room
Hi,
I want to check if a user is in an specificRoom.How can I do?
I've seen getUsersListByRoomId(roomId) but It return "firstName",
"lastName", "publicSID" of each user. I need userId or externalUserId to be
sure of a specific user.
Thank you
Re: check if user is in a Room
Posted by Maxim Solodovnik <so...@gmail.com>.
currently there is no method to get it
please file JIRA issue
On 4 November 2014 14:18, Dario Guida <pr...@infotelsistemi.com>
wrote:
> Oh sorry it is the name of my method… so I built this method getUsersListByRoomId(*long* roomId) that return a Map of Users in a room
>
>
>
> *public* HashMap<String, String[]> getUsersListByRoomId(*long*
> roomId)
>
> {
>
> HashMap<String, String[]> users = *new*
> HashMap<String,String[]>();
>
>
>
> *try*
>
> {
>
> String sessionId = userEndPoint.getSession();
>
> *long* userId = userEndPoint.loginUser(
> sessionId, *this*.rootUser, *this*.rootPwd);
>
>
>
> *if*(userId <0)
>
> {//Login Error
>
>
>
> *return* *null*;
>
> }
>
> *else*
>
> {
>
> RoomReturn roomObjet = roomEndPoint
> .getRoomWithClientObjectsById(sessionId, roomId);
>
> *if*(roomObjet!= *null*)
>
> {
>
> RoomUser[] roomUsers = roomObjet
> .getRoomUser();
>
>
>
> *if*(roomUsers != *null* &&
> roomUsers.length >0)
>
> {
>
> *for*(*int* i = 0; i<
> roomUsers.length; i++)
>
> {
>
> users.put(roomUsers[
> i].getPublicSID(), *new* String[]{roomUsers[i].getLastname(), roomUsers[i
> ].getFirstname()});
>
> }
>
> }
>
> }
>
> }
>
> }
>
> *catch* (RemoteException e)
>
> {
>
> e.printStackTrace();
>
> }
>
>
>
> *return* users;
>
> }
>
>
>
> BUT I NEED USERID or EXTERNAL-USERID to be sure of a user….is there a method to get it?
>
>
>
>
>
> *Da:* Maxim Solodovnik [mailto:solomax666@gmail.com]
> *Inviato:* lunedì 3 novembre 2014 19:18
> *A:* Openmeetings user-list
> *Oggetto:* Re: check if user is in a Room
>
>
>
> What version are you using? I'm unable to find the method you a referring
> to
>
>
>
> On 3 November 2014 22:52, Dario Guida <pr...@infotelsistemi.com>
> wrote:
>
> Hi,
>
>
>
> I want to check if a user is in an specificRoom…How can I do?
>
>
>
> I’ve seen getUsersListByRoomId(roomId) but It return “firstName”,
> “lastName”, “publicSID” of each user… I need userId or externalUserId to be
> sure of a specific user.
>
>
>
> Thank you
>
>
>
>
>
> --
>
> WBR
> Maxim aka solomax
>
--
WBR
Maxim aka solomax
R: check if user is in a Room
Posted by Dario Guida <pr...@infotelsistemi.com>.
Oh sorry it is the name of my method… so I built this method getUsersListByRoomId(long roomId) that return a Map of Users in a room
public HashMap<String, String[]> getUsersListByRoomId(long roomId)
{
HashMap<String, String[]> users = new HashMap<String,String[]>();
try
{
String sessionId = userEndPoint.getSession();
long userId = userEndPoint.loginUser(sessionId, this.rootUser, this.rootPwd);
if(userId <0)
{//Login Error
return null;
}
else
{
RoomReturn roomObjet = roomEndPoint.getRoomWithClientObjectsById(sessionId, roomId);
if(roomObjet!= null)
{
RoomUser[] roomUsers = roomObjet.getRoomUser();
if(roomUsers != null && roomUsers.length >0)
{
for(int i = 0; i<roomUsers.length; i++)
{
users.put(roomUsers[i].getPublicSID(), new String[]{roomUsers[i].getLastname(), roomUsers[i].getFirstname()});
}
}
}
}
}
catch (RemoteException e)
{
e.printStackTrace();
}
return users;
}
BUT I NEED USERID or EXTERNAL-USERID to be sure of a user….is there a method to get it?
Da: Maxim Solodovnik [mailto:solomax666@gmail.com]
Inviato: lunedì 3 novembre 2014 19:18
A: Openmeetings user-list
Oggetto: Re: check if user is in a Room
What version are you using? I'm unable to find the method you a referring to
On 3 November 2014 22:52, Dario Guida <pr...@infotelsistemi.com> wrote:
Hi,
I want to check if a user is in an specificRoom…How can I do?
I’ve seen getUsersListByRoomId(roomId) but It return “firstName”, “lastName”, “publicSID” of each user… I need userId or externalUserId to be sure of a specific user.
Thank you
--
WBR
Maxim aka solomax
Re: check if user is in a Room
Posted by Maxim Solodovnik <so...@gmail.com>.
What version are you using? I'm unable to find the method you a referring to
On 3 November 2014 22:52, Dario Guida <pr...@infotelsistemi.com>
wrote:
> Hi,
>
>
>
> I want to check if a user is in an specificRoom…How can I do?
>
>
>
> I’ve seen getUsersListByRoomId(roomId) but It return “firstName”,
> “lastName”, “publicSID” of each user… I need userId or externalUserId to be
> sure of a specific user.
>
>
>
> Thank you
>
--
WBR
Maxim aka solomax