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

How get web URL from RTC work item in RTC server follow-up action plugin?

Hello!
I have implemented such code to get work item references in an RTC server side plug-in (follow-up action):

        IWorkItemReferences refs = saveParameter.getNewReferences();
        List<IEndPointDescriptor> listRefTypes = refs.getTypes();
        for (IEndPointDescriptor refType : listRefTypes) {
             List<IReference> listReferences = refs.getReferences(refType);
            for (IReference ref : listReferences) {
                URI link_uri = ref.createURI();
                URL link_url = link_uri.toURL();
                ...
            }

Of course, here I have an IllegalArgumentException because of link_uri which is really looking like to "itemOid/com.ibm.team.workitem.WorkItem/_1bF4ILBAEeO-gIIGxPDnjA". But nevertheless, I can see the normal URL for the link in RTC GUI (both in RTC Eclipse and Web UI):

https://localhost:7443/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/4

I even can not simply add "http://", server name and port because URI is different from URL conventions! Can somebody help how can it be got a standard URL link in Web format including current server, port, linked object and so on?
Thank you!

0 votes


Accepted answer

Permanent link
 see https://jazz.net/forum/questions/13336/work-item-url#147114

remember the AbstractService provides methods to get repository info
Dmitry A. Lesin selected this answer as the correct answer

0 votes

Comments

I found that the CLM links are all conforming to HTTP standarts. But if I need to get appropriate RTC internal links then I have to transform them in accordance to mentioned way!

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,943

Question asked: Apr 01 '14, 1:10 p.m.

Question was seen: 5,644 times

Last updated: Apr 14 '14, 4:55 a.m.

Confirmation Cancel Confirm