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

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

0 votes



4 answers

Permanent link
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;
}

0 votes


Permanent link
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



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

0 votes


Permanent link

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.

0 votes


Permanent link
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


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.

0 votes

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
× 10,938

Question asked: Oct 25 '11, 5:20 a.m.

Question was seen: 6,656 times

Last updated: Oct 25 '11, 5:20 a.m.

Confirmation Cancel Confirm