[ https://jira.nuxeo.com/browse/NXP-8587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on NXP-8587 started by Antoine Taillefer. > Make the diff service configurable with extension points > -------------------------------------------------------- > > Key: NXP-8587 > URL: https://jira.nuxeo.com/browse/NXP-8587 > Project: Nuxeo Enterprise Platform > Issue Type: Sub-task > Reporter: Antoine Taillefer > Assignee: Antoine Taillefer > Original Estimate: 2 days > Remaining Estimate: 2 days > > The {{DocumentDiffService}} should expose extension points to > h5. Configure XMLUnit for the diff, what is currently hard-coded: > {code:java} > protected void configureXMLUnit() { > XMLUnit.setIgnoreWhitespace(true); > XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true); > } > {code} > h5. Configure the diff itself, what is currently hard-coded: > {code:java} > protected void configureDiff(Diff diff) { > diff.overrideDifferenceListener(new IgnoreStructuralDifferenceListener()); > > diff.overrideElementQualifier(new ElementNameAndAttributeQualifier()); > } > {code} > h5. Contribute a "second-level" differ for a given type of property. > The first-level diff detects the document properties that are different > between the 2 docs, for example {{dc:title}}. > For now it also holds the different values on both sides: left and right, for > example: {{{left = My first doc / right = My second doc}}}. > The second-level diff would use the type held by the first-level diff of a > property to call the specific differ for this type on the document's property. > This implies a refactoring of the {{PropertyDiff}} implementations. The > first-level diff no more needs to hold the different values, but the type of > diff and a reference to the property itself (xpath like). > For example a structure like {{{type = "complexList", xpath = > "mySchema:complexListField[1]/complexListItem[2]/stringItem[1]"}}}. > This way to access the second-level diff for a property, the system would > just have to call the appropriate differ contributed for the diff type. If no > differ is associated to the diff type, a fallback is done on the default one. > Example of a contribution of a complexList differ: > {code:xml} > <propertyDiffer type="complexList" class="ComplexListPropertyDiffer"/> > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ ECM-tickets mailing list ECM-tickets@lists.nuxeo.com http://lists.nuxeo.com/mailman/listinfo/ecm-tickets