Class DLOpenerMimeTypes
java.lang.Object
com.liferay.document.library.opener.constants.DLOpenerMimeTypes
Provides a set of constants and methods for working with the MIME types
supported by Liferay.
See https://developers.google.com/drive/api/v3/manage-downloads.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The MIME type for Rich Text files.static final String
The MIME type for Microsoft Word (docx) documents.static final String
The MIME type for Open Document (odp) presentations.static final String
The MIME type for Open Document (ods) spreadsheets.static final String
The MIME type for Open Document (odt) documents.static final String
The MIME type for Microsoft PowerPoint (pptx) presentations.static final String
The MIME type for Microsoft Excel (xlsx) spreadsheets.static final String
Deprecated.As of Mueller (7.2.x), replace by APPLICATION_VND_XLSXstatic final String
The MIME type for Tab Separated Values files. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getMimeTypeExtension
(String mimeType) Returns the canonical file extension associated with the MIME type.
-
Field Details
-
APPLICATION_RTF
The MIME type for Rich Text files.- See Also:
-
APPLICATION_VND_DOCX
The MIME type for Microsoft Word (docx) documents.- See Also:
-
APPLICATION_VND_ODP
The MIME type for Open Document (odp) presentations.- See Also:
-
APPLICATION_VND_ODS
The MIME type for Open Document (ods) spreadsheets.- See Also:
-
APPLICATION_VND_ODT
The MIME type for Open Document (odt) documents.- See Also:
-
APPLICATION_VND_PPTX
The MIME type for Microsoft PowerPoint (pptx) presentations.- See Also:
-
APPLICATION_VND_XLSX
The MIME type for Microsoft Excel (xlsx) spreadsheets.- See Also:
-
APPLICATION_VND_XSLX
Deprecated.As of Mueller (7.2.x), replace by APPLICATION_VND_XLSXMisspelled MIME type for Microsoft Excel (xlsx) spreadsheets.- See Also:
-
TEXT_TAB_SEPARATED_VALUES
The MIME type for Tab Separated Values files.- See Also:
-
extensions
-
-
Constructor Details
-
DLOpenerMimeTypes
public DLOpenerMimeTypes()
-
-
Method Details
-
getMimeTypeExtension
Returns the canonical file extension associated with the MIME type. The canonical file extension is the most common one used for documents of this type (e.g., if the MIME type indicates this is a Microsoft docx document, the return value is".docx"
.The return value always includes a dot (
.
) as the extension's first character.- Parameters:
mimeType
- the MIME type- Returns:
- the canonical extension, or an empty string if none could be determined
-