Package com.morpheusdata.core
Class PluginManager
java.lang.Object
com.morpheusdata.core.PluginManager
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.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindByCode
(String code) getMergedPluginProperties
(Locale locale) Returns all i18n Properties by locale for all loaded pluginsgetPackages
(Plugin plugin) Returns a list of all morpheus packages for the plugin to be dynamically loaded in MorpheusReturns the instances of all loaded Plugins within the current JVMgetProperties
(Plugin plugin, Locale locale) Returns a list of all i18n Properties for the plugin to be dynamically loaded for lookup in MorpheusgetProvidersByType
(Class clazz) Renderer<?>
getScribeResources
(Plugin plugin) Returns a list of all scribe resource files to be dynamically loaded in MorpheusgetSeedResources
(Plugin plugin) Returns a list of all seed resource files to be dynamically loaded in MorpheusregisterPlugin
(String pathToJar) Given a path to a plugin pathToJar file - create a child classloader, extract the Plugin Manifest and registers.
-
Field Details
-
cachedLocaleProperties
-
-
Constructor Details
-
PluginManager
-
-
Method Details
-
handleRoute
-
registerPlugin
Given a path to a plugin pathToJar file - create a child classloader, extract the Plugin Manifest and registers.- Parameters:
pathToJar
- Path to jar file- Returns:
- Plugin the instanced Plugin class loaded from the jar
- Throws:
Exception
- if file does not exist
-
getPlugins
Returns the instances of all loaded Plugins within the current JVM- Returns:
- A Collection of already initialized plugins
-
getRoutes
-
findByCode
-
getProvidersByType
-
getRenderer
-
getMergedPluginProperties
Returns all i18n Properties by locale for all loaded plugins- Parameters:
locale
- This is the Locale with which we want to scope i18n localization lookup- Returns:
- the merged Properties of all loaded plugins
-
getProperties
Returns a list of all i18n Properties for the plugin to be dynamically loaded for lookup in Morpheus- Parameters:
locale
- the Locale of properties to be loaded. If not found the default will also be loaded- Returns:
- Properties list
- Throws:
IOException
-
getPackages
Returns a list of all morpheus packages for the plugin to be dynamically loaded in Morpheus- Parameters:
plugin
- the plugin we are loading from- Returns:
- a collection of strings of paths to package files in the plugin
- Throws:
IOException
-
getScribeResources
Returns a list of all scribe resource files to be dynamically loaded in Morpheus- Parameters:
plugin
- the plugin we are loading fromwe- Returns:
- a collection of strings of paths to scribe resources in the plugin
- Throws:
IOException
-
getSeedResources
Returns a list of all seed resource files to be dynamically loaded in Morpheus- Parameters:
plugin
- the plugin we are loading from- Returns:
- a collection of strings of paths to seed resources in the plugin
- Throws:
IOException
-