|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.mimetype.ejb.MimetypeRegistryBean
public class MimetypeRegistryBean
MimetypeEntry registry bean.
EJB Facade on the mimetype registry service.
Field Summary |
---|
Fields inherited from interface org.nuxeo.ecm.platform.mimetype.interfaces.MimetypeRegistry |
---|
DEFAULT_MIMETYPE |
Constructor Summary | |
---|---|
MimetypeRegistryBean()
|
Method Summary | |
---|---|
java.util.List<java.lang.String> |
getExtensionsFromMimetypeName(java.lang.String mimetypeName)
Returns the extension for given mimetype. |
MimetypeEntry |
getMimetypeEntryByMimeType(java.lang.String mimetype)
Gets a mimetype entry given the normalized mimetype. |
MimetypeEntry |
getMimetypeEntryByName(java.lang.String name)
Deprecated. |
java.lang.String |
getMimetypeFromBlob(Blob blob)
Returns the mime type from a given stream. |
java.lang.String |
getMimetypeFromBlobWithDefault(Blob blob,
java.lang.String defaultMimetype)
Returns the mime type from a given blob or provided default if not possible. |
java.lang.String |
getMimetypeFromFile(java.io.File file)
Returns the mime type given a file. |
java.lang.String |
getMimetypeFromFilenameAndBlobWithDefault(java.lang.String filename,
Blob blob,
java.lang.String defaultMimetype)
Finds the mimetype of some content according to its filename and / or binary content. |
java.lang.String |
getMimetypeFromStream(java.io.InputStream stream)
Deprecated. |
java.lang.String |
getMimetypeFromStreamWithDefault(java.io.InputStream is,
java.lang.String defaultMimetype)
Deprecated. |
void |
registerFileExtension(ExtensionDescriptor extension)
|
void |
registerMimetype(MimetypeEntry mimetype)
|
void |
unregisterFileExtension(ExtensionDescriptor extension)
|
void |
unregisterMimetype(java.lang.String mimetype)
|
Blob |
updateMimetype(Blob blob)
Update the mimetype field of a Blob based on the embedded filename with fallback to binary sniffing. |
Blob |
updateMimetype(Blob blob,
java.lang.String filename)
Update the mimetype field of a Blob based on the provided filename with fallback to binary sniffing. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MimetypeRegistryBean()
Method Detail |
---|
public java.util.List<java.lang.String> getExtensionsFromMimetypeName(java.lang.String mimetypeName)
MimetypeRegistry
getExtensionsFromMimetypeName
in interface MimetypeRegistry
mimetypeName
- the mimetype name.
public java.lang.String getMimetypeFromFile(java.io.File file) throws MimetypeNotFoundException, MimetypeDetectionException
MimetypeRegistry
getMimetypeFromFile
in interface MimetypeRegistry
MimetypeNotFoundException
- if mimetype sniffing failed
MimetypeDetectionException
- if unexpected problem prevent the
detection to work as expected@Deprecated public java.lang.String getMimetypeFromStream(java.io.InputStream stream) throws MimetypeNotFoundException, MimetypeDetectionException
MimetypeRegistry
getMimetypeFromStream
in interface MimetypeRegistry
MimetypeNotFoundException
- if mimetype sniffing failed to identify
a registered mime type
MimetypeDetectionException
- if unexpected problem prevent the
detection to work as expected@Deprecated public java.lang.String getMimetypeFromStreamWithDefault(java.io.InputStream is, java.lang.String defaultMimetype) throws MimetypeDetectionException
MimetypeRegistry
getMimetypeFromStreamWithDefault
in interface MimetypeRegistry
MimetypeDetectionException
public java.lang.String getMimetypeFromBlob(Blob blob) throws MimetypeNotFoundException, MimetypeDetectionException
MimetypeRegistry
getMimetypeFromBlob
in interface MimetypeRegistry
MimetypeNotFoundException
- if mimetype sniffing failed to identify
a registered mime type
MimetypeDetectionException
- if unexpected problem prevent the
detection to work as expectedpublic java.lang.String getMimetypeFromBlobWithDefault(Blob blob, java.lang.String defaultMimetype) throws MimetypeDetectionException
MimetypeRegistry
getMimetypeFromBlobWithDefault
in interface MimetypeRegistry
MimetypeDetectionException
public java.lang.String getMimetypeFromFilenameAndBlobWithDefault(java.lang.String filename, Blob blob, java.lang.String defaultMimetype) throws MimetypeDetectionException
MimetypeRegistry
getMimetypeFromFilenameAndBlobWithDefault
in interface MimetypeRegistry
filename
- extension to analyzeblob
- content to be analyzed if filename is ambiguousdefaultMimetype
- defaultMimeType to be used if no found
MimetypeDetectionException
@Deprecated public MimetypeEntry getMimetypeEntryByName(java.lang.String name)
MimetypeRegistry
getMimetypeEntryByName
in interface MimetypeRegistry
name
- the mimetype name.
public MimetypeEntry getMimetypeEntryByMimeType(java.lang.String mimetype)
MimetypeRegistry
getMimetypeEntryByMimeType
in interface MimetypeRegistry
mimetype
- the normalized mimetype
public void registerMimetype(MimetypeEntry mimetype)
registerMimetype
in interface MimetypeRegistryLocal
public void unregisterMimetype(java.lang.String mimetype)
unregisterMimetype
in interface MimetypeRegistryLocal
public void registerFileExtension(ExtensionDescriptor extension)
registerFileExtension
in interface MimetypeRegistryLocal
public void unregisterFileExtension(ExtensionDescriptor extension)
unregisterFileExtension
in interface MimetypeRegistryLocal
public Blob updateMimetype(Blob blob, java.lang.String filename) throws MimetypeDetectionException
MimetypeRegistry
updateMimetype
in interface MimetypeRegistry
blob
- content to be analyzed if filename is ambiguousfilename
- with extension to analyze
MimetypeDetectionException
public Blob updateMimetype(Blob blob) throws MimetypeDetectionException
MimetypeRegistry
updateMimetype
in interface MimetypeRegistry
blob
- content to be analyzed if filename is ambiguous
MimetypeDetectionException
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |