summaryrefslogtreecommitdiffstats
path: root/infra/translate-impl/src/test/java/io/fd/honeycomb/translate/impl/write/registry/FlatWriterRegistryTest.java
AgeCommit message (Collapse)AuthorFilesLines
2019-04-08HONEYCOMB-443: ODL bump to NeonMichal Cmarada1-1/+1
- bumps ODL dependencies to neon - migrates guava optional to java.utils.optional Change-Id: Ibdaa365c7e21a341103aba88dfd67277e40d2969 Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2018-08-17HONEYCOMB-431: add validation support to WritersMarek Gradzki1-0/+65
This patch introduces FlatWriterRegistry.validateModifications. Implementation iterates over writersOrder following bulkUpdate logic to properly support subtree writers case. Writers are now cabable of validating modifications. Commonly used implementations (GenericWriter and GenericListWriter) delegate validation capbility to Validators. Change-Id: If7a0bb0838c0b8f2c0393c989f3b03853a2ea679 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-04-25Collect all the updates for subtree writersMaros Marsalek1-0/+58
So far, when a subtree writer was registered on a list node and ModificationDiff detected 2 or more updated list items for that writer, FlatWriterRegistry just picked the first item in list, processed that one and ignored the rest. Change-Id: If66db1eaad5a3b5c35e5586f46fd83a0698e1728 Signed-off-by: Maros Marsalek <maros.mars@gmail.com>
2017-11-22Cleanup various Sonar waringsMarek Gradzki1-3/+0
Unused code, imports, etc. Change-Id: Icb19d6a877d5ddbfd85caa86c4e62880e4db3c44 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-11-03HONEYCOMB-359 - Wildcarded writersJan Srnicek1-6/+66
Adds option to specify subtree writer that can handle whole subtree of nodes without having whole subtree specified. Its checking if node is children at runtime, rather than having pre-computed tree Change-Id: Ic46f2bd6de84f0dd14865825399f5a90a1f80859 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2017-10-23HONEYCOMB-405 - Revert fix for indirect updatesJan Srnicek1-69/+38
If indirect update(delete+create) fails in a way, that delete passed, but update part failed, delete part must be reverted Moves reverter creation to MDTG and test cases related too it to ModifiableDataTreeDelegatorRevertTest Fixes tracking of allready processed changes by tracking them from perspective of processModifications() method Introduces UpdateFailedException as replacement for BulkUpdateException(now thrown also for single updates) Separates ReverterImpl from FlatWriterRegistry and ads unit tests Change-Id: If0066d0716d9476be89b1d99985b6745becac15e Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2017-08-16HONEYCOMB-386 - Make update optionalJan Srnicek1-30/+30
If customizer does not support update directly, updates for its handled nodes are broken up to delete + create pairs. Change-Id: I2929109e8c9a1db0bef108367cf7d839135ce173 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2016-11-23HONEYCOMB-170 Add more information to RevertFailedExMaros Marsalek1-58/+62
Change-Id: I6b24a1d061c94d57730b20cde4c5b3c39444b119 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-11-08HONEYCOMB-270 Add isPresent() to Readers/CustomizersMaros Marsalek1-0/+328
So that they can influence whether empty data is to be considered as present + Move registries implementations from util to impl + Introduce DelegatingReader trait + Extend GenericReader where possible to reduce duplication Change-Id: I5a416acd0c4eab1fbc30fcbe585719991dbe9215 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>