org.apache.wiki.diff
Class ExternalDiffProvider
java.lang.Object
org.apache.wiki.diff.ExternalDiffProvider
- All Implemented Interfaces:
- DiffProvider, WikiProvider
public class ExternalDiffProvider
- extends Object
- implements DiffProvider
This DiffProvider allows external command line tools to be used to generate
the diff.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROP_DIFFCOMMAND
public static final String PROP_DIFFCOMMAND
- Determines the command to be used for 'diff'. This program must be able
to output diffs in the unified format. For example 'diff -u %s1 %s2'.
- See Also:
- Constant Field Values
ExternalDiffProvider
public ExternalDiffProvider()
- Creates a new ExternalDiffProvider.
getProviderInfo
public String getProviderInfo()
- Description copied from interface:
WikiProvider
- Return a valid HTML string for information. May
be anything.
- Specified by:
getProviderInfo
in interface WikiProvider
- Returns:
- A string describing the provider.
- See Also:
{@inheritDoc}
initialize
public void initialize(WikiEngine engine,
Properties properties)
throws NoRequiredPropertyException,
IOException
- Initializes the page provider.
- Specified by:
initialize
in interface WikiProvider
- Parameters:
engine
- WikiEngine to own this providerproperties
- A set of properties used to initialize this provider
- Throws:
NoRequiredPropertyException
- If the provider needs a property which is not found in the property set
IOException
- If there is an IO problem- See Also:
WikiProvider.initialize(org.apache.wiki.WikiEngine, java.util.Properties)
makeDiffHtml
public String makeDiffHtml(WikiContext ctx,
String p1,
String p2)
- Makes the diff by calling "diff" program.
The return string is to be XHTML compliant ready to display html. No further
processing of this text will be done by the wiki engine.
- Specified by:
makeDiffHtml
in interface DiffProvider
- Parameters:
ctx
- The Wiki Contextp1
- the old textp2
- the new text
- Returns:
- An XHTML diff.
Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.