public class DefaultDifferenceManager extends java.lang.Object implements DifferenceManager
PROP_DIFF_PROVIDER| Constructor and Description |
|---|
DefaultDifferenceManager(Engine engine,
java.util.Properties props)
Creates a new DifferenceManager for the given engine.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDiff(Context context,
int version1,
int version2)
Returns a diff of two versions of a page.
|
java.lang.String |
makeDiff(Context context,
java.lang.String firstWikiText,
java.lang.String secondWikiText)
Returns valid XHTML string to be used in any way you please.
|
public DefaultDifferenceManager(Engine engine, java.util.Properties props)
engine - The Engine.props - A set of properties.public java.lang.String makeDiff(Context context, java.lang.String firstWikiText, java.lang.String secondWikiText)
makeDiff in interface DifferenceManagercontext - The Wiki ContextfirstWikiText - The old textsecondWikiText - the new textpublic java.lang.String getDiff(Context context, int version1, int version2)
Note that the API was changed in 2.6 to provide a WikiContext object!
getDiff in interface DifferenceManagercontext - The WikiContext of the page you wish to get a diff fromversion1 - Version number of the old page. If WikiPageProvider.LATEST_VERSION (-1), then uses current page.version2 - Version number of the new page. If WikiPageProvider.LATEST_VERSION (-1), then uses current page.Copyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.