com.atlassian.confluence.plugins.emailgateway.attachmentconverter.instances
Class DefaultAttachmentConverter

java.lang.Object
  extended by com.atlassian.confluence.plugins.emailgateway.attachmentconverter.instances.DefaultAttachmentConverter
All Implemented Interfaces:
AttachmentConverter<Link>

public class DefaultAttachmentConverter
extends java.lang.Object
implements AttachmentConverter<Link>

Default catch-all AttachmentConverter that simply converts attachments to Links referencing them.

Since:
5.3

Constructor Summary
DefaultAttachmentConverter()
           
 
Method Summary
 Link convertAttachment(AttachmentFile attachmentFile)
          Creates a Confluence XHTML API object from the supplied parameters, if the Converter instance handles this parameter combination.
 java.lang.Class<Link> getConversionClass()
          The type of object this converter returns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAttachmentConverter

public DefaultAttachmentConverter()
Method Detail

convertAttachment

public Link convertAttachment(AttachmentFile attachmentFile)
Description copied from interface: AttachmentConverter
Creates a Confluence XHTML API object from the supplied parameters, if the Converter instance handles this parameter combination.

Specified by:
convertAttachment in interface AttachmentConverter<Link>
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

public java.lang.Class<Link> getConversionClass()
Description copied from interface: AttachmentConverter
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 :/

Specified by:
getConversionClass in interface AttachmentConverter<Link>


Copyright © 2003-2014 Atlassian. All Rights Reserved.