Class AbstractHtmlPreviewAdapter
- java.lang.Object
-
- org.nuxeo.ecm.platform.preview.adapter.base.AbstractHtmlPreviewAdapter
-
- All Implemented Interfaces:
HtmlPreviewAdapter
- Direct Known Subclasses:
ConverterBasedHtmlPreviewAdapter
,PreprocessedHtmlPreviewAdapter
public abstract class AbstractHtmlPreviewAdapter extends Object implements HtmlPreviewAdapter
Abstract base class for PreviewAdapters- Author:
- tiry
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentModel
adaptedDoc
-
Constructor Summary
Constructors Constructor Description AbstractHtmlPreviewAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<Blob>
getFilePreviewBlobs()
List<Blob>
getFilePreviewBlobs(boolean postProcess)
List<Blob>
getFilePreviewBlobs(String xpath)
List<Blob>
getFilePreviewBlobs(String xpath, boolean postProcess)
String
getFilePreviewURL()
String
getFilePreviewURL(String xpath)
protected abstract List<Blob>
getPreviewBlobs()
protected abstract List<Blob>
getPreviewBlobs(String xpath)
protected PreviewAdapterManager
getPreviewManager()
protected String
getPreviewTitle()
protected List<Blob>
postProcessBlobs(List<Blob> blobs)
void
setAdaptedDocument(DocumentModel doc)
protected void
updateTitleInHtml(File file)
protected String
updateTitleInHtml(String htmlContent)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.platform.preview.api.HtmlPreviewAdapter
cachable, cleanup, hasBlobToPreview, hasPreview
-
-
-
-
Field Detail
-
adaptedDoc
protected DocumentModel adaptedDoc
-
-
Method Detail
-
getPreviewManager
protected PreviewAdapterManager getPreviewManager()
-
setAdaptedDocument
public void setAdaptedDocument(DocumentModel doc)
- Specified by:
setAdaptedDocument
in interfaceHtmlPreviewAdapter
-
getFilePreviewURL
public String getFilePreviewURL()
- Specified by:
getFilePreviewURL
in interfaceHtmlPreviewAdapter
-
getFilePreviewURL
public String getFilePreviewURL(String xpath)
- Specified by:
getFilePreviewURL
in interfaceHtmlPreviewAdapter
-
updateTitleInHtml
protected void updateTitleInHtml(File file) throws IOException
- Throws:
IOException
-
getPreviewTitle
protected String getPreviewTitle()
-
getFilePreviewBlobs
public List<Blob> getFilePreviewBlobs() throws PreviewException
- Specified by:
getFilePreviewBlobs
in interfaceHtmlPreviewAdapter
- Throws:
PreviewException
-
getFilePreviewBlobs
public List<Blob> getFilePreviewBlobs(String xpath) throws PreviewException
- Specified by:
getFilePreviewBlobs
in interfaceHtmlPreviewAdapter
- Throws:
PreviewException
-
getFilePreviewBlobs
public List<Blob> getFilePreviewBlobs(boolean postProcess) throws PreviewException
- Specified by:
getFilePreviewBlobs
in interfaceHtmlPreviewAdapter
- Throws:
PreviewException
-
getPreviewBlobs
protected abstract List<Blob> getPreviewBlobs() throws PreviewException
- Throws:
PreviewException
-
getFilePreviewBlobs
public List<Blob> getFilePreviewBlobs(String xpath, boolean postProcess) throws PreviewException
- Specified by:
getFilePreviewBlobs
in interfaceHtmlPreviewAdapter
- Throws:
PreviewException
-
getPreviewBlobs
protected abstract List<Blob> getPreviewBlobs(String xpath) throws PreviewException
- Throws:
PreviewException
-
postProcessBlobs
protected List<Blob> postProcessBlobs(List<Blob> blobs) throws PreviewException
- Throws:
PreviewException
-
-