Interface DiffService

  • All Known Subinterfaces:
    DiffService

    public interface DiffService
    Service used to create diff output of texts and resources.
    • Field Detail

      • REQUEST_PARAM_DIFF_TO

        static final 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 String REQUEST_PARAM_DIFF_TYPE
        request parameter that can be used to transport a diff type
        See Also:
        Constant Field Values
    • Method Detail

      • diff

        String diff​(String current,
                    String original,
                    boolean isRichText)
        Compares two texts (plain text or rich text) and generates a rich text containing div elements which mark added and removed content.
        Parameters:
        current - the current text (right)
        original - the original text (left)
        isRichText - if true the text is considered rich, i.e. might contain HTML tags.
        Returns:
        a rich text of the diff output