This class is deprecated.
since 4.0. Not used. Please use ConfluenceDiff
instead.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Constants
public
static
final
byte
DIFF_MODE_ADD
Constant Value:
0
(0x00000000)
public
static
final
byte
DIFF_MODE_CHANGE_ADD
Constant Value:
3
(0x00000003)
public
static
final
byte
DIFF_MODE_CHANGE_DELETE
Constant Value:
2
(0x00000002)
public
static
final
byte
DIFF_MODE_DELETE
Constant Value:
1
(0x00000001)
public
static
final
byte
DIFF_MODE_NONE
Constant Value:
-1
(0xffffffff)
public
static
final
String
STYLE_ADDED
Constant Value:
"diff-added-words"
public
static
final
String
STYLE_DELETED
Constant Value:
"diff-deleted-words"
public
static
final
String
STYLE_ERROR
Constant Value:
"differror"
public
static
final
String
STYLE_NONE
public
static
final
byte
WORD_DIFF_MAX
maximum percentage of words to diff in a line. If the percentage of diffed words exceed this number only
line diffing is displayed
Constant Value:
60
(0x0000003c)
Public Constructors
Public Methods
public
static
String
diffLine
(String orig, String rev)
Will perform a diff on two lines. This works similar to the deff above and if I had more time
I would like to refactor the methods and merge them.
//TODO Refactor the diff methods into one clean method
Parameters
orig
| the original line |
rev
| the revised line |
Returns
- a html diff of the two lines
Throws
DifferentiationFailedException
| |
Calculates the difference between two pages and returns the result as HTML.
The CSS styles used are:
- diff-added-lines - section has been added
- diff-deleted-lines - section has been removed
- diff-snipped - section has not been changed
- differror - (rare) used if there is an error
Parameters
originalPage
| The original page |
revisedPage
| The revised page |
Throws
DifferentiationFailedException
| |
public
static
byte
getDiffMode
()
public
static
String
mergeChanges
(String originalPage, String revisionA, String revisionB)
Returns
- null if the merge was unsuccessful
public
static
void
setDiffMode
(byte mode)