It's all about the answers!

Ask a question

Sample for IWorkspaceManager.findSnapshotsQuery


Martin Gompertz (48510) | asked Mar 27 '20, 8:10 p.m.
Hi,

I'm trying to find all snapshots owned by a stream.

From a browse around, it looks like IWorkspaceManager.findSnapshotsQuery might be the right thing to use.

Is there a sample?  I don't know what arguments to provide to this call.

Or if I should be doing it a better way, what is that?

Thank you!

Martin

Comments
Ralph Schoon commented Mar 28 '20, 12:02 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You should read https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ at a minimum follow the RTC Extensions Workshop to set up an environment with the SDK. Use https://rsjazz.wordpress.com/2019/05/16/searching-and-exploring-the-rtc-sdk/ . You can use the Java search to find classes, their code and their interfaces. You can set up any project as a plugin project. By adding the features and plugins to the plugin dependencies the SDK code becomes available in the PDE. There is also Unit test code in the SDK that shows how some of the API is used.

Accepted answer


permanent link
Martin Gompertz (48510) | answered Mar 28 '20, 12:17 p.m.
Thanks Ralph.
I couldn't download the 6.0.6 SDK, as that version is not listed on the download pages.
But I have solved my problem with a different API:
      IBaselineSetSearchCriteria criteria;
      criteria = IBaselineSetSearchCriteria.FACTORY.newInstance();
      criteria.setPartialName("beginswiththis");
      criteria.setOwnerWorkspaceOptional(ws);
      List<IBaselineSetHandle> snapshots_h;
      snapshots_h = mworkspace.findBaselineSets(criteria, 10, null);
Ralph Schoon selected this answer as the correct answer

Comments
Ralph Schoon commented Mar 30 '20, 2:04 a.m. | edited Mar 30 '20, 2:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You can access the old versions by reading the small text at the beginning of the download page and following the link to https://jazz.net/downloads/rational-team-concert . I think it is essential to install the SDK and to be able to see the classes, if you want to do any extending. 

Your answer


Register or to post your answer.