Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

How to pass URI parameter to IProcessServerService#findProcessArea method?

Hi,

Lets say I am having a Project area called "My Project Area". I want to get the IProjectArea for this and so I am trying to use IProcessServerService#findProcessArea method. I want to know How to convert my Project name as URI so that I can pass this as parameter.

Any example usage of converting String (Project Area name) to URI will be appreciated.

Thanks

1

0 votes


Accepted answer

Permanent link
Here's how:

String projectAreaURI = java.net.URLEncoder.encode(projectAreaName, "UTF-8");
projectAreaURI = projectAreaURI.replace("+", "%20");
IProcessArea projectArea = processService.findProcessArea(new java.net.URI(projectAreaURI).toString(), null);

Hope that helps.
Jared Burns selected this answer as the correct answer

2 votes


2 other answers

Permanent link
Looking at the code for IProcessServerService.findProcessArea() and at a few places where it is used, it looks like the URI parameter is just the name of the project area encoded as if it were part of a URL (such as changing spaces to "%20").  It is not a full URL, just a (properly encoded) project area name.

--
David Olsen, IBM Rational, Jazz Process Team

1 vote

Comments

Yes, it is just the project area name. David did not misread the code.


Permanent link
Try IProcessServerService#findProcessArea(URI.create(projectName.replaceAll(" ", %20)),..); where URI is from java.net.URI.

-1 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
× 89

Question asked: Jun 07 '12, 2:17 a.m.

Question was seen: 6,055 times

Last updated: Jun 09 '12, 1:23 p.m.

Confirmation Cancel Confirm