Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] Attachment support in Mylyn 2.3

On Thursday 15 May 2008, Tom Bryan (tombry) wrote:
> So, the Integrator Guide says "Please contribute" in the Attachment
> support section.  Since I'm only doing a read only connector at the
> moment, there's very little I need to do, right?  I just need to fetch
> the attachments in my TaskDataHandler.getTaskData() and add them to the
> RepositoryTaskData instance for the task?

In addition you have to provide an implementation of AbstractAttachmentHandler 
and return this in your connector implementation. The attachment handler 
class is used for uploading and downloading of attachments.

If you want to support context attachments you may have to explictly set the 
description to the magic description string. Here is a snippet from 
JiraTaskDataHandler.updateTaskData():

RepositoryAttachment taskAttachment 
  = new RepositoryAttachment(attributeFactory);
if (CONTEXT_ATTACHEMENT_FILENAME.equals(jiraAttachment.getName())) {
taskAttachment.setAttributeValue(RepositoryTaskAttribute.DESCRIPTION,"mylyn/context/zip");		
}

Steffen

-- 
Steffen Pingel - steffenp@xxxxxx - http://steffenpingel.de


Back to the top