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

How to get the repository URI in an Advisor?

Hi all,


in an advisor that prevents delivery of change sets under certain circumstances, I've been asked to write links to the 'bad' change sets to the log.  To do this, it seems I need to use Location.itemLocation() to get the change set's URI, but the 2nd argument to Location.itemLocation is the repository URI and I can't work out how to get it.

Just make life interesting, I'm developing the code in an RTC 6.0.6 development env, then I'll be reworking it as necessary in a 4.0.7 development env for deployment to a 5.0.2 server. Sadly we're not live with the v6 yet, but I'm working on that....

So, for each of versions 6.0.6 and 5.0.2, can anyone advise how I can get the repository URI from within an Advisor?

0 votes


Accepted answer

Permanent link

 You call getPublicRepositoryURL() in your code.


Your advisor inherits that from com.ibm.team.repository.service.AbstractService.getPublicRepositoryURL()

Cliff Gardiner selected this answer as the correct answer

0 votes

Comments

This should be the same since 4.x. You should just make sure to use and compile for a correct Java version to make the code deployable in earlier versions. 

Thanks Ralph,


I had a feeling it was going to be something simple!  Hours of searching came up with nothing, though.  And thanks for responding so quickly.

Regards,
Cliff 

I needed it for the same purpose, you did. And I share the experience of having searched for API. 


Did you know you can search for pattern? E.g. you can search the SDK for methods that match ublicURI this has helped me to find some well hidden stuff 8) 

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

Question asked: Dec 03 '18, 7:24 a.m.

Question was seen: 1,394 times

Last updated: Dec 03 '18, 8:13 a.m.

Confirmation Cancel Confirm