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

SCM Findworkspacebyname Functionality

Hello Team,

we have logic to search Workspace by name.

We have below method used for this purpose,
@Deprecated IItemQueryPage findWorkspacesByName(java.lang.String namePattern, boolean matchWorkspaces, boolean matchStreams, boolean matchOwners, int pageSize, org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws TeamRepositoryException

0 votes



One answer

Permanent link
You should be using IWorkspaceManager#findWorkspaces() instead as IWorkspaceManager#findWorkspacesByName() is deprecated.

This API takes in a IWorkspaceSearchCriteria. So, if you want to find workspaces with an exact name for example, you would use: IWorkspaceSearchCriteria.setExactName().

You would need to run this as a user who is an adminstrator, otherwise repository workspaces or streams might be private (inaccessible) to the logged in user.

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
× 10,936

Question asked: Jul 23 '19, 8:20 a.m.

Question was seen: 1,002 times

Last updated: Sep 30 '19, 11:23 a.m.

Confirmation Cancel Confirm