Get IIteration by OSLC Uri (in RTC Java Plain API)
Hi,
we are using the RTC Java Plain API to create iterations in a CM project area.
But we don't find a way to get the OSLC uri for a generated IIteration object.
And on the other hand, we want to access an IIteration for a given OSLC uri, e.g.
Is this possible with the RTC Java Plain API, and if so, can give some hints please.
Thanks for you help!
|
One answer
Ralph Schoon (63.7k●3●36●48)
| answered Mar 05 '21, 5:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Mar 05 '21, 7:55 a.m. Steve,
the pieces I think I know below.
1. The itemHandle contains the UUID.
com.ibm.team.repository.common.IItemHandle.getItemId()
2. The UUID can be converted to a string and would look like "_29rygDLaEeqnQ6MhncA" in your case above.
3. As explained in https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ , if you know the item type you can create an item handle using the UUID:
Handles can be resolved and searched etc.
IItemHandle handle = [itemtype].ITEM_TYPE.createItemHandle(UUID.valueOf(uuid_string), null);
4. The URIs to different items look different. https://rsjazz.wordpress.com/2012/09/20/the-rtc-workitem-server-link-api-linking-to-work-items-and-other-elements/ explains the "Location" based URI and how to create one.
In the EWM SCM Utils https://github.com/jazz-community/ewm-scm-utils I use this code to create a URI for an item:
public static URI getURIForItem(IItemHandle item) { Location location = Location.itemLocation(item, getPublicURI(item)); return location.toAbsoluteUri(); } |
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.