com.atlassian.confluence.core
Class DefaultMimetypesExtensionTranslationMapFactory
java.lang.Object
com.atlassian.confluence.core.DefaultMimetypesExtensionTranslationMapFactory
- All Implemented Interfaces:
- MimetypesExtensionTranslationMapFactory
public class DefaultMimetypesExtensionTranslationMapFactory
- extends java.lang.Object
- implements MimetypesExtensionTranslationMapFactory
As MimeTypesFileTypeMap only allows one way conversion (from file to mime type) this class manually parses the file
and can be used for reverse mapping.
NOTE: The current email infrastructure relies on a DataSource to represent an email attachment.
Because of this, DataSource.name is used for both the ContentId and Filename. Some email services like Amazon SES
require a valid filename (including extension), this class is used to determine a reasonable extension for a
DataSources mime type and append it to the end of a file name. Ideally, we'd use another object to represent an
attachment, and preserve the content-id, intended file name (w/ attachment) there.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultMimetypesExtensionTranslationMapFactory
public DefaultMimetypesExtensionTranslationMapFactory()
getMimetypeExtensionTranslationMap
public java.util.Map<java.lang.String,java.lang.String> getMimetypeExtensionTranslationMap()
- Specified by:
getMimetypeExtensionTranslationMap
in interface MimetypesExtensionTranslationMapFactory
Copyright © 2003-2014 Atlassian. All Rights Reserved.