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

How to search snapshot in all streams using Java API

I know how to search snapshot in particular stream using Java API. How to search snapshot in all the streams using API. The below cod is for searching in a particular stream but how to search in all streams. If I comment the line     criteria2.setExactName(stream_name); it shows snapshot not found error.

IWorkspaceSearchCriteria criteria2 = IWorkspaceSearchCriteria.FACTORY.newInstance();
           
            criteria2.setKind( IWorkspaceSearchCriteria.STREAMS );               
            criteria2.setExactName(stream_name);

0 votes


Accepted answer

Permanent link
#setExactName() is to specify the name of the snapshot.

By not using #setOwnerWorkspaceOptional(), the search will ignore the snapshot owner (ie. searches all streams).
Kaushambi Singh selected this answer as the correct answer

0 votes

Your answer

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
× 11,019

Question asked: Apr 16 '13, 4:21 p.m.

Question was seen: 4,370 times

Last updated: Apr 16 '13, 4:35 p.m.

Confirmation Cancel Confirm