how to retrieve the name of all Streams of a project area?
![]()
Hi,
i need retrieve the name of all streams of a project area x, using API JAVA LIB. how to do this? my code is this: IProgressMonitor monitor = new NullProgressMonitor(); IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(teamRepository); IWorkspaceSearchCriteria wsSearchCriteria = IWorkspaceSearchCriteria.FACTORY.newInstance(); wsSearchCriteria.setKind(IWorkspaceSearchCriteria.STREAMS); wsSearchCriteria.setPartialOwnerNameIgnoreCase(ProjectArea); List <IWorkspaceHandle> workspaceHandles = wm.findWorkspaces(wsSearchCriteria, Integer.MAX_VALUE, monitor); thanks! |
5 answers
![]()
did u look at the build system toolkit for apis? this provides additional classes for accessing streams and their content
|
![]() did u look at the build system toolkit for apis? this provides additional classes for accessing streams and their content may indicate a link to documentation or an example |
![]() Hi, Hi, You are on the right track. That code you have will give you the handles of the streams, however you now have to fetch them from the repository so that you can get the most recent name. do this from where you left off (Not tested, but should be mostly right):
Note: using IItemManager.REFRESH will take longer but will give you the up-to-date names of the streams in the repository. Or you could use IItemManager.DEFAULT to have it possibly run quicker, giving you the names that are from the local cache (but there's a small chance that they could be stale if someone were to rename the streams) Also, at a quick glance, if the first part that you have doesn't work (due to wsSearchCriteria.setPartialOwnerNameIgnoreCase()) , do this; List<IProcessArea> processAreas = new ArrayList<IProcessArea>(); ... add the process areas you care about. ... ... wsSearchCriteria.getFilterByOwnerOptional().addAll(processAreas); ... |
![]()
Is it possible to do this in attribute customization (Javascript) to create dependent enumerations based on selected project area?
Thanks. |
![]() Is it possible to do this in attribute customization (Javascript) to create dependent enumerations based on selected project area? That I have no idea. Hopefully someone else who reads this can provide some insight. |
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.