Class PluginManager

  • public class PluginManager
    extends java.lang.Object
    This is the base implementation of a Plugin Manager responsible for loading all plugins on the Morpheus classpath into memory. This should be expanded in the future to load custom files or even download from the marketplace.
    • Constructor Detail

    • Method Detail

      • handleRoute

        public java.lang.Object handleRoute​(java.lang.String route,
                                            ViewModel<?> model,
                                            java.util.Map<java.lang.String,​java.lang.String> permissions)
      • registerPlugin

        public Plugin registerPlugin​(java.lang.String pathToJar)
                              throws java.lang.Exception
        Given a path to a plugin pathToJar file - create a child classloader, extract the Plugin Manifest and registers.
        pathToJar - Path to jar file
        Plugin the instanced Plugin class loaded from the jar
        java.lang.Exception - if file does not exist
      • getPlugins

        public java.util.ArrayList<Plugin> getPlugins()
        Returns the instances of all loaded Plugins within the current JVM
        A Collection of already initialized plugins
      • getRoutes

        public java.util.Map<java.lang.Class,​java.util.List<Route>> getRoutes()
      • findByCode

        public PluginProvider findByCode​(java.lang.String code)
      • getProvidersByType

        public java.util.Collection<PluginProvider> getProvidersByType​(java.lang.Class clazz)
      • getRenderer

        public Renderer<?> getRenderer()