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

How do I retrieve a user's repository workspace?

Can any one suggest me, how we can retrieve the user's repository using plain java api.

All the materials i went through provides solution to fetch the stream/workspace inside the Project area. but i have a requirement which needs me to fetch the users repository workspace. so i can get the flow target of the user repository and enable or disable actions based on the flow target.

Thanks in advance.

0 votes


Accepted answer

Permanent link
If you know the name of the repository workspace:
String workspaceName = ...
you can find it as:
ITeamRepository repo = ...
IWorkspaceSearchCriteria criteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
criteria.setKind(IWorkspaceSearchCriteria.WORKSPACES);
criteria.setExactName(workspaceName);
List<IWorkspaceHandle> workspaces = SCMPlatform.getWorkspaceManager(repo).findWorkspaces(criteria, IWorkspaceManager.MAX_QUERY_SIZE , null);
IWorkspaceHandle wksH = workspaces.get(0);
Cheers.
Vijayakumar B selected this answer as the correct answer

1 vote

Comments

Thanks a lot Servizi. now i understand the difference between WORKSPACE and STREAM, thought there are not much difference between them, WORKSPACEs represent the users repository and STREAMs to the Project Area repository.

Hope i got it right..!!!

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
× 235

Question asked: Aug 06 '13, 5:01 p.m.

Question was seen: 4,432 times

Last updated: Aug 08 '13, 12:46 p.m.

Confirmation Cancel Confirm