Package com.atlassian.confluence.core
Class DefaultMimetypesExtensionTranslationMapFactory
- java.lang.Object
-
- com.atlassian.confluence.core.DefaultMimetypesExtensionTranslationMapFactory
-
- All Implemented Interfaces:
MimetypesExtensionTranslationMapFactory
public class DefaultMimetypesExtensionTranslationMapFactory extends 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.
-
-
Constructor Summary
Constructors Constructor Description DefaultMimetypesExtensionTranslationMapFactory()
-
-
-
Method Detail
-
getMimetypeExtensionTranslationMap
public Map<String,String> getMimetypeExtensionTranslationMap()
- Specified by:
getMimetypeExtensionTranslationMap
in interfaceMimetypesExtensionTranslationMapFactory
-
-