public class DocumentDiffServiceImpl extends Object implements DocumentDiffService
The diff is made by exporting the documents to XML, then using the Diff feature provided by XMLUnit to get the differences between the XML exports.
Constructor and Description |
---|
DocumentDiffServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
configureDiff(org.custommonkey.xmlunit.Diff diff)
Configures the diff.
|
void |
configureXMLUnit()
Configures XMLUnit.
|
DocumentDiff |
diff(CoreSession session,
DocumentModel leftDoc,
DocumentModel rightDoc)
Makes a diff between leftDoc and rightDoc.
|
DocumentDiff |
diff(String leftXML,
String rightXML)
Makes a diff between leftXML and rightXML.
|
public DocumentDiff diff(CoreSession session, DocumentModel leftDoc, DocumentModel rightDoc) throws ClientException
diff
in interface DocumentDiffService
session
- the sessionleftDoc
- the left docrightDoc
- the right docClientException
- the client exceptionpublic DocumentDiff diff(String leftXML, String rightXML) throws ClientException
diff
in interface DocumentDiffService
leftXML
- the left XMLrightXML
- the right XMLClientException
- the client exceptionpublic void configureXMLUnit()
configureXMLUnit
in interface DocumentDiffService
public void configureDiff(org.custommonkey.xmlunit.Diff diff)
configureDiff
in interface DocumentDiffService
diff
- the diffCopyright © 2015 Nuxeo SA. All rights reserved.