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

Get IAttachment from UUID of RTC attachment

I've got a UUID of an RTC workitem. Now, I need to convert this UUID to IAttachment, so that I can save that attachment to disk.

When I use following API method, it returns me IAttachmentHandle, but I need IAttachment instead:

(IAttachmentHandle) IAttachment.ITEM_TYPE.createItemHandle(UUID.valueOf(attachmentUuid), null);

0 votes


Accepted answer

Permanent link
createItemHandle() creates a handle to the item a handle is not the item itself, it needs to be resolved to the item. There are different ways to do that, dependent on if it is client or server API. I assume this is client API. See
https://rsjazz.wordpress.com/2012/09/21/downloading-attachments-from-work-items/ for how this could be done. also see https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ for an overview of the most common questions when using the client API.
Atul Kumar selected this answer as the correct answer

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

Question asked: Apr 30 '14, 3:13 a.m.

Question was seen: 3,180 times

Last updated: Apr 30 '14, 3:29 a.m.

Confirmation Cancel Confirm