public class CmsTextDiff extends java.lang.Object implements I_CmsDiffProvider
This should work for both plaintext files as well as binary documents which from which OpenCms can extract text content.
| Constructor and Description |
|---|
CmsTextDiff() |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<com.vaadin.ui.Component> |
diff(CmsObject cms,
CmsHistoryResourceBean v1,
CmsHistoryResourceBean v2)
Optionally returns a comparison component to display for the given resource versions.
|
protected java.lang.String |
wrapLinesWithUnchangedStyle(java.lang.String diff)
Returns a diff text wrapped with formatting style.
|
public CmsTextDiff()
public com.google.common.base.Optional<com.vaadin.ui.Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) throws CmsException
I_CmsDiffProviderIf no value is returned, then no widget is displayed.
diff in interface I_CmsDiffProvidercms - the CMS contextv1 - bean representing the first versionv2 - bean representing the second versionCmsException - if something goes wrongI_CmsDiffProvider.diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)protected java.lang.String wrapLinesWithUnchangedStyle(java.lang.String diff) throws java.io.IOException
diff - the text to wrap with CSS formattingjava.io.IOException - if something goes wrong