It's all about the answers!

Ask a question

Getting a change set for a stream and baseline with plain Java


Lars Fockele (22179) | asked Nov 19 '13, 12:17 p.m.
retagged Dec 16 '13, 5:49 p.m. by David Lafreniere (4.8k7)
Hi,

I'm trying to get all change sets for a specific component baseline in a defined stream, but I found no way to to it.

What I want to do:
  • Going through a project area
  • Get all streams (with some conditions...) and do for each stream:
    • Find a defined component inside this stream. If found ->
    • Get all baselines of the component and do for each baselines:
      • Look, if there is a specific change set in the baseline

I'm able to get all change sets for a component baseline, but then I've no idea, in which stream it is.
I'm able to get all change sets for a stream, but then I've no reference to the baseline.

For both I took the setContext function, but I suspect, that I can't use it two times, if I do it in the way below, the program only takes the last setContext criteria:

IChangeSetSearchCriteria changeSetSearchCriteria = IChangeSetSearchCriteria.FACTORY.newInstance();
                                            changeSetSearchCriteria.setComponent(comps.get(j));   
                                           
                                            changeSetSearchCriteria.setContext(streamHandle);
                                            changeSetSearchCriteria.setContext(baselineHandle);
                                                                                       
                                            List<IChangeSetHandle> changeSetHandles = wm.findChangeSets(changeSetSearchCriteria,  IWorkspaceManager.MAX_QUERY_SIZE, null);


Do you have an idea, how to solve it?

Thanks in advance,
Lars

Comments
Ralph Schoon commented Nov 20 '13, 3:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Be the first one to answer this question!


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.