|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.platform.plugin.services.pluginmgr.AbstractPluginManager
org.pentaho.platform.plugin.services.pluginmgr.DefaultPluginManager
public class DefaultPluginManager
Constructor Summary | |
---|---|
DefaultPluginManager()
|
Method Summary | |
---|---|
java.lang.Object |
getBean(java.lang.String beanId)
If any plugins have registered a bean by id beanId, this method will return a new instance of the object. |
IPentahoObjectFactory |
getBeanFactory()
|
java.lang.ClassLoader |
getClassLoader(IPlatformPlugin plugin)
|
java.lang.ClassLoader |
getClassLoader(java.lang.String pluginId)
Returns the classloader instance that was assigned by the plugin manager to load all classes for the specified plugin. |
IFileInfo |
getFileInfo(java.lang.String extension,
IPentahoSession session,
ISolutionFile solutionFile,
java.io.InputStream in)
Retrieves meta information for the given solution file. |
java.lang.Object |
getPluginSetting(IPlatformPlugin plugin,
java.lang.String key,
java.lang.String defaultValue)
|
java.lang.Object |
getPluginSetting(java.lang.String pluginId,
java.lang.String key,
java.lang.String defaultValue)
Retrieves a plugin setting for a given plugin and key. |
java.lang.String |
getServicePlugin(java.lang.String path)
Returns the plugin that can handle a request for the resource at "path". |
java.io.InputStream |
getStaticResource(java.lang.String path)
Returns and InputStream to the specified resource path. |
boolean |
isBeanRegistered(java.lang.String beanId)
Returns true if a bean with id beanId has been registered with the plugin manager, i.e. |
IPlatformPlugin |
isResourceLoadable(java.lang.String path)
|
boolean |
isStaticResource(java.lang.String path)
returns true if the path is a reference to a potential static resource. |
java.lang.Class<?> |
loadClass(java.lang.String beanId)
Returns a loaded class for the bean registered as beanId. |
boolean |
reload(IPentahoSession session)
Causes the plug-in manager object to re-register all of the plug-ins that it knows about. |
void |
unloadAllPlugins()
Unloads all the plugins. |
Methods inherited from class org.pentaho.platform.plugin.services.pluginmgr.AbstractPluginManager |
---|
getContentGenerator, getContentGeneratorForType, getContentGeneratorIdForType, getContentGeneratorInfo, getContentGeneratorInfoForType, getContentGeneratorTitleForType, getContentGeneratorUrlForType, getContentInfoFromExtension, getContentTypes, getDefaultContentGeneratorInfoForType, getExternalResourcesForContext, getMenuCustomizations, getOverlays, getRegisteredPlugins |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPluginManager()
Method Detail |
---|
public final boolean reload(IPentahoSession session)
IPluginManager
IPluginProvider
may be invoked to discover plugins
from various sources.
session
- the current session
public java.lang.ClassLoader getClassLoader(IPlatformPlugin plugin)
public java.lang.ClassLoader getClassLoader(java.lang.String pluginId)
IPluginManager
IPluginManager.getServicePlugin(String)
, this method can provide you with a way to load resources
from a plugin when all you have is a request URL/path, such as in a servlet environment.
null
if the plugin is not
known by the plugin manager, or for some reason a classloader was not assigned to the plugin
(an error condition).public IPentahoObjectFactory getBeanFactory()
public java.lang.Object getBean(java.lang.String beanId) throws PluginBeanException
IPluginManager
beanId
- a unique identifier for a particular bean (cannot be null)
PluginBeanException
- if there was a problem retrieving the bean instancepublic java.lang.Class<?> loadClass(java.lang.String beanId) throws PluginBeanException
IPluginManager
beanId
- a unique identifier for a particular bean (cannot be null)
PluginBeanException
- if there was a problem loading the classpublic boolean isBeanRegistered(java.lang.String beanId)
IPluginManager
IPluginManager.getBean(String)
beanId
- Cannot be null
public void unloadAllPlugins()
IPluginManager
public IFileInfo getFileInfo(java.lang.String extension, IPentahoSession session, ISolutionFile solutionFile, java.io.InputStream in)
IPluginManager
extension
- used to identify the appropriate plugin that handles this type of contentsession
- the current sessionsolutionFile
- the solution file we want to know something aboutin
- the content of the solution file as an InputStream
public java.lang.Object getPluginSetting(IPlatformPlugin plugin, java.lang.String key, java.lang.String defaultValue)
public java.lang.Object getPluginSetting(java.lang.String pluginId, java.lang.String key, java.lang.String defaultValue)
IPluginManager
pluginId
- the ID of the plugin to find settings forkey
- the setting name to lookupdefaultValue
- the default to use if the setting key is not found
public IPlatformPlugin isResourceLoadable(java.lang.String path)
public java.lang.String getServicePlugin(java.lang.String path)
IPluginManager
null
is returned.
path
- the path to the plugin resource
null
if one cannot be foundpublic boolean isStaticResource(java.lang.String path)
IPluginManager
path
- static resource path
public java.io.InputStream getStaticResource(java.lang.String path)
IPluginManager
path
- the path to the plugin resource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |