It's all about the answers!

Ask a question

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

Saran R (1337) | 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));
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 (62.7k33643) | answered Apr 16 '16, 2:07 p.m.
If you are in RTC Eclipse and already logged in, you don't have to log in again. See 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 for a discussion.

Your answer

Register or to post your answer.