|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.test.platform.engine.core.PluginManagerAdapter
public class PluginManagerAdapter
Constructor Summary | |
---|---|
PluginManagerAdapter()
|
Method Summary | |
---|---|
Object |
getApplicationContext(String pluginId)
|
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)
|
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. |
String |
getPluginIdForClassLoader(ClassLoader classLoader)
|
String |
getPluginIdForContentGeneratorInfo(IContentGeneratorInfo contentGeneratorInfo)
|
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. |
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)
|
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 java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PluginManagerAdapter()
Method Detail |
---|
public Object getBean(String beanId) throws PluginBeanException
IPluginManager
getBean
in interface IPluginManager
beanId
- a unique identifier for a particular bean (cannot be null)
PluginBeanException
- if there was a problem retrieving the bean instancepublic ClassLoader getClassLoader(IPlatformPlugin plugin)
getClassLoader
in interface IPluginManager
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.
getClassLoader
in interface IPluginManager
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 IContentGenerator getContentGenerator(String id, IPentahoSession session) throws ObjectFactoryException
getContentGenerator
in interface IPluginManager
ObjectFactoryException
public IContentGenerator getContentGeneratorForType(String type, IPentahoSession session) throws ObjectFactoryException
getContentGeneratorForType
in interface IPluginManager
ObjectFactoryException
public String getContentGeneratorIdForType(String type, IPentahoSession session)
getContentGeneratorIdForType
in interface IPluginManager
public IContentGeneratorInfo getContentGeneratorInfo(String id, IPentahoSession session)
getContentGeneratorInfo
in interface IPluginManager
public List<IContentGeneratorInfo> getContentGeneratorInfoForType(String type, IPentahoSession session)
IPluginManager
getContentGeneratorInfoForType
in interface IPluginManager
session
- A session used for storing objects from session-scoped factories
public String getContentGeneratorTitleForType(String type, IPentahoSession session)
getContentGeneratorTitleForType
in interface IPluginManager
public String getContentGeneratorUrlForType(String type, IPentahoSession session)
getContentGeneratorUrlForType
in interface IPluginManager
public IContentInfo getContentInfoFromExtension(String extension, IPentahoSession session)
getContentInfoFromExtension
in interface IPluginManager
public Set<String> getContentTypes()
IPluginManager
getContentTypes
in interface IPluginManager
public IContentGeneratorInfo getDefaultContentGeneratorInfoForType(String type, IPentahoSession session)
getDefaultContentGeneratorInfoForType
in interface IPluginManager
public IFileInfo getFileInfo(String extension, IPentahoSession session, ISolutionFile file, InputStream in)
IPluginManager
getFileInfo
in interface IPluginManager
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
public Object getPluginSetting(IPlatformPlugin plugin, String key, String defaultValue)
getPluginSetting
in interface IPluginManager
public Object getPluginSetting(String pluginId, String key, String defaultValue)
IPluginManager
getPluginSetting
in interface 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 String getServicePlugin(String path)
IPluginManager
null
is returned.
getServicePlugin
in interface IPluginManager
path
- the path to the plugin resource
null
if one cannot be foundpublic InputStream getStaticResource(String path)
IPluginManager
getStaticResource
in interface IPluginManager
path
- the path to the plugin resource
public boolean isBeanRegistered(String beanId)
IPluginManager
IPluginManager.getBean(String)
isBeanRegistered
in interface IPluginManager
beanId
- Cannot be null
public IPlatformPlugin isResourceLoadable(String path)
isResourceLoadable
in interface IPluginManager
public boolean isStaticResource(String path)
IPluginManager
isStaticResource
in interface IPluginManager
path
- static resource path
public Class<?> loadClass(String beanId) throws PluginBeanException
IPluginManager
loadClass
in interface IPluginManager
beanId
- a unique identifier for a particular bean (cannot be null)
PluginBeanException
- if there was a problem loading the classpublic boolean reload(IPentahoSession session)
IPluginManager
IPluginProvider
may be invoked to discover plugins
from various sources.
reload
in interface IPluginManager
session
- the current session
public void unloadAllPlugins()
IPluginManager
unloadAllPlugins
in interface IPluginManager
public List<org.pentaho.ui.xul.IMenuCustomization> getMenuCustomizations()
IPluginManager
getMenuCustomizations
in interface IPluginManager
public List<org.pentaho.ui.xul.XulOverlay> getOverlays()
IPluginManager
getOverlays
in interface IPluginManager
public String getPluginIdForClassLoader(ClassLoader classLoader)
public String getPluginIdForContentGeneratorInfo(IContentGeneratorInfo contentGeneratorInfo)
public Object getApplicationContext(String pluginId)
public List<String> getRegisteredPlugins()
getRegisteredPlugins
in interface IPluginManager
public List<String> getExternalResourcesForContext(String context)
IPluginManager
getExternalResourcesForContext
in interface IPluginManager
context
- named area in the platform
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |