Unable to get the logged in user details
Please check below code:
IContributor contributor = repo.contributorManager().fetchContributorByUserId(selectedUser, null);
IProcessItemService service = (IProcessItemService) repo.getClientLibrary(IProcessItemService.class);
IClientProcess clientProcess = service.getClientProcess(Teamarea, monitor);
IRole[] availableRoles = clientProcess.getContributorRoles(contributor, Teamarea, null);
In the above code
1. how to get the logged in user details (userid and user name) ??
2. How to create repo object ??
|
One answer
Ralph Schoon (63.6k●3●36●47)
| answered Aug 03 '15, 2:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
See https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ and other articles there.
System.out.println("Logged in as: " + teamRepository.loggedInContributor().getName()); Comments Thank you Ralph Schoon for your quick response.
I am not able to create teamRepository object. Please help me how to create this object. FYI,I am using RTC server API but not RTC client API
Regards,
Mahesh
Ralph Schoon
commented Aug 03 '15, 4:41 a.m.
| edited Aug 03 '15, 4:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You don't crate it, you get it.
Alternatively you can read https://jazz.net/library/article/1229
Mahesh Vasamsetti
commented Aug 05 '15, 12:54 a.m.
Thank you.
I am now getting below error:
ERROR: com.ibm.team.repository.common.NotLoggedInException: CRJAZ1244I Not logged in to the repository at URL "https://localhost:7443/jazz/".
Ralph Schoon
commented Aug 05 '15, 4:19 a.m.
| edited Aug 05 '15, 4:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am sorry, but if you don't follow the links suggested above and don't educate yourself e.g. by going to the Plain Java client Library snippets and trying to understand the basics of how this works, there is little forum members will be able to do to help you.
If you are not logged into the TeamRepository with a user, you can quite obviously not get the logged in user.
showing 5 of 6
show 1 more comments
|
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.