Class ConverterBasedHtmlPreviewAdapter
- java.lang.Object
-
- org.nuxeo.ecm.platform.preview.adapter.base.AbstractHtmlPreviewAdapter
-
- org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter
-
- All Implemented Interfaces:
HtmlPreviewAdapter
public class ConverterBasedHtmlPreviewAdapter extends AbstractHtmlPreviewAdapter
Base class for preview based on "on the fly" HTML transformers- Author:
- tiry
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringALLOW_ZIP_PREVIEWprotected StringdefaultFieldXPathprotected MimetypeRegistrymimeTypeServiceDeprecated.since 11.1.-
Fields inherited from class org.nuxeo.ecm.platform.preview.adapter.base.AbstractHtmlPreviewAdapter
adaptedDoc
-
-
Constructor Summary
Constructors Constructor Description ConverterBasedHtmlPreviewAdapter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancachable()voidcleanup()ConversionServicegetConversionService()protected StringgetDefaultPreviewFieldXPath()StringgetMimeType(File file)protected StringgetMimeType(String xpath)protected static StringgetMimeType(Blob blob)MimetypeRegistrygetMimeTypeService()Deprecated.since 11.1.List<Blob>getPreviewBlobs()List<Blob>getPreviewBlobs(String xpath)booleanhasBlobToPreview()Check if the document holds some blobs that are suitable for previewbooleanhasPreview(String xpath)voidsetDefaultPreviewFieldXPath(String xPath)protected voidsetDigest(BlobHolder result)protected voidsetMimeType(BlobHolder result)-
Methods inherited from class org.nuxeo.ecm.platform.preview.adapter.base.AbstractHtmlPreviewAdapter
getFilePreviewBlobs, getFilePreviewBlobs, getFilePreviewBlobs, getFilePreviewBlobs, getFilePreviewURL, getFilePreviewURL, getPreviewManager, getPreviewTitle, postProcessBlobs, setAdaptedDocument, updateTitleInHtml, updateTitleInHtml
-
-
-
-
Field Detail
-
defaultFieldXPath
protected String defaultFieldXPath
-
mimeTypeService
@Deprecated protected MimetypeRegistry mimeTypeService
Deprecated.since 11.1. UseFramework.getService(Class)withMimetypeRegistryinstead.
-
ALLOW_ZIP_PREVIEW
protected static final String ALLOW_ZIP_PREVIEW
- Since:
- 8.10
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConverterBasedHtmlPreviewAdapter
public ConverterBasedHtmlPreviewAdapter()
-
-
Method Detail
-
getConversionService
public ConversionService getConversionService()
-
getMimeType
protected static String getMimeType(Blob blob)
-
getMimeType
protected String getMimeType(String xpath)
-
getDefaultPreviewFieldXPath
protected String getDefaultPreviewFieldXPath()
-
setDefaultPreviewFieldXPath
public void setDefaultPreviewFieldXPath(String xPath)
-
getPreviewBlobs
public List<Blob> getPreviewBlobs() throws PreviewException
- Specified by:
getPreviewBlobsin classAbstractHtmlPreviewAdapter- Throws:
PreviewException
-
hasPreview
public boolean hasPreview(String xpath)
-
getPreviewBlobs
public List<Blob> getPreviewBlobs(String xpath) throws PreviewException
- Specified by:
getPreviewBlobsin classAbstractHtmlPreviewAdapter- Throws:
PreviewException
-
setMimeType
protected void setMimeType(BlobHolder result)
-
setDigest
protected void setDigest(BlobHolder result)
-
getMimeType
public String getMimeType(File file) throws ConversionException
- Throws:
ConversionException
-
getMimeTypeService
@Deprecated public MimetypeRegistry getMimeTypeService() throws ConversionException
Deprecated.since 11.1. UseFramework.getService(Class)withMimetypeRegistryinstead.- Throws:
ConversionException
-
cleanup
public void cleanup()
-
cachable
public boolean cachable()
-
hasBlobToPreview
public boolean hasBlobToPreview() throws PreviewException
Description copied from interface:HtmlPreviewAdapterCheck if the document holds some blobs that are suitable for preview- Throws:
PreviewException
-
-