Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes



One answer

Permanent link

From any IItem or IItemHandle, you can get the Origin, using com.ibm.team.repository.common.IItemHandle.getOrigin() .  



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.

0 votes

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. 

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,926
× 411
× 169

Question asked: May 07 '19, 6:39 a.m.

Question was seen: 2,789 times

Last updated: May 13 '19, 4:12 a.m.

Confirmation Cancel Confirm