Programatically fetch the streams belong to Project area using RTC JAVA API.
Hello Team,
Usecase:
Programatically fetch the streams belong to Project area in RTC JAVA API.
Our Structure:
Streams - owned by Team area.
We have below snippet,
RTCConnect rtcConnection = new RTCConnect(cli.getrepositoryURI(), cli.getUser(), cli.getPassword());
teamRepository = rtcConnection.getTeamRepository();
IWorkspaceManager workspaceMgr = SCMPlatform.getWorkspaceManager(teamRepository);
IWorkspaceSearchCriteria wsSearchCriteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
wsSearchCriteria.setKind(IWorkspaceSearchCriteria.STREAMS);
//wsSearchCriteria.setPartialOwnerNameIgnoreCase(cli.getprojectArea());
List<IWorkspaceHandle> workspaceHandles = workspaceMgr.findWorkspaces(wsSearchCriteria,
Integer.MAX_VALUE, null);
teamRepository = rtcConnection.getTeamRepository();
IWorkspaceManager workspaceMgr = SCMPlatform.getWorkspaceManager(teamRepository);
IWorkspaceSearchCriteria wsSearchCriteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
wsSearchCriteria.setKind(IWorkspaceSearchCriteria.STREAMS);
//wsSearchCriteria.setPartialOwnerNameIgnoreCase(cli.getprojectArea());
List<IWorkspaceHandle> workspaceHandles = workspaceMgr.findWorkspaces(wsSearchCriteria,
Integer.MAX_VALUE, null);
Do we have any option in IworkspaceSearchCriteria to get the desired output?
or help me way to get the output.
Thanks in Advance!!
One answer
With the above search what was the output?
If you have the project area handle you can pass that to the search criteria instead of the name pattern.
wsSearchCriteria.getFilterByOwnerOptional().add(IProjectArea)