Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin API refactoring #200

Merged
merged 4 commits into from
Jul 10, 2021
Merged

Plugin API refactoring #200

merged 4 commits into from
Jul 10, 2021

Conversation

clausnagel
Copy link
Member

@clausnagel clausnagel commented Jul 9, 2021

This PR refactors some parts of the Plugin API:

  • The shutdown method has been removed from the Plugin class and moved to the GuiExtension interface (and renamed to shutdownGui). This is to solve shut down plugins in CLI mode? #198
  • Two callback methods have been added to the FeatureExportExtension interface: beforeExport and afterExport. They are invoked before an export from the database starts and after the entire export operation has completed. So, they are not invoked for every indivdual feature but only for the entire export operation. A plugin can use these callbacks to make some preparations before an export and to clean up after the export. The afterExport method also reports whether the entire export operation completed successfully or was aborted. This is to solve Extend FeatureExportExtension interface #197
  • Similar beforeImport and afterImport methods have been added to the FeatureImportExtension interface.
  • The main method process in both FeatureExportExtension and FeatureImportExtension had the same signature. Thus, when implementing both interfaces with the same plugin, there was only one method for both operations. This has been resolved by renaming the methods for each interface.

@clausnagel clausnagel requested a review from yaozhihang July 9, 2021 14:13
Copy link
Member

@yaozhihang yaozhihang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clausnagel Thanks for extending and refactoying the Plugin API. All good except a small typo (see my comment)

@clausnagel clausnagel merged commit d6b6801 into master Jul 10, 2021
@clausnagel clausnagel deleted the feature-plugin-api-refactoring branch July 10, 2021 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants