com.atlassian.confluence.plugins.emailgateway.api
Interface AttachmentConverter<T>

Type Parameters:
T - the target conversion type
All Known Implementing Classes:
DefaultAttachmentConverter, ImageAttachmentConverter, MultimediaAttachmentConverter, ViewFileAttachmentConverter

@PublicSpi
public interface AttachmentConverter<T>

Converts attachments into a Confluence object, like Link or MacroDefinition.

Since:
5.3

Method Summary
 T convertAttachment(AttachmentFile attachmentFile)
          Creates a Confluence XHTML API object from the supplied parameters, if the Converter instance handles this parameter combination.
 java.lang.Class<T> getConversionClass()
          The type of object this converter returns.
 

Method Detail

convertAttachment

T convertAttachment(AttachmentFile attachmentFile)
Creates a Confluence XHTML API object from the supplied parameters, if the Converter instance handles this parameter combination.

Parameters:
attachmentFile - representing the file name, type and size
Returns:
a Confluence XHTML API object, or null if the converter doesn't handle this file

getConversionClass

java.lang.Class<T> getConversionClass()
The type of object this converter returns. Needed so we can look up the correct Marshaller from the registry. Kind of crap - wouldn't be required if the registry could locate values based on isAssignableFrom :/



Copyright © 2003-2014 Atlassian. All Rights Reserved.