|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.platform.plugin.services.pluginmgr.AbstractPluginManager org.pentaho.platform.plugin.services.pluginmgr.DefaultPluginManager
public class DefaultPluginManager
Constructor Summary | |
---|---|
DefaultPluginManager()
|
Method Summary | |
---|---|
Object |
getBean(String beanId)
If any plugins have registered a bean by id beanId, this method will return a new instance of the object. |
IPentahoObjectFactory |
getBeanFactory()
|
ClassLoader |
getClassLoader(IPlatformPlugin plugin)
|
ClassLoader |
getClassLoader(String pluginId)
Returns the classloader instance that was assigned by the plugin manager to load all classes for the specified plugin. |
IFileInfo |
getFileInfo(String extension,
IPentahoSession session,
ISolutionFile solutionFile,
InputStream in)
Retrieves meta information for the given solution file. |
Object |
getPluginSetting(IPlatformPlugin plugin,
String key,
String defaultValue)
|
Object |
getPluginSetting(String pluginId,
String key,
String defaultValue)
Retrieves a plugin setting for a given plugin and key. |
String |
getServicePlugin(String path)
Returns the plugin that can handle a request for the resource at "path". |
InputStream |
getStaticResource(String path)
Returns and InputStream to the specified resource path. |
boolean |
isBeanRegistered(String beanId)
Returns true if a bean with id beanId has been registered with the plugin manager, i.e. |
IPlatformPlugin |
isResourceLoadable(String path)
|
boolean |
isStaticResource(String path)
returns true if the path is a reference to a potential static resource. |
Class<?> |
loadClass(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 ClassLoader getClassLoader(IPlatformPlugin plugin)
public ClassLoader getClassLoader(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 Object getBean(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 Class<?> loadClass(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(String beanId)
IPluginManager
IPluginManager.getBean(String)
beanId
- Cannot be null
public void unloadAllPlugins()
IPluginManager
public IFileInfo getFileInfo(String extension, IPentahoSession session, ISolutionFile solutionFile, 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 Object getPluginSetting(IPlatformPlugin plugin, String key, String defaultValue)
public Object getPluginSetting(String pluginId, String key, 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(String path)
public String getServicePlugin(String path)
IPluginManager
null
is returned.
path
- the path to the plugin resource
null
if one cannot be foundpublic boolean isStaticResource(String path)
IPluginManager
path
- static resource path
public InputStream getStaticResource(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 |