Class PluginUtil
java.lang.Object
org.pentaho.platform.plugin.services.pluginmgr.PluginUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassLoader
If the service specified byserviceId
is supplied by a plugin, the ClassLoader used to load classes for the associated plugin is returned.static String
getPluginIdFromPath
(String path) If the service specified byserviceId
is supplied by a plugin, plugin id is returned.
-
Constructor Details
-
PluginUtil
public PluginUtil()
-
-
Method Details
-
getClassLoaderForService
If the service specified byserviceId
is supplied by a plugin, the ClassLoader used to load classes for the associated plugin is returned. This is a handy method to use if you want to find resources associated with a particular (plugin-supplied) service, such as a GWT serialization policy file, properties files, etc. If the service was not supplied by a plugin, thennull
is returned.- Parameters:
path
- a path to a plugin resource- Returns:
- the ClassLoader that serves the (plugin-supplied) service, or
null
if the service was not plugin-supplied or the plugin manager cannot identify the service.
-
getPluginIdFromPath
If the service specified byserviceId
is supplied by a plugin, plugin id is returned.- Parameters:
path
- a path to a plugin resource- Returns:
- the Id of the plugin
-