Commit graph

10 commits

Author SHA1 Message Date
Mark Vieira
0279c0a909
Add AGPLv3 as a supported license 2024-09-13 14:30:33 -07:00
Przemyslaw Gomulka
2cdaabe783
[Stable plugin api] Drop api suffix in package names (#92905)
Refactoring that drops the api suffix from package name
This will have to be followed up by a plugins/examples fix in imports
Also set an artifact group name to `org.elasticsearch.plugin` in the plugin-api and plugin-analysis-api
2023-01-14 09:49:37 +01:00
Przemyslaw Gomulka
e102edf014
Remove accidentaly added parameter to ListSetting (#92875)
I accidentally added a parameter to ListSetting #92334.
this commit removes it
2023-01-12 14:55:14 +01:00
Przemyslaw Gomulka
742c6f3f8b
Example stable plugins with settings (#92334)
New stable plugins example with injected settings.
Plugin developer creates an interface and annotates it with @AnalysisSettings.
The constructor in a plugin component (annotated with @NamedComponent) has to be annotated with @Inject
Upon plugin component creation an implementation of the interface will be created - a dynamic proxy - which will delegate methods from interface to properties in a Settings instance.
This PR introduces an example of using all currently supported types : int, long, double, string and list (of strings)
relates ##88980
2023-01-11 18:04:14 +01:00
Przemyslaw Gomulka
ed83f9cc86
Refactor plugin scanning into lib (#92437)
new stable plugins require generated named_components.json file which contains all analysis components implemented by this plugin. The generation is currently done in build-tools by elasticsearch.stable-esplugin
However this makes the generation only available for plugins using gradle. Plugin developers using maven or other building tooling will not be able to use it.

This commits refactors the scanning logic into libs:plugin-scanner which will allow for plugin install command to perform the scanning too.

relates #88980
2023-01-09 15:25:54 +01:00
Przemyslaw Gomulka
38f3b634c5
Settings api for stable plugins (#91467)
Stable plugins do not have a dependency on server, therefore cannot access Settings, NodeSettings or IndexSettings classes. Plugins implementing new stable plugin api will use set of annotations to mark an interface that works a as a facade for settings used by their plugin.
This will allow to validate the values provided against the restrictions defined in the plugin's settings interface

This commit introduces set of annotations in libs/plugin-api that allow to annotate an interface in plugins that will be later injected into a plugin instance. These annotations can possibly be used not only by analysis plugins in the future.
The implementation of the interface generated in server is using dynamic proxy mechanism.

relates #88980
2022-12-13 16:41:13 +01:00
Przemyslaw Gomulka
73ad49ac51
Rename NamedComponent name parameter to value (#91306)
to allow @NamedComponent("name") syntax java annotation should have single value annotation

relates #88980
2022-11-04 14:20:44 +01:00
Przemyslaw Gomulka
31cba2d085
[Stable plugin api] Extensible annotation (#89903)
This commits adds an Extensible annotation aimed to mark things that can be loaded by a component loader.
It also marks Analyzer api components (AnalyzerFactory, CharFilterFactory, TokenFilterFactory and TokenizerFactory) with this annotation.

relates #88980
2022-09-09 10:41:27 +02:00
Przemyslaw Gomulka
2b6d4e97df
Fix module and package names for stable plugin api (#89772)
the convention for packages and module names is:
org.elasticsearch.plugin[.analysis].api

module-info.java and package-info.java were using incorrect names
and not following the convention
relates #88980
2022-09-05 10:13:20 +02:00
Przemyslaw Gomulka
bc4c6784dd
Stable Plugin API modules and analysis interfaces (#88775)
This commit adds stable analysis plugin API with analysis components interfaces and annotations.
It does not contain any usage of it yet. Separate changes to introduce example plugins or refactoring to existing ones will follow later.

It contains two gradle modules. One plugin-api with two annotations Nameable and NamedComponent, which can be reused for plugins other than analysis.
And second analysis-plugin-api which contains analysis components (TokenFilterFactory, CharFilterFactory etc)

NamedComponent - used by plugin developer - indicates that a Nameable component will be registered under a given name.
Nameable - for analysis plugins it is only used by the stable analysis api designers (ES) - indicates that component have a name and should be declared with NamedComponent

additional tasks that will follow: #88980
2022-08-30 11:04:39 +02:00