Package com.day.cq.commons
Interface DiffService
-
- All Known Subinterfaces:
DiffService
public interface DiffService
Service used to create diff output of texts and resources.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REQUEST_PARAM_DIFF_TO
request parameter that specifies the version to diff tostatic java.lang.String
REQUEST_PARAM_DIFF_TYPE
request parameter that can be used to transport a diff type
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
diff(java.lang.String current, java.lang.String original, boolean isRichText)
Compares two texts (plain text or rich text) and generates a rich text containingdiv
elements which mark added and removed content.
-
-
-
Field Detail
-
REQUEST_PARAM_DIFF_TO
static final java.lang.String REQUEST_PARAM_DIFF_TO
request parameter that specifies the version to diff to- See Also:
- Constant Field Values
-
REQUEST_PARAM_DIFF_TYPE
static final java.lang.String REQUEST_PARAM_DIFF_TYPE
request parameter that can be used to transport a diff type- See Also:
- Constant Field Values
-
-
Method Detail
-
diff
java.lang.String diff(java.lang.String current, java.lang.String original, boolean isRichText)
Compares two texts (plain text or rich text) and generates a rich text containingdiv
elements which mark added and removed content.- Parameters:
current
- the current text (right)original
- the original text (left)isRichText
- iftrue
the text is considered rich, i.e. might contain HTML tags.- Returns:
- a rich text of the diff output
-
-