It's all about the answers!

Ask a question

Get RTC source control file Path


Naveen Tyagi (19778152) | asked Oct 20 '15, 2:26 a.m.
i am  browsing file from sandbox to my tool. Is there any possible way to get the RTC source control path of that file at the time of browsing?
I am trying to get some pattern from .jazz5 folder which gets download with workspace on local machine but everything in encrypted/binary form and seems almost impossible to get.
Is there any possible way/API to get file path ?

Comments
1
Morten Madsen commented Oct 20 '15, 3:06 a.m.

Can you give a little more information about what you are doing, and what you are trying to achieve?

For example:

1. You are mentioning the java API? What are you using it for?
2. Are you running a build, or some kind of home-made external tool?


Naveen Tyagi commented Oct 20 '15, 3:24 a.m.

Thanks for reply, Morten.

Actually , It was idea to get file path from .jazz folder in my workspace but not able to get  any infomation from any of the .dat file in that folder which mainly contains encrypted/binary data about workspace. As of now i am trying to use simple java to get file path from .dat files in my sandbox but i don't think it is going to work since everything in the file either in binary form or encrypted.

It is a home-made external tool we  have bulilt. that allows user to browse a file from local machine(from sand box actually ) and link requirements in the gui of the tool and then upload it to the DNG server. My need is to provide the RTC source control link of that file to the requirements in DNG. i am able to create the link just by adding hardcore url value of the file but i need to read it pragmatically. 


Morten Madsen commented Oct 20 '15, 3:54 a.m.

Do you have an example of an "RTC source control link" to a file? I want to be sure, what you want.


Naveen Tyagi commented Oct 20 '15, 4:33 a.m.

1) open Tool
2) Select Project area from list of the Projects in DNG server.
3) Select folder from drop down list you want to populate the requirements from on tool GUI .
3) Browse a file from sandbox( i need RTC source control URI for this file  )  and user will see the components of the file in tree format.
4) Select any one of the component, then select requirement(s) you want to link in that component.
5) Repeat same for other components as well.
6) For Each component one requirement will be created in a folder with same name as browse file in DNG and all link requirements will be added to the SatisfiedBy link in the requirement represents that component. This is where i am Right Now. Now my question is :
7) in ImplementBy link i want to add the File link ,so that if user open any of the component requirement can get direct link to the File that component belongs to that is in RTC Source control. User can download that find can see if some changes are made in the components and again update the linked requirements following the same procedure from 1 to 7.



Naveen Tyagi commented Oct 20 '15, 6:06 a.m.

Yes, web link. when user open the requirement and go to the ImplementedBy link then by clicking on the link user can directly go to the source control link in browser.


Chris McGee commented Oct 21 '15, 1:56 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Hi Naveen,

I believe that the intended way to link DOORS requirements to RTC is via work items. When developers satisfy the requirements they can attach the change sets to the work items enabling traceability from requirements to development effort and the code changes to implement the requirement.

http://www.ibm.com/developerworks/rational/library/doors-rational-team-concert-globally-distributed-workers/

I hope that this helps,
Chris


Naveen Tyagi commented Oct 23 '15, 12:22 a.m.

Hi Chris,
Thanks, but this is not something i want. All i am interested in to get the "RTC source control file" web path that is stored in my sandbox, so that i can use in whenever i want including in tool i am  building.

showing 5 of 8 show 3 more comments

Accepted answer


permanent link
Chris McGee (50511117) | answered Oct 23 '15, 9:05 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi Naveen,

It seems that your goal is to go from a file in the sandbox to the URI of it so that you can read its contents in the web UI using API's so that the code doesn't break. Unfortunately, there is no API that will allow you to get the remote path of the versionable represented by a file in a sandbox. Also, the URI of the file in the web UI is not API and cannot be counted on being permanent between releases.

If your goal is stability then I recommend using the intended linking between DOORS and RTC, which is the OSLC linking between requirements and work items. Otherwise, if you are willing to support it yourself you can try using internals, but be aware that it is not supported. Also, you may need to fix the tool after every upgrade of client or server.

Provided that you are ok with the caveats and are willing to do some investigation you can try using an internal interface known as the IFilesystemRestClient. Check out the getExtendedAttributes(). It can be invoked from a plugin you install into the eclipse client or via a http REST call (provided you authenticate with magic keys). In either case that call will return a versionable ID. The versionable can then be located within a repository workspace or stream using Plain Java Client API. Retrieve an IConfiguration via the IWorkspaceManager and IWorkspaceConnection. From the configuration, you can call determineAncestorsInHistory() to get the path within the component.

For more details on the Plain Java Client API (not the IFilesystemRestClient, which is internal) check out this article:
https://jazz.net/library/article/1229

If you require API to do the linking from requirements to files within a stream then please raise an RFE in developer works. The development team will determine whether it fits into the 24 month planning window and will update the RFE with details about whether it will be planned for completion within 24 months or not.

Cheers,
Chris
Naveen Tyagi selected this answer as the correct answer

Your answer


Register or 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.