how to write the URI for processClient.findProcessArea
Dear
how to write the URI for the following program , if the PA is "test1" ,team area is the "team1",how to write the URI string????
for the program
IProcessClientService processClient= (IProcessClientService) teamRepository.getClientLibrary(IProcessClientService.class);
IAuditableClient auditableClient= (IAuditableClient) teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class);
URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
System.out.println("uri is"+ uri);
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);
if (projectArea == null) {
System.out.println("Project area not found.");
return false;
}
how to write the URI for the following program , if the PA is "test1" ,team area is the "team1",how to write the URI string????
for the program
IProcessClientService processClient= (IProcessClientService) teamRepository.getClientLibrary(IProcessClientService.class);
IAuditableClient auditableClient= (IAuditableClient) teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class);
URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
System.out.println("uri is"+ uri);
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);
if (projectArea == null) {
System.out.println("Project area not found.");
return false;
}
4 answers
Did you try below code?
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, IProcessClientService.ALL_PROPERTIES, null);
Dear
how to write the URI for the following program , if the PA is "test1" ,team area is the "team1",how to write the URI string????
for the program
IProcessClientService processClient= (IProcessClientService) teamRepository.getClientLibrary(IProcessClientService.class);
IAuditableClient auditableClient= (IAuditableClient) teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class);
URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
System.out.println("uri is"+ uri);
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);
if (projectArea == null) {
System.out.println("Project area not found.");
return false;
}
hi, xingshaomin:
I have a question that how to get any projectArea with some conditions and not according to the projectAreaName, i do not want to get all the projectArea.
thanks
any other one can reply this is also fine
I have a question that how to get any projectArea with some conditions and not according to the projectAreaName, i do not want to get all the projectArea.
thanks
any other one can reply this is also fine
Did you try below code?IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, IProcessClientService.ALL_PROPERTIES, null);
Dear
how to write the URI for the following program , if the PA is "test1" ,team area is the "team1",how to write the URI string????
for the program
IProcessClientService processClient= (IProcessClientService) teamRepository.getClientLibrary(IProcessClientService.class);
IAuditableClient auditableClient= (IAuditableClient) teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class);
URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
System.out.println("uri is"+ uri);
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);
if (projectArea == null) {
System.out.println("Project area not found.");
return false;
}
I have a question that how to get any projectArea with some conditions and not according to the projectAreaName, i do not want to get all the projectArea.
Hi wuzeyong126,
Class com.ibm.team.process.client.IProcessItemService has the following methods to retrieve project areas:
List findProcessAreas(IContributor user, IProjectAreaHandle projectAreaHandle, Collection properties, IProgressMonitor monitor) throws TeamRepositoryException;
which allows you to find process areas that a given contributor belongs to (projectAreaHandle can be 'null' to retrieve all process areas in the repository to which the user belongs).
List findAllProjectAreas(Collection properties, IProgressMonitor monitor) throws TeamRepositoryException;
which returns all project areas, which you said you didn't want ;), but I do not see another method to find project areas by other criteria. If you have something specific in mind, I think this should be taken forward as an enhancement request for the Jazz Foundation Process component.
Thanks very much for your quick reply, it's helpful .
At the start of the most, i think that should be a way as following example:
e.g.
there have been any project areas
project area name : pa A;
project area name : pa B;
project area name : other C;
also has a method to provide a query as 'like' in sql
when i use 'pa' as paramter to the method , will returns pa A and pa B.
but i didn't find the method so i appeared here :)
now i get it , that were only two method in
Class com.ibm.team.process.client.IProcessItemService
thanks again ^_^
best regards
At the start of the most, i think that should be a way as following example:
e.g.
there have been any project areas
project area name : pa A;
project area name : pa B;
project area name : other C;
also has a method to provide a query as 'like' in sql
when i use 'pa' as paramter to the method , will returns pa A and pa B.
but i didn't find the method so i appeared here :)
now i get it , that were only two method in
Class com.ibm.team.process.client.IProcessItemService
thanks again ^_^
best regards
Hi wuzeyong126,
Class com.ibm.team.process.client.IProcessItemService has the following methods to retrieve project areas:
........
which returns all project areas, which you said you didn't want ;), but I do not see another method to find project areas by other criteria. If you have something specific in mind, I think this should be taken forward as an enhancement request for the Jazz Foundation Process component.