Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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

0 votes

Comments


Be the first one to answer this question!

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 1,202
× 169
× 149

Question asked: Nov 19 '13, 12:17 p.m.

Question was seen: 7,239 times

Last updated: Dec 16 '13, 5:49 p.m.

Confirmation Cancel Confirm