[OPENDJ-6805] Replace LDIFWriter with SDK's LdifEntryWriter Created: 20/Nov/19 Updated: 30/Jan/20 Resolved: 30/Jan/20
|Component/s:||core apis, core server|
|Reporter:||Jean-Noël Rouvignac||Assignee:||Jean-Noël Rouvignac|
|Epic Link:||Supportable SDK|
|Comment by Jean-Noël Rouvignac [ 21/Nov/19 ]|
When replacing the fields from `LDIFWriter` by a single `LdifEntryWriter` field (baby-steps ) I faced a few problems:
How should we proceed with these?
|Comment by Matthew Swift [ 21/Nov/19 ]|
It looks like LDIFWriter.writeEntry() returns a boolean in order for client code to track how many entries were written vs skipped. We could provide similar functionality in the LdifEntryWriter by keeping an internal counter and exposing the result via a getter.
Regarding LDIFWriter.writeComment(LocalizableMessage comment, int wrapColumn), I agree with your analysis. I don't know why this method is needed. Client code should have set the export config wrap column.
Finally, I don't think the logging is critical. I'm actually a little surprised that we've implemented the LdifEntryWriter like this. I'd expect it to be implemented as a couple of EntryWriters, one for writing to an output stream, and a wrapper implementation performing filtering. Perhaps it was to keep symmetry with the LdifEntryReader.
|Comment by Jean-Noël Rouvignac [ 30/Jan/20 ]|
Done. There is no additional work to do for QA.