Using Java plugin for RTC, how to check the URL of the server ccm instance which will verify whether the project belongs to same ccm instance or another?
Aishwarya Sureban (33●1●13)
| asked May 07 '19, 6:39 a.m.
edited May 13 '19, 4:12 a.m. by Ralph Schoon (63.5k●3●36●46) I want to perform few checks for the work items using Java plugin wherein there is one of the check where I need to verify the URL of the server CCM Instance. How to compare two different ccm instances using Java wherein I need to check whether the project area belongs to same ccm instance or another?
I Thank you in anticipation.
|
One answer
Ralph Schoon (63.5k●3●36●46)
| answered May 07 '19, 7:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited May 07 '19, 7:26 a.m. From any IItem or IItemHandle, you can get the Origin, using com.ibm.team.repository.common.IItemHandle.getOrigin() .
See https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ search for Origin
You can uset that to get the ITeamRepository from the Item. You can get the repositrory URI using com.ibm.team.repository.client.ITeamRepository.getRepositoryURI(). The URI contains the context root that is different for different applications.
Comments
Aishwarya Sureban
commented May 13 '19, 3:46 a.m.
Hi Ralph,
Thank you for the information. I have gone through the article and I have used
ITeamRepository sourcePaOrigin = (ITeamRepository) sourceProjectArea.getOrigin();
However, I am getting the value of sourcePaOrigin as null while debugging the code. Thus, I am not able to perform check which I wish to do so in the code. Kindly assist me in this case.
Thank you.
Sorry, can't help. |
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.