Plan
Plan copied to clipboard
Rewrite Import system
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.
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); })