Class MimetypeEntryImpl

java.lang.Object
org.nuxeo.ecm.platform.mimetype.MimetypeEntryImpl
All Implemented Interfaces:
Serializable, MimetypeEntry

public class MimetypeEntryImpl extends Object implements MimetypeEntry
MimetypeEntry.

A mimetype instance holds mimetype meta information.

Author:
Julien Anguenot
See Also:
  • Field Details

    • extensions

      protected final List<String> extensions
    • iconPath

      protected final String iconPath
    • binary

      protected final boolean binary
    • onlineEditable

      protected final boolean onlineEditable
    • oleSupported

      protected final boolean oleSupported
    • mimetypes

      protected final List<String> mimetypes
    • normalized

      protected final String normalized
  • Constructor Details

    • MimetypeEntryImpl

      public MimetypeEntryImpl(String normalized, List<String> mimetypes, List<String> extensions, String iconPath, boolean binary, boolean onlineEditable, boolean oleSupported)
  • Method Details

    • getExtensions

      public List<String> getExtensions()
      Description copied from interface: MimetypeEntry
      Returns the list of extensions for this mimetype.
      Specified by:
      getExtensions in interface MimetypeEntry
      Returns:
      list of strings that contain different mimetypes
    • getIconPath

      public String getIconPath()
      Description copied from interface: MimetypeEntry
      Returns the path of the icon for this mimetype.
      Specified by:
      getIconPath in interface MimetypeEntry
      Returns:
      String
    • getMimetypes

      public List<String> getMimetypes()
      Description copied from interface: MimetypeEntry
      Returns the mimetype's names.
      Specified by:
      getMimetypes in interface MimetypeEntry
      Returns:
      list of strings containing the mimetype names
    • getMajor

      public String getMajor()
      Description copied from interface: MimetypeEntry
      Returns the major part of the RFC-2046.
      Specified by:
      getMajor in interface MimetypeEntry
      Returns:
      the major part of the RFC-2046 name of this mime type.
      See Also:
    • getMinor

      public String getMinor()
      Description copied from interface: MimetypeEntry
      Returns the minor part of the RFC-2046.
      Specified by:
      getMinor in interface MimetypeEntry
      Returns:
      string
      See Also:
    • getNormalized

      public String getNormalized()
      Description copied from interface: MimetypeEntry
      Returns the main RFC-2046 name for this mime type.

      If this mime type has several names ('text/restructured', 'text-x-rst'), then this method will always return the first form.

      Specified by:
      getNormalized in interface MimetypeEntry
      Returns:
      the main RFC-2046 name for this mime type
    • isBinary

      public boolean isBinary()
      Description copied from interface: MimetypeEntry
      Is this a binary mimetype?

      Might be useful to know if we can read it as human.

      Specified by:
      isBinary in interface MimetypeEntry
      Returns:
      boolean
    • isOnlineEditable

      public boolean isOnlineEditable()
      Description copied from interface: MimetypeEntry
      Is this mimetype supported by a LiveEdit plugin?

      Might be useful to know to display the Edit online link.

      Specified by:
      isOnlineEditable in interface MimetypeEntry
      Returns:
      boolean
    • isOleSupported

      public boolean isOleSupported()
      Description copied from interface: MimetypeEntry
      Is this mimetype supported by a oleExtract plugin?

      If the property is true, processes the ole Extraction, otherwise skip.

      Specified by:
      isOleSupported in interface MimetypeEntry
      Returns:
      boolean