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

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

Hi,

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?

Thanks

Weiping

0 votes



3 answers

Permanent link
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: https://jazz.net/forum/questions/112468/how-to-get-creator-id-using-plain-java-api.
Once you have the contributor, you can call contributor.getEmailAddress();

1 vote


Permanent link
https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ shows the server API to get the IContributor object in some scenarios..

1 vote


Permanent link
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("http://xmlns.com/foaf/0.1/mbox");

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

Thanks,

Weiping




1 vote

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
× 12,019
× 7,495

Question asked: Jun 25 '13, 1:38 p.m.

Question was seen: 6,710 times

Last updated: Jul 03 '13, 11:53 a.m.

Confirmation Cancel Confirm