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!
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!