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?
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
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
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.