Package com.reposilite.plugin.api
Class ReposilitePlugin
java.lang.Object
com.reposilite.plugin.api.ReposilitePlugin
- All Implemented Interfaces:
com.reposilite.journalist.Journalist
public abstract class ReposilitePlugin
extends Object
implements com.reposilite.journalist.Journalist
This is the bootstrap-like abstract class to use by each plugin to properly initialize context for extensions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAllows you to inject hidden properties into plugin instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull com.reposilite.plugin.Extensions@NotNull com.reposilite.journalist.Loggerabstract @Nullable com.reposilite.plugin.api.FacadeThe heart of your plugin, that's where every plugin can start to interact with Reposilite API.voidload(@NotNull com.reposilite.plugin.PluginLoader loader) Called when plugin is loaded usingPluginLoader.
-
Constructor Details
-
ReposilitePlugin
public ReposilitePlugin()
-
-
Method Details
-
load
public void load(@NotNull @NotNull com.reposilite.plugin.PluginLoader loader) Called when plugin is loaded usingPluginLoader. There is no guarantee of order of load, so you cannot relay on other dependencies here.- Parameters:
loader- the loader instance used to load this plugin
-
initialize
@Nullable public abstract @Nullable com.reposilite.plugin.api.Facade initialize()The heart of your plugin, that's where every plugin can start to interact with Reposilite API.- Returns:
- a facade - the api provider. If the given plugin don't want to register its own api, it may respond with null value
-
extensions
@NotNull public @NotNull com.reposilite.plugin.Extensions extensions()- Returns:
- the supervisor of this plugin
-
getLogger
@NotNull public @NotNull com.reposilite.journalist.Logger getLogger()- Specified by:
getLoggerin interfacecom.reposilite.journalist.Journalist- Returns:
- the assigned for this plugin logger
-