@Component @Named(value="diff.display") @Singleton public class DiffDisplayerScriptService extends Object implements ScriptService
Constructor and Description |
---|
DiffDisplayerScriptService() |
Modifier and Type | Method and Description |
---|---|
Exception |
getLastError()
Get the error generated while performing the previously called action.
|
<E,F> UnifiedDiffConfiguration<E,F> |
getUnifiedDiffConfiguration() |
<E> List<InlineDiffChunk<E>> |
inline(List<E> previous,
List<E> next)
Builds an in-line diff between two versions of a list of elements.
|
List<InlineDiffChunk<Character>> |
inline(String previous,
String next)
Builds an in-line diff between two versions of a text.
|
<E,F> List<UnifiedDiffBlock<E,F>> |
unified(List<E> previous,
List<E> next,
UnifiedDiffConfiguration<E,F> config)
Builds an unified diff between two versions of a list of elements.
|
List<UnifiedDiffBlock<String,Character>> |
unified(String previous,
String next)
Builds an unified diff between two versions of a text.
|
public <E> List<InlineDiffChunk<E>> inline(List<E> previous, List<E> next)
E
- the type of elements that are compared to produce the diffprevious
- the previous versionnext
- the next versionpublic List<InlineDiffChunk<Character>> inline(String previous, String next)
previous
- the previous versionnext
- the next versionpublic List<UnifiedDiffBlock<String,Character>> unified(String previous, String next)
previous
- the previous versionnext
- the next versionpublic <E,F> List<UnifiedDiffBlock<E,F>> unified(List<E> previous, List<E> next, UnifiedDiffConfiguration<E,F> config)
E
- the type of composite elements that are compared to produce the first level diffF
- the type of sub-elements that are compared to produce the second level diff when a composite elementprevious
- the previous versionnext
- the next versionconfig
- the configuration objectpublic <E,F> UnifiedDiffConfiguration<E,F> getUnifiedDiffConfiguration()
E
- the type of composite elements that are compared to produce the first level diffF
- the type of sub-elements that are compared to produce the second level diff when a composite element
is modifiedpublic Exception getLastError()
null
if no exception was thrownCopyright © 2004–2017 XWiki. All rights reserved.