public class ConverterBasedContentDiffAdapter extends AbstractContentDiffAdapter
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_CONVERTER_NAME |
protected String |
defaultFieldXPath |
protected MimetypeRegistry |
mimeTypeService |
adaptedDoc
Constructor and Description |
---|
ConverterBasedContentDiffAdapter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addSecondaryBlobs(List<Blob> blobResults,
BlobHolder blobHolder,
String mainBlobFilename) |
boolean |
cachable() |
void |
cleanup() |
List<Blob> |
getContentDiffBlobs(DocumentModel otherDoc,
ContentDiffConversionType conversionType,
Locale locale) |
List<Blob> |
getContentDiffBlobs(DocumentModel otherDoc,
String xpath,
ContentDiffConversionType conversionType,
Locale locale) |
protected ConversionService |
getConversionService()
Gets the conversion service.
|
protected BlobHolder |
getConvertedBlobHolder(BlobHolder blobHolder,
String converterName)
Returns a blob holder converted using the specified converter name.
|
protected String |
getDefaultContentDiffFieldXPath() |
protected Blob |
getHtmlStringBlob(Blob blob) |
protected String |
getMimeType(Blob blob) |
void |
setDefaultContentDiffFieldXPath(String xPath) |
protected void |
setMimeType(BlobHolder result) |
getContentDiffAdapterManager, getFileContentDiffBlobs, getFileContentDiffBlobs, getFileContentDiffURL, getFileContentDiffURL, setAdaptedDocument
protected static final String DEFAULT_CONVERTER_NAME
protected String defaultFieldXPath
protected MimetypeRegistry mimeTypeService
public ConverterBasedContentDiffAdapter()
public List<Blob> getContentDiffBlobs(DocumentModel otherDoc, ContentDiffConversionType conversionType, Locale locale) throws ContentDiffException, ConversionException
getContentDiffBlobs
in class AbstractContentDiffAdapter
ContentDiffException
ConversionException
public List<Blob> getContentDiffBlobs(DocumentModel otherDoc, String xpath, ContentDiffConversionType conversionType, Locale locale) throws ContentDiffException, ConversionException
getContentDiffBlobs
in class AbstractContentDiffAdapter
ContentDiffException
ConversionException
public void cleanup()
public boolean cachable()
public void setDefaultContentDiffFieldXPath(String xPath)
protected String getMimeType(Blob blob)
protected void setMimeType(BlobHolder result)
protected String getDefaultContentDiffFieldXPath()
protected BlobHolder getConvertedBlobHolder(BlobHolder blobHolder, String converterName) throws ConversionException
blobHolder
- the blob holderconverterName
- the converter nameConversionException
- if an error occurs while converting the blob holderprotected Blob getHtmlStringBlob(Blob blob) throws ContentDiffException
ContentDiffException
protected void addSecondaryBlobs(List<Blob> blobResults, BlobHolder blobHolder, String mainBlobFilename)
protected final ConversionService getConversionService()
Copyright © 2015 Nuxeo SA. All rights reserved.