Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.mimetype
Class MimetypeEntryImpl

java.lang.Object
  extended by 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:
MimetypeEntry, Serialized Form

Constructor Summary
MimetypeEntryImpl(String normalized, List<String> mimetypes, List<String> extensions, String iconPath, boolean binary, boolean onlineEditable, boolean oleSupported)
           
 
Method Summary
 List<String> getExtensions()
          Returns the list of extensions for this mimetype.
 String getIconPath()
          Returns the path of the icon for this mimetype.
 String getMajor()
          Returns the major part of the RFC-2046.
 List<String> getMimetypes()
          Returns the mimetype's names.
 String getMinor()
          Returns the minor part of the RFC-2046.
 String getNormalized()
          Returns the main RFC-2046 name for this mime type.
 boolean isBinary()
          Is this a binary mimetype?
 boolean isOleSupported()
          Is this mimetype supported by a oleExtract plugin?
 boolean isOnlineEditable()
          Is this mimetype supported by a LiveEdit plugin?
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimetypeEntryImpl

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

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:
MimetypeEntry.getNormalized()

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:
MimetypeEntry.getNormalized()

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

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.