It's all about the answers!

Ask a question

API to validate user credentials with repository URL and project areas.


Saran R (135) | asked Apr 16 '16, 6:27 a.m.
Hello All,

I have developed one eclipse based plugin tool which uses RTC plugins more. 

To open the editor I am validating RTC credentials as mentioned as below procedure.

1. Once the user entered username, password and repository URI in the text box and press authenticate it   should    validate whether the user has rights to enter into this repository.

ITeamRepository teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI);
teamRepository.registerLoginHandler(new ILoginHandler(userId, userPassword));
teamRepository.setConnectionTimeout(20);
this.teamRepository.login(new NullProgressMonitor());

2.If there is no exception then project areas will be populated in drop-down button
List<ProjectArea> projectAreas = getProcessItemService().findAllProjectAreas(IProcessClientService.ALL_PROPERTIES, new NullProgressMonitor());

3.Then user has to select one project area and press connect to the project area button
IProjectArea iProjectArea = (IProjectArea) processClient.findProcessArea(uri, null, new NullProgressMonitor());

But these steps are taking more time. Is there any other way it will reduce the time?.

Many thanks in advance.

One answer



permanent link
Ralph Schoon (55.4k23642) | answered Apr 16 '16, 2:07 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If you are in RTC Eclipse and already logged in, you don't have to log in again. 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 do that. The startup of the teamsrepository is very expensive, so you don't want to have to repeat it. See https://rsjazz.wordpress.com/2013/07/15/boost-your-automation-performance-using-an-automation-server/ for a discussion.


Your answer


Register or to post your answer.