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 Classes
    Modifier and Type
    Class
    Description
    static class 
    Allows you to inject hidden properties into plugin instance
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull com.reposilite.plugin.Extensions
     
    @NotNull com.reposilite.journalist.Logger
     
    abstract @Nullable com.reposilite.plugin.api.Facade
    The heart of your plugin, that's where every plugin can start to interact with Reposilite API.
    void
    load(@NotNull com.reposilite.plugin.PluginLoader loader)
    Called when plugin is loaded using PluginLoader.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReposilitePlugin

      public ReposilitePlugin()
  • Method Details

    • load

      public void load(@NotNull @NotNull com.reposilite.plugin.PluginLoader loader)
      Called when plugin is loaded using PluginLoader. 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:
      getLogger in interface com.reposilite.journalist.Journalist
      Returns:
      the assigned for this plugin logger