RTC Api - Remote Path of file
2 answers
Consider to check
to understand the relative path information available in the SCM context.
Comments
I'm searching remote path not relative. I was able to establish that such information is available in file property -> Jazz Source Control -> and there is remote path field, nevertheless I can't find way to get it from RTC Api.
Note that relative path is a computed value, that requires a "configuration" (stream, workspace, baseline, or snapshot) parameter, and so cannot be determined just from the file itself, and therefore only appears to be a property of the file ... it actually is a computation that requires the configuration parameter.
As an example the remote path is
/JKEBusinessData/src/com/jke/beans/AccountBean.java
It is composed of the relative path build by the relative folder information the SCM system stores. Suggestions
- Don't assume if it is shown in the properties that there must be a simple getter for it
- Consider looking into the links provided to you (e.g. the http://thescmlounge.blogspot.de/2013/08/getting-your-stuff-using-rtc-sdk-to-zip.html computes the relative path in the zip file based on this information
Hm... remote path looks like following: component/path/to/file, since relative path in my workarea is different, because of particular loadrule. I thought remote path should be available through some class or getter... I guess need to go through all component folders and check if such file exist there.. don't think that this is most elegant solution.
Maybe there is a mechanism to search for a file in the API? I am almost sure there is.
Or consider looking into the links I provided, these however assume the basic structure of Eclipse projects in SCM.
It really doesn't have sense, since I have IShare object which is linked with component which contain the file, and I'm able to get this componen but I'm not able to get remote path of this file in this component...
Never mind. Good luck with your automation then.
If you have the shareable, you can get the local path:
Comments
Yes I need remote path, which represents how file is stored in server. Function getFullPath gives me absolute path to the file but from my workspace which is not what I need.
I'm still trying to get it, but without any hint it's really hard...
I was under the impression that files were stored in blobs in the database..
File (versions) are blobs in the database, but in the context of a given configuration (workspace, stream, baseline, snapshot), the RTC server can compute a remote pathname for that file wrt that configuration.
Do you know what function in RTC Api can compute remote pathname of base of eg. workspace?