It's all about the answers!

Ask a question

Is there a way to check if EWM client user is loggedIn/connected to remmote repository.


MJ Ranji (22117) | asked Aug 09 '22, 5:15 a.m.

Hi there,

I'd like to know if there is it possible to do the following  programmatically (java, python or any API etc.) after running ewm client (rtc-eclipse-client).
  1. To check the user is loggedIn or connected to the repository
  2. get or set username to connect to repository
  3. Close ewm client gracefully  without killing process
Thank you in advance

One answer



permanent link
Ralph Schoon (63.6k33646) | answered Aug 09 '22, 5:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 09 '22, 6:21 a.m.
  1. See https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ section Getting the API in an Eclipse Plugin how to get the API, the repositories and the user ID. It would be possible to have multiple connections to different repositories with different passwords. Access to the passwords is most likely not available.

     
    2. How to login is explained as well, there might be other ways, the code for that would be searchable in the SDK (perform lab 1 of the Extensions Workshop to have a development environment with source code). You also use  TeamPlatform.getTeamRepositoryService().addTeamRepository(repository); to add the team repository.

    3. How to end the Eclipse client would be a question for the Eclipse forums. 

    You would have to implement this as an Eclipse plugin, otherwise this does not make any sense at all.

Comments
MJ Ranji commented Aug 09 '22, 6:55 a.m. | edited Aug 09 '22, 7:04 a.m.

Thats right, I know the procedure with plain Java API for  number (1) and (2) as you mentioned.
actually by running Rhapsody tests it must be connected to EWM client IDE, before starting tests.  we need to be sure ewm is running and user is loggedIn,  to go further with the tests, therefore we need to be sure that ewm client is up, running and logged in, before loading Rhapsody. hence I guess Java Plain API  is not the case (not sure if Rhapsody model manager can connect/suport rhapsody  or not!?have to test it).

For number (3) I have the same Idea even it can cover  (1) (2) . by creating listener plugin which check if user is loggedIn etc and also close ewm client by recieving requests. but we thought there might be a simple way than developing eclipse and EWM client plugin itself.


Ralph Schoon commented Aug 09 '22, 6:59 a.m. | edited Aug 09 '22, 7:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note that the Java Code above is as much part of the EWM server and EWM client SDK as it is available in the plain Java Client Libraries, which is really just a different packaging of the SDK common and client APIs. 


Ralph Schoon commented Aug 09 '22, 7:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

With respect to Eclipse Plugin development, you would have to refer to the Eclipse community. The Eclipse plugins I do, if I do any are more concerned with the EWM APIs. Just an issue of focus. 


MJ Ranji commented Aug 11 '22, 4:49 a.m. | edited Aug 11 '22, 4:55 a.m.

Okay thank you for your remarks.

I also did not find something on web to connect Rhapsody to Plain Java API code, and then realized that If I want to do it, it may end up re-inventing the wheel(another ewm client to communicate with rhapsody). I guess for now we should go on as it is, and to hope the client is logged In after few seconds.

I forget to noticed that I read somewhere that jazz server also not keep/provide connected client user information just like web interface: server Administration->Active services. hence,  rest API also cant help to get such info.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.