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

list of streams in a project area?

I have this configuration:

1 Project Area: APP00001_Aplicacion1
4 Streams: Aplicacion1_Calidad, Aplicacion1_Desarrollo, Aplicacion1_Integracion,Aplicacion1_Produccion

how I can create a list of streams for the project area "APP00001_Aplicacion1" using Java Lib Plain API which results:

Aplicacion1_Calidad
Aplicacion1_Desarrollo
Aplicacion1_Integracion
Aplicacion1_Produccion

this is my code but dont work:

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);

in this post https://jazz.net/forums/viewtopic.php?t=14261&highlight= also recommend the use of IScmQueryService, but I can not find the method cancommonData.getScmQueryService(); in the documentation and I have no idea that as I

public static IWorkspace findStream( String streamName,
SportServiceData commonData )
throws TeamRepositoryException
{
IScmQueryService scmQueryService = commonData.getScmQueryService();
IRepositoryItemService repositoryItemService = commonData
.getRepositoryItemService();
IWorkspaceSearchCriteria criteria = IWorkspaceSearchCriteria.FACTORY
.newInstance();
criteria.setKind( IWorkspaceSearchCriteria.STREAMS );
criteria.setExactName( streamName );
List<IWorkspaceHandle> workspaceHandles = scmQueryService
.findWorkspaces( criteria, Integer.MAX_VALUE, null )
.getItemHandles();
if (workspaceHandles.size() > 1)
{
throw new TeamRepositoryException( workspaceHandles.size() + " \""
+ streamName + "\" streams found" );
}
if (!workspaceHandles.isEmpty())
{
IWorkspaceHandle workspaceHandle = workspaceHandles.get( 0 );
return (workspaceHandle.hasFullState())
? (IWorkspace)(workspaceHandle.getFullState())
: (IWorkspace)(repositoryItemService.fetchItem(
workspaceHandle, IRepositoryItemService.COMPLETE ));
}
return null;
}

0 votes


Be the first one to answer this question!

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,937

Question asked: Apr 16 '12, 2:44 p.m.

Question was seen: 3,862 times

Last updated: Apr 16 '12, 2:44 p.m.

Confirmation Cancel Confirm