Liferay 7.0-ga1 portal-impl

com.liferay.portal.diff
Class DiffHtmlImpl

java.lang.Object
  extended by com.liferay.portal.diff.DiffHtmlImpl
All Implemented Interfaces:
com.liferay.portal.kernel.diff.DiffHtml

public class DiffHtmlImpl
extends Object
implements com.liferay.portal.kernel.diff.DiffHtml

This class can compare two different versions of HTML code. It detects changes to an entire HTML page such as removal or addition of characters or images.


Constructor Summary
DiffHtmlImpl()
           
 
Method Summary
 String diff(Reader source, Reader target)
          This is a diff method with default values.
 String replaceStyles(String html)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffHtmlImpl

public DiffHtmlImpl()
Method Detail

diff

public String diff(Reader source,
                   Reader target)
            throws Exception
This is a diff method with default values.

Specified by:
diff in interface com.liferay.portal.kernel.diff.DiffHtml
Parameters:
source - the source text
target - the modified version of the source text
Returns:
a string containing the HTML code of the source text showing the differences with the target text
Throws:
Exception - if an exception occurred

replaceStyles

public String replaceStyles(String html)
Specified by:
replaceStyles in interface com.liferay.portal.kernel.diff.DiffHtml

Liferay 7.0-ga1 portal-impl