Plan icon indicating copy to clipboard operation
Plan copied to clipboard

Rewrite Import system

Open AuroraLS3 opened this issue 4 years ago • 1 comments

Describe the issue

Import system is broken.

Additional information

The import functionality dates back to 3.x.x and a lot has changed since then. The code has been changed during those changes to match changes in other parts of the code, but it has not been kept up to date.

Main issues with the importing code is that it attempts to do too many things at once, leading to massive data type classes that don't translate well into the internal data structures used in the plugin.

Optimal solution would be to use all of the gained knowledge in building data classes and functions to create something modular that can be expanded more easily.

AuroraLS3 avatar May 05 '21 13:05 AuroraLS3

TODO

This is a bit vague description since it needs understanding the current import system. It should be easier to add more importers after this is completed.

  • Write different import data types for kinds of data being imported
    • username and register date for an uuid
  • Pipe this data with DataService (Currently unused at the time of writing)
    • Write consumers for the new data types that store the imported data in database
    • (Optional) Write data type mappers if necessary to map the imported data types to types stored in the database
    • Add a dagger module for binding the consumers into a set. It might be necessary to add an extra interface using a visitor pattern to keep type information. (interface DataPipe { void register(DataService dataService); })

AuroraLS3 avatar Aug 03 '21 11:08 AuroraLS3