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

set creator of IAttachment (client side)

Hi,

I've created some code with jazz plain api to export e-mail message to RTC. It's worked fine.

I tried to search how can I set creator of IAttachment but could not find. Is it possible to adjust the creator?
 
Thank you in advance for your answer.

0 votes

Comments

There is a method IAttachment IWorkItemServer.saveAttachment witch create IAttachment from Attachment. If I can use this method in client side, I have possibility to set the uploaded attachment creator.

Someone has tried to use this method in client side?

behind each I* interface class is a concrete class implementation of the interface.
those classes are in the internal libraries.

the Attachment implementation class has a setCreator(IContributorHandle);

you cast the IAttachment to Attachment, then you can use the setCreator method.

and then save like always

just a reminder, internal classes are not documented, and could change at any time, use at your own risk.  you cannot open a defect against and internal api change


Accepted answer

Permanent link
Well, you can try to use the INTERNAL interface com.ibm.team.workitem.common.internal.model.Attachment . Be warned, that is internal API and can change and so on. Example:
			((Attachment) newAttachment).setCreator(value);
szasz gabor selected this answer as the correct answer

0 votes

Comments

PS: if you want to do things you shouldn't do, it is always an option to look into the implementation classes and other analogue interfaces that might be available.

The external interfaces limit what you can do compared to the internal model interfaces.

It's work. Thank you.


One other answer

Permanent link
 Hello,
I guess that you can not set the creator of an attachment.
IAttachment API only enables you to getCreator().

Reading through the code, the creator is set at creation time, using the user id that performs the operation.
In your case, the process / code that exports the email to RTC.
Eric

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,952
× 85

Question asked: Aug 29 '14, 2:57 a.m.

Question was seen: 4,842 times

Last updated: Sep 04 '14, 3:44 a.m.

Confirmation Cancel Confirm