RTC API - Parent folder as a Versionable
I was just wondering how I could get a state for the parent-folder's handle as a versionable and pass that to scmService in order to retrieve the parent folder.
I'm currently doing: IVersionable newparent = scmService.fetchState(versionableAfter.getParent(), new String[]{IVersionable.NAME_PROPERTY}, null); but that's clearly wrong because I'm not specifying the state as a handle |
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Nov 27 '14, 2:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I used this code to understand how the API works: http://thescmlounge.blogspot.de/2013/08/getting-your-stuff-using-rtc-sdk-to-zip.html
In https://rsjazz.wordpress.com/2013/10/15/extracting-an-archive-into-jazz-scm-using-the-plain-java-client-libraries/ the method findOrCreateFolderWithParents() does this task. The only way I found was to start with the root and look the children up until I had the one I wanted. Comments
Zaid Al-Khishman
commented Nov 28 '14, 5:07 p.m.
Hi Ralph,
There are areas, where internal API can't be avoided. I would like to see users requesting this API to be officially supported. Although the API in some places is internal and could change at any time, I have not seen many changes in these areas since I do this API work. I think it is safe to use these methods, but to be fair to users I have to point it out.
|
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.