Class PentahoSystemPluginManager
- java.lang.Object
-
- org.pentaho.platform.plugin.services.pluginmgr.PentahoSystemPluginManager
-
- All Implemented Interfaces:
org.pentaho.platform.api.engine.IPluginManager
public class PentahoSystemPluginManager extends Object implements org.pentaho.platform.api.engine.IPluginManager
An IPluginManager implementation based on registering objects to the PentahoSystem and querying for them there. This supports finding types registered through other systems, allowing for the transition away from IPluginManager to plain PentahoSystem.getXXX calls. Created by nbaker on 4/18/14.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_TYPEstatic StringPLUGIN_IDstatic StringSETTINGS_PREFIX
-
Constructor Summary
Constructors Constructor Description PentahoSystemPluginManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddPluginManagerListener(org.pentaho.platform.api.engine.IPluginManagerListener listener)protected voidassertUnique(org.springframework.context.support.GenericApplicationContext applicationContext, String pluginId, String beanId)A utility method that throws an exception if a bean with the id is already defined for this pluginObjectgetBean(String beanId)org.springframework.beans.factory.ListableBeanFactorygetBeanFactory(String pluginId)ClassLoadergetClassLoader(String pluginId)org.pentaho.platform.api.engine.IContentGeneratorgetContentGenerator(String type, String perspectiveName)org.pentaho.platform.api.engine.IContentGeneratorgetContentGeneratorForType(String type, org.pentaho.platform.api.engine.IPentahoSession session)org.pentaho.platform.api.engine.IContentInfogetContentTypeInfo(String type)Set<String>getContentTypes()List<String>getExternalResourcesForContext(String context)protected org.springframework.beans.factory.BeanFactorygetNativeBeanFactory(org.pentaho.platform.api.engine.IPlatformPlugin plugin, ClassLoader loader)List<org.pentaho.ui.xul.XulOverlay>getOverlays()StringgetPluginIdForClassLoader(ClassLoader classLoader)StringgetPluginIdForType(String contentType)List<String>getPluginRESTPerspectivesForId(String id)List<String>getPluginRESTPerspectivesForType(String contentType)ObjectgetPluginSetting(String pluginId, String key, String defaultValue)List<String>getRegisteredPlugins()StringgetServicePlugin(String path)Deprecated.InputStreamgetStaticResource(String path)booleanisBeanRegistered(String beanId)booleanisPublic(String pluginId, String path)protected booleanisRequested(String servicePath, String requestPath)Returntrueif the servicePath is being addressed by the requestPath.booleanisStaticResource(String path)Class<?>loadClass(String beanId)protected voidregisterContentTypes(org.pentaho.platform.api.engine.IPlatformPlugin plugin, ClassLoader loader, org.springframework.context.support.GenericApplicationContext beanFactory)booleanreload()booleanreload(org.pentaho.platform.api.engine.IPentahoSession session)voidunloadAllPlugins()
-
-
-
Field Detail
-
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
PLUGIN_ID
public static final String PLUGIN_ID
- See Also:
- Constant Field Values
-
SETTINGS_PREFIX
public static final String SETTINGS_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getContentTypes
public Set<String> getContentTypes()
- Specified by:
getContentTypesin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getContentTypeInfo
public org.pentaho.platform.api.engine.IContentInfo getContentTypeInfo(String type)
- Specified by:
getContentTypeInfoin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getContentGeneratorForType
public org.pentaho.platform.api.engine.IContentGenerator getContentGeneratorForType(String type, org.pentaho.platform.api.engine.IPentahoSession session) throws org.pentaho.platform.api.engine.ObjectFactoryException
- Specified by:
getContentGeneratorForTypein interfaceorg.pentaho.platform.api.engine.IPluginManager- Throws:
org.pentaho.platform.api.engine.ObjectFactoryException
-
reload
public boolean reload()
- Specified by:
reloadin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
reload
public boolean reload(org.pentaho.platform.api.engine.IPentahoSession session)
- Specified by:
reloadin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
registerContentTypes
protected void registerContentTypes(org.pentaho.platform.api.engine.IPlatformPlugin plugin, ClassLoader loader, org.springframework.context.support.GenericApplicationContext beanFactory) throws org.pentaho.platform.api.engine.PlatformPluginRegistrationException- Throws:
org.pentaho.platform.api.engine.PlatformPluginRegistrationException
-
assertUnique
protected void assertUnique(org.springframework.context.support.GenericApplicationContext applicationContext, String pluginId, String beanId) throws org.pentaho.platform.api.engine.PlatformPluginRegistrationExceptionA utility method that throws an exception if a bean with the id is already defined for this plugin- Throws:
org.pentaho.platform.api.engine.PlatformPluginRegistrationException
-
getNativeBeanFactory
protected org.springframework.beans.factory.BeanFactory getNativeBeanFactory(org.pentaho.platform.api.engine.IPlatformPlugin plugin, ClassLoader loader)
-
getOverlays
public List<org.pentaho.ui.xul.XulOverlay> getOverlays()
- Specified by:
getOverlaysin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getBean
public Object getBean(String beanId) throws org.pentaho.platform.api.engine.PluginBeanException
- Specified by:
getBeanin interfaceorg.pentaho.platform.api.engine.IPluginManager- Throws:
org.pentaho.platform.api.engine.PluginBeanException
-
getContentGenerator
public org.pentaho.platform.api.engine.IContentGenerator getContentGenerator(String type, String perspectiveName)
- Specified by:
getContentGeneratorin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
loadClass
public Class<?> loadClass(String beanId) throws org.pentaho.platform.api.engine.PluginBeanException
- Specified by:
loadClassin interfaceorg.pentaho.platform.api.engine.IPluginManager- Throws:
org.pentaho.platform.api.engine.PluginBeanException
-
isBeanRegistered
public boolean isBeanRegistered(String beanId)
- Specified by:
isBeanRegisteredin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
unloadAllPlugins
public void unloadAllPlugins()
- Specified by:
unloadAllPluginsin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getPluginIdForType
public String getPluginIdForType(String contentType)
- Specified by:
getPluginIdForTypein interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getPluginRESTPerspectivesForType
public List<String> getPluginRESTPerspectivesForType(String contentType)
- Specified by:
getPluginRESTPerspectivesForTypein interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getPluginRESTPerspectivesForId
public List<String> getPluginRESTPerspectivesForId(String id)
- Specified by:
getPluginRESTPerspectivesForIdin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getPluginIdForClassLoader
public String getPluginIdForClassLoader(ClassLoader classLoader)
- Specified by:
getPluginIdForClassLoaderin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
isRequested
protected boolean isRequested(String servicePath, String requestPath)
Returntrueif the servicePath is being addressed by the requestPath. The request path is said to request the service if it contains at least ALL of the elements of the servicePath, in order. It may include more than these elements but it must contain at least the servicePath.- Parameters:
servicePath-requestPath-- Returns:
trueif the servicePath is being addressed by the requestPath
-
getPluginSetting
public Object getPluginSetting(String pluginId, String key, String defaultValue)
- Specified by:
getPluginSettingin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getServicePlugin
@Deprecated public String getServicePlugin(String path)
Deprecated.- Specified by:
getServicePluginin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getClassLoader
public ClassLoader getClassLoader(String pluginId)
- Specified by:
getClassLoaderin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getBeanFactory
public org.springframework.beans.factory.ListableBeanFactory getBeanFactory(String pluginId)
- Specified by:
getBeanFactoryin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
isStaticResource
public boolean isStaticResource(String path)
- Specified by:
isStaticResourcein interfaceorg.pentaho.platform.api.engine.IPluginManager
-
isPublic
public boolean isPublic(String pluginId, String path)
- Specified by:
isPublicin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getStaticResource
public InputStream getStaticResource(String path)
- Specified by:
getStaticResourcein interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getRegisteredPlugins
public List<String> getRegisteredPlugins()
- Specified by:
getRegisteredPluginsin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
getExternalResourcesForContext
public List<String> getExternalResourcesForContext(String context)
- Specified by:
getExternalResourcesForContextin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
addPluginManagerListener
public void addPluginManagerListener(org.pentaho.platform.api.engine.IPluginManagerListener listener)
- Specified by:
addPluginManagerListenerin interfaceorg.pentaho.platform.api.engine.IPluginManager
-
-