public final class ContentDiffHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_DIFF_FANCYBOX_VIEW |
static String |
CONTENT_DIFF_URL_PREFIX |
static String |
CONVERSION_TYPE_URL_PARAM_NAME |
static String |
DEFAULT_XPATH |
static String |
LABEL_URL_PARAM_NAME |
static String |
LOCALE_URL_PARAM_NAME |
static String |
XPATH_URL_PARAM_NAME |
Modifier and Type | Method and Description |
---|---|
static BlobHolder |
getBlobHolder(DocumentModel doc,
String xPath) |
static String |
getContentDiffFancyBoxURL(DocumentModel currentDoc,
String propertyLabel,
String propertyXPath,
String conversionType)
Gets the content diff fancy box URL.
|
static String |
getContentDiffURL(DocumentModel leftDoc,
DocumentModel rightDoc,
String conversionType,
String locale)
Gets the content diff URL.
|
static String |
getContentDiffURL(DocumentModel leftDoc,
DocumentModel rightDoc,
String propertyXPath,
String conversionType,
String locale)
Gets the content diff URL.
|
static String |
getContentDiffURL(String repositoryName,
DocumentModel leftDoc,
DocumentModel rightDoc,
String propertyXPath,
String conversionType,
String locale)
Gets the content diff URL.
|
protected static List<String> |
getHtmlConversionBlackListedMimeTypes()
Gets the list of blacklisted mime types for HTML conversion.
|
static boolean |
isContentProperty(Serializable property)
Checks if the specified property is a content property, ie.
|
static boolean |
isDisplayHtmlConversion(Serializable property)
Checks if the HTML conversion content diff is relevant for the specified property.
|
static boolean |
isDisplayTextConversion(Serializable property)
Checks if the text conversion content diff is relevant for the specified property.
|
public static final String CONTENT_DIFF_FANCYBOX_VIEW
public static final String LABEL_URL_PARAM_NAME
public static final String XPATH_URL_PARAM_NAME
public static final String CONVERSION_TYPE_URL_PARAM_NAME
public static final String LOCALE_URL_PARAM_NAME
public static final String CONTENT_DIFF_URL_PREFIX
public static final String DEFAULT_XPATH
public static String getContentDiffFancyBoxURL(DocumentModel currentDoc, String propertyLabel, String propertyXPath, String conversionType)
currentDoc
- the current docpropertyLabel
- the property labelpropertyXPath
- the property xpathconversionType
- the conversion typepublic static String getContentDiffURL(DocumentModel leftDoc, DocumentModel rightDoc, String conversionType, String locale)
leftDoc
- the left docrightDoc
- the right docconversionType
- the conversion typelocale
- the localepublic static String getContentDiffURL(DocumentModel leftDoc, DocumentModel rightDoc, String propertyXPath, String conversionType, String locale)
leftDoc
- the left docrightDoc
- the right docpropertyXPath
- the property xpathconversionType
- the conversion typelocale
- the localepublic static String getContentDiffURL(String repositoryName, DocumentModel leftDoc, DocumentModel rightDoc, String propertyXPath, String conversionType, String locale)
repositoryName
- the repository nameleftDoc
- the left docrightDoc
- the right docpropertyXPath
- the xpathconversionType
- the conversion typelocale
- the localepublic static boolean isDisplayHtmlConversion(Serializable property)
public static boolean isDisplayTextConversion(Serializable property)
public static boolean isContentProperty(Serializable property)
instanceof Blob
.protected static List<String> getHtmlConversionBlackListedMimeTypes()
For now:
https://jira.nuxeo.com/browse/NXP-9421
,
https://jira.nuxeo.com/browse/NXP-9431
public static BlobHolder getBlobHolder(DocumentModel doc, String xPath) throws ContentDiffException
ContentDiffException
Copyright © 2015 Nuxeo SA. All rights reserved.