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 String
ALLOW_ZIP_PREVIEW
protected String
defaultFieldXPath
protected MimetypeRegistry
mimeTypeService
Deprecated.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 boolean
cachable()
void
cleanup()
ConversionService
getConversionService()
protected String
getDefaultPreviewFieldXPath()
String
getMimeType(File file)
protected String
getMimeType(String xpath)
protected static String
getMimeType(Blob blob)
MimetypeRegistry
getMimeTypeService()
Deprecated.since 11.1.List<Blob>
getPreviewBlobs()
List<Blob>
getPreviewBlobs(String xpath)
boolean
hasBlobToPreview()
Check if the document holds some blobs that are suitable for previewboolean
hasPreview(String xpath)
void
setDefaultPreviewFieldXPath(String xPath)
protected void
setDigest(BlobHolder result)
protected void
setMimeType(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)
withMimetypeRegistry
instead.
-
ALLOW_ZIP_PREVIEW
protected static final String ALLOW_ZIP_PREVIEW
- Since:
- 8.10
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConversionService
public ConversionService getConversionService()
-
getDefaultPreviewFieldXPath
protected String getDefaultPreviewFieldXPath()
-
setDefaultPreviewFieldXPath
public void setDefaultPreviewFieldXPath(String xPath)
-
getPreviewBlobs
public List<Blob> getPreviewBlobs() throws PreviewException
- Specified by:
getPreviewBlobs
in classAbstractHtmlPreviewAdapter
- Throws:
PreviewException
-
hasPreview
public boolean hasPreview(String xpath)
-
getPreviewBlobs
public List<Blob> getPreviewBlobs(String xpath) throws PreviewException
- Specified by:
getPreviewBlobs
in 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)
withMimetypeRegistry
instead.- Throws:
ConversionException
-
cleanup
public void cleanup()
-
cachable
public boolean cachable()
-
hasBlobToPreview
public boolean hasBlobToPreview() throws PreviewException
Description copied from interface:HtmlPreviewAdapter
Check if the document holds some blobs that are suitable for preview- Throws:
PreviewException
-
-