Package com.atlassian.confluence.diff
Class DaisyHtmlDiffer
- java.lang.Object
-
- com.atlassian.confluence.diff.DaisyHtmlDiffer
-
-
Constructor Summary
Constructors Constructor Description DaisyHtmlDiffer(Transformer transformer, List<DiffPostProcessor> postProcessors, com.atlassian.vcache.VCacheFactory cacheFactory, LocaleManager localeManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdiff(ContentEntityObject leftContent, ContentEntityObject rightContent)Computes a diff between the specified left and right input.Stringdiff(String leftHtml, String rightHtml, org.eclipse.core.runtime.IProgressMonitor progressMonitor)Diff two pieces of XHTML content.Stringdiff(String leftHtml, String rightHtml, org.eclipse.core.runtime.IProgressMonitor progressMonitor, boolean useOldAlgorithm)Diff two pieces of XHTML content.
-
-
-
Constructor Detail
-
DaisyHtmlDiffer
public DaisyHtmlDiffer(Transformer transformer, List<DiffPostProcessor> postProcessors, com.atlassian.vcache.VCacheFactory cacheFactory, LocaleManager localeManager)
-
-
Method Detail
-
diff
public String diff(ContentEntityObject leftContent, ContentEntityObject rightContent)
Description copied from interface:DifferComputes a diff between the specified left and right input.
The html output will contain span tags with class="diff-html-added|diff-html-removed|diff-html-changed" to indicate differences.
-
diff
public String diff(String leftHtml, String rightHtml, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Diff two pieces of XHTML content.- Parameters:
leftHtml- the left HTML contentrightHtml- the right HTML contentprogressMonitor- progress monitor to monitor timeout, etc- Returns:
- String output of the diff result
-
diff
public String diff(String leftHtml, String rightHtml, org.eclipse.core.runtime.IProgressMonitor progressMonitor, boolean useOldAlgorithm)
Diff two pieces of XHTML content.- Parameters:
leftHtml- the left HTML contentrightHtml- the right HTML contentprogressMonitor- progress monitor to monitor timeout, etcuseOldAlgorithm- if true, diff will use the old non-greedy algorithm, which can result in OOM issues for large diffs- Returns:
- String output of the diff result
-
-