API to validate user credentials with repository URL and project areas.
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.
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
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.