Package org.apache.wiki.diff

## Class ExternalDiffProvider

- java.lang.Object
- - org.apache.wiki.diff.ExternalDiffProvider

All Implemented Interfaces:
  `WikiProvider`, `DiffProvider`

    public class ExternalDiffProvider
    extends java.lang.Object
    implements DiffProvider

This DiffProvider allows external command line tools to be used to generate the diff.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.wiki.diff.DiffProvider

`DiffProvider.NullDiffProvider`

### Field Summary

Fields
`static java.lang.String` `PROP_DIFFCOMMAND` Determines the command to be used for 'diff'.

### Fields inherited from interface org.apache.wiki.api.providers.WikiProvider

`LATEST_VERSION`

### Constructor Summary

Constructors
`ExternalDiffProvider()` Creates a new ExternalDiffProvider.

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getProviderInfo()`
`void` `initialize​(Engine engine, java.util.Properties properties)`
`java.lang.String` `makeDiffHtml​(Context ctx, java.lang.String p1, java.lang.String p2)` Makes the diff by calling "diff" program.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### PROP_DIFFCOMMAND

    public static final java.lang.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

### Constructor Detail

#### ExternalDiffProvider

    public ExternalDiffProvider()

Creates a new ExternalDiffProvider.

### Method Detail

#### getProviderInfo

    public java.lang.String getProviderInfo()

Specified by:
  `getProviderInfo` in interface `WikiProvider`
See Also:
  `WikiProvider.getProviderInfo()`

#### initialize

    public void initialize​(Engine engine,
                           java.util.Properties properties)
                    throws NoRequiredPropertyException,
                           java.io.IOException

Specified by:
  `initialize` in interface `WikiProvider`
Throws:
  `NoRequiredPropertyException`
  `java.io.IOException`
See Also:
  `WikiProvider.initialize(org.apache.wiki.api.core.Engine, java.util.Properties)`

#### makeDiffHtml

    public java.lang.String makeDiffHtml​(Context ctx,
                                         java.lang.String p1,
                                         java.lang.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 Context
  `p1` - the old text
  `p2` - the new text
Returns:
  An XHTML diff.