Package org.opencms.loader
Class CmsMimeType
java.lang.Object
org.opencms.loader.CmsMimeType
- All Implemented Interfaces:
Comparable<CmsMimeType>
Describes a MIME type configured in OpenCms.
- Since:
- 7.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionCmsMimeType(String extension, String type) Default constructor for MIME types.CmsMimeType(String extension, String type, boolean configured) Special constructor for "marked" MIME types. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CmsMimeType obj) MIME-types are compared according to the type first, and to the extension second.booleanMIME-types are equal is the extension is equal.Returns the MIME type file extension.getType()Returns the MIME type description.inthashCode()The hash code of MIME types is build only from the extension.booleanReturnstrueif this MIME type has been read from the OpenCms configuration.
-
Constructor Details
-
CmsMimeType
Default constructor for MIME types.If the extension does not start with a dot '.', then a dot is automatically added as a prefix.
- Parameters:
extension- the MIME type extensiontype- the MIME type description
-
CmsMimeType
Special constructor for "marked" MIME types.If the extension does not start with a dot '.', then a dot is automatically added as a prefix.
- Parameters:
extension- the MIME type extensiontype- the MIME type descriptionconfigured- indicates if this a MIME type read from the OpenCms configuration
-
-
Method Details
-
compareTo
MIME-types are compared according to the type first, and to the extension second.- Specified by:
compareToin interfaceComparable<CmsMimeType>- See Also:
-
equals
MIME-types are equal is the extension is equal. -
getExtension
Returns the MIME type file extension.- Returns:
- the MIME type file extension
-
getType
Returns the MIME type description.- Returns:
- the MIME type description
-
hashCode
The hash code of MIME types is build only from the extension. -
isConfigured
Returnstrueif this MIME type has been read from the OpenCms configuration.- Returns:
trueif this MIME type has been read from the OpenCms configuration
-