Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] Q: Mylyn attachments and content types

> There's little documentation around RepositoryAttachments.  I see
> RepositoryTaskAttribute.ATTACHMENT_CTYPE and
> RepositoryTaskAttribute.ATTACHMENT_TYPE.  What's the difference?

In Mylyn 2.3.1 both are supported as the content type of an attachment. I 
would recommend using RepositoryTaskAttribute.ATTACHMENT_CTYPE which is the 
content type attribute supported in 3.0.

> Is Mylyn expecting specific types of values for these attribute types?
>
> For example, should I be putting something like "text/plain" or
> "image/png" for one of these attributes?

The content type is used in some places to determine the content type, e.g. 
when downloading an attachment to the clipboard. In the future this may also 
be used for opening attachments in editors.

Setting a content type on RepositoryAttachments optional. If your connector 
does not support content types (like Trac and JIRA) you can leave the default 
value. 

> If my repository does not identify a content type, is there a handy map
> someone that can guess content type based on the attachment's filename
> extension?

The framework will provide a mapping based on the filename if no content type 
is available.

> If I have other "type" information that I need to store, such as
> "unit-test-results", then should I just be using my own attribute key to
> store this data?

Yes.

Steffen

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


Back to the top