It's all about the answers!

Ask a question

What is the API for retriving jazz user's e-mail address from server side

Weiping Lu (452910) | asked Jun 25 '13, 1:38 p.m.

The HttpRequest object passed to a jazz server side contains user url and user name info, but it does not seem to contain user e-mail address. Is there any configuration needed to make it contain the e-mail address, or do I miss something - e.g. a simple API would do the job?



3 answers

permanent link
Weiping Lu (452910) | answered Jul 03 '13, 11:53 a.m.
Hi Lauren/Ralph,

Thank you both for replying.

I did not explain my context clearly - it is in the context of a  rest servlet application registered with jts, and not in the context of work item.  But your info is still helpful for my other applications.

 A colleague of mine helped me solve the problem I raised. The code is something like this:

HttpResponse jfsResponse = ...

RDFEntity entity = new RDFEntity(jfsResponse.getEntity());

Model model = entity.getModel();

Property mboxProp = model.getProperty("");

String mboxStr = user.getProperty(mbox).getObject().toString();



permanent link
Ralph Schoon (63.2k33646) | answered Jul 03 '13, 7:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER shows the server API to get the IContributor object in some scenarios..

permanent link
Lauren Hayward Schaefer (3.3k11727) | answered Jul 03 '13, 7:17 a.m.
Hi Weiping,

I don't fully understand the scenario you're working on.  It seems like if you can get the user's uuid, you could get generate the contributor handle by doing something along the lines of
IContributorHandle handle = (IContributorHandle) IContributor.ITEM_TYPE.createItemHandle(uuid, null);
and then fetch the contributor by doing something along the lines of what is posted here:
Once you have the contributor, you can call contributor.getEmailAddress();

Your answer

Register or 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.