|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPluginManager
The contract API between the platform and platform plugins. The plugin manager provides the ability to load and register plugins as well as utility methods for getting particular extension implementations from the set of registered plugins. For more information on platform plugins, visit the wiki link below.
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. |
ClassLoader |
getClassLoader(IPlatformPlugin plugin)
Deprecated. use getClassLoader(String) |
ClassLoader |
getClassLoader(String pluginId)
Returns the classloader instance that was assigned by the plugin manager to load all classes for the specified plugin. |
IContentGenerator |
getContentGenerator(String id,
IPentahoSession session)
|
IContentGenerator |
getContentGeneratorForType(String type,
IPentahoSession session)
|
String |
getContentGeneratorIdForType(String type,
IPentahoSession session)
|
IContentGeneratorInfo |
getContentGeneratorInfo(String id,
IPentahoSession session)
|
List<IContentGeneratorInfo> |
getContentGeneratorInfoForType(String type,
IPentahoSession session)
Returns a list of info objects that can be used to create content generators for a given type. |
String |
getContentGeneratorTitleForType(String type,
IPentahoSession session)
|
String |
getContentGeneratorUrlForType(String type,
IPentahoSession session)
|
IContentInfo |
getContentInfoFromExtension(String extension,
IPentahoSession session)
|
Set<String> |
getContentTypes()
Returns a set of the content types that the registered plugins can process. |
IContentGeneratorInfo |
getDefaultContentGeneratorInfoForType(String type,
IPentahoSession session)
|
List<String> |
getExternalResourcesForContext(String context)
Return a List of scripts registered for a given context. |
IFileInfo |
getFileInfo(String extension,
IPentahoSession session,
ISolutionFile file,
InputStream in)
Retrieves meta information for the given solution file. |
List<org.pentaho.ui.xul.IMenuCustomization> |
getMenuCustomizations()
Returns a list of menu customization objects. |
List<org.pentaho.ui.xul.XulOverlay> |
getOverlays()
Returns a list of the XUL overlays that are defined by all the plug-ins. |
Object |
getPluginSetting(IPlatformPlugin plugin,
String key,
String defaultValue)
Deprecated. use getPluginSetting(String, String, String) |
Object |
getPluginSetting(String pluginId,
String key,
String defaultValue)
Retrieves a plugin setting for a given plugin and key. |
List<String> |
getRegisteredPlugins()
|
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)
Deprecated. This is a poorly named method, use getServicePlugin(String) instead. |
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. |
Method Detail |
---|
Set<String> getContentTypes()
IContentInfo getContentInfoFromExtension(String extension, IPentahoSession session)
List<IContentGeneratorInfo> getContentGeneratorInfoForType(String type, IPentahoSession session)
type
- session
- A session used for storing objects from session-scoped factories
IContentGenerator getContentGenerator(String id, IPentahoSession session) throws ObjectFactoryException
ObjectFactoryException
IContentGeneratorInfo getContentGeneratorInfo(String id, IPentahoSession session)
IContentGeneratorInfo getDefaultContentGeneratorInfoForType(String type, IPentahoSession session)
String getContentGeneratorIdForType(String type, IPentahoSession session)
String getContentGeneratorTitleForType(String type, IPentahoSession session)
String getContentGeneratorUrlForType(String type, IPentahoSession session)
IContentGenerator getContentGeneratorForType(String type, IPentahoSession session) throws ObjectFactoryException
ObjectFactoryException
List<org.pentaho.ui.xul.IMenuCustomization> getMenuCustomizations()
boolean reload(IPentahoSession session)
IPluginProvider
may be invoked to discover plugins
from various sources.
session
- the current session
List<org.pentaho.ui.xul.XulOverlay> getOverlays()
Object getBean(String beanId) throws PluginBeanException
beanId
- a unique identifier for a particular bean (cannot be null)
PluginBeanException
- if there was a problem retrieving the bean instanceClass<?> loadClass(String beanId) throws PluginBeanException
beanId
- a unique identifier for a particular bean (cannot be null)
PluginBeanException
- if there was a problem loading the classboolean isBeanRegistered(String beanId)
getBean(String)
beanId
- Cannot be null
void unloadAllPlugins()
IFileInfo getFileInfo(String extension, IPentahoSession session, ISolutionFile file, InputStream in)
extension
- used to identify the appropriate plugin that handles this type of contentsession
- the current sessionfile
- the solution file we want to know something aboutin
- the content of the solution file as an InputStream
Object getPluginSetting(IPlatformPlugin plugin, String key, String defaultValue)
getPluginSetting(String, String, String)
Object getPluginSetting(String pluginId, String key, String defaultValue)
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
IPlatformPlugin isResourceLoadable(String path)
getServicePlugin(String)
instead.
String getServicePlugin(String path)
null
is returned.
path
- the path to the plugin resource
null
if one cannot be foundClassLoader getClassLoader(IPlatformPlugin plugin)
getClassLoader(String)
ClassLoader getClassLoader(String pluginId)
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.
plugin
- the plugin for which we want to get the assigned classloader
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).boolean isStaticResource(String path)
path
- static resource path
InputStream getStaticResource(String path)
path
- the path to the plugin resource
List<String> getRegisteredPlugins()
List<String> getExternalResourcesForContext(String context)
context
- named area in the platform
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |