It's all about the answers!

Ask a question

How to search snapshot in all streams using Java API


Kaushambi Singh (371310379) | asked Apr 16 '13, 4:21 p.m.
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);

Accepted answer


permanent link
Tim Mok (6.6k38) | answered Apr 16 '13, 4:35 p.m.
JAZZ DEVELOPER
#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

Your answer


Register or to post your answer.