org.xwiki.diff
Interface DiffManager


@Role
public interface DiffManager

Various diff/merge tools.

Version:
$Id: e68e1fd6ffbb17fea84b17b1f9e88a0ff44729ff $

Method Summary
<E> DiffResult<E>
diff(List<E> previous, List<E> next, DiffConfiguration<E> configuration)
          Produce a diff between the two provided versions.
<E> MergeResult<E>
merge(List<E> commonAncestor, List<E> next, List<E> current, MergeConfiguration<E> configuration)
          Execute a 3-way merge on provided versions.
 

Method Detail

diff

<E> DiffResult<E> diff(List<E> previous,
                       List<E> next,
                       DiffConfiguration<E> configuration)
                   throws DiffException
Produce a diff between the two provided versions.

Type Parameters:
E - the type of compared elements
Parameters:
previous - the previous version of the content to compare
next - the next version of the content to compare
configuration - the configuration of the diff behavior
Returns:
the result of the diff
Throws:
DiffException - error when executing the diff

merge

<E> MergeResult<E> merge(List<E> commonAncestor,
                         List<E> next,
                         List<E> current,
                         MergeConfiguration<E> configuration)
                     throws MergeException
Execute a 3-way merge on provided versions.

Type Parameters:
E - the type of compared elements
Parameters:
commonAncestor - the common ancestor of the two versions of the content to compare
next - the next version of the content to compare
current - the current version of the content to compare
configuration - the configuration of the merge behavior
Returns:
the result of the merge
Throws:
MergeException - error when executing the merge


Copyright © 2004–2014 XWiki. All rights reserved.