Is it possible to login to ITeamRepository using an existing stored alias?
In my custom scripts I have been logging onto RTC using the generic login code posted in the blogs and forums:
public static ITeamRepository login(final String rtcuser,final String rtcpasswd,String repoURL)
throws TeamRepositoryException {
monitor = new SysoutProgressMonitor();
ITeamRepository repository = TeamPlatform.getTeamRepositoryService()
.getTeamRepository(repoURL);
repository.registerLoginHandler(new ITeamRepository.ILoginHandler() {
public ILoginInfo challenge(ITeamRepository repository) {
return new ILoginInfo() {
public String getUserId() {
return rtcuser;
}
public String getPassword() {
return rtcpasswd;
}
};
}
});
monitor.subTask("Contacting " + repository.getRepositoryURI() + "...");
repository.login(monitor);
monitor.subTask("Connected.");
return repository;
}
Does anyone have an example of using an existing client alias to obtain a connection? I am writing a script now where I do some things through lscm (commandline) and other things through a custom library. I would like to use the stored alias so that I don't need to collect the login credentials from the user. ITeamRepository.addAliasRepositoryURI seems like it may be referring to a file URI but I'm not sure if that's true, or if it is, how I would use it.
Any ideas?
Andy