org.pentaho.platform.api.engine
Interface IPlatformPlugin

All Superinterfaces:
IPluginLifecycleListener
All Known Implementing Classes:
PlatformPlugin

public interface IPlatformPlugin
extends IPluginLifecycleListener

This interface represents the contract for the specification of a plugin. A IPluginProvider is responsible for serving these to requesting clients, such as the IPluginManager. The presence of an instance of an IPlatformPlugin does not necessarily mean that the plugin is loaded. An implementations of this interface represents merely a plugin configuration.

Author:
jdixon

Nested Class Summary
static class IPlatformPlugin.ClassLoaderType
           
 
Method Summary
 void addLifecycleListener(IPluginLifecycleListener listener)
          Registers a lifecycle listener with this plugin.
 Collection<PluginBeanDefinition> getBeans()
          Returns a list of bean configurations for this plugin-in
 List<IContentGeneratorInfo> getContentGenerators()
          Returns the list of content generators for this plug-in
 List<IContentInfo> getContentInfos()
          Returns a list of content info objects for this plug-in
 List<String> getExternalResourcesForContext(String context)
          Return a List of scripts registered for a given context.
 String getId()
          Returns the unique ID of this plugin
 String getLifecycleListenerClassname()
          Returns the fully qualified name of the lifecycle listener class defined by this plugin.
 IPlatformPlugin.ClassLoaderType getLoaderType()
          Indicates what kind of classloader should be used to load classes and resources from this plugin.
 List getMenuCustomizations()
          Returns a list of menu overlays for this plug-in
 Map<String,String> getMetaProviderMap()
          The storage mechanism for a plugin to know what ISolutionFileMetaProvider class should be used for a particular content type.
 List<org.pentaho.ui.xul.XulOverlay> getOverlays()
          Returns a list of overlays for this plug-in
 Collection<PluginServiceDefinition> getServices()
          Returns the list of the webservices defined by this plugin.
 String getSourceDescription()
          A short description of where this plugin came from, e.g.
 Map<String,String> getStaticResourceMap()
          Returns a list of static resource paths for this plugin-in
 void init()
          Called just prior to the plugin being registered with the platform.
 void loaded()
          Called after the plugin has been registered with the platform, i.e.
 void unLoaded()
          Called when the plugin needs to be unloaded.
 

Method Detail

getId

String getId()
Returns the unique ID of this plugin

Returns:
the plugin id

getSourceDescription

String getSourceDescription()
A short description of where this plugin came from, e.g. "biserver/solutions/pluginA"

Returns:

getContentGenerators

List<IContentGeneratorInfo> getContentGenerators()
Returns the list of content generators for this plug-in

Returns:

getOverlays

List<org.pentaho.ui.xul.XulOverlay> getOverlays()
Returns a list of overlays for this plug-in

Returns:

getContentInfos

List<IContentInfo> getContentInfos()
Returns a list of content info objects for this plug-in

Returns:

getBeans

Collection<PluginBeanDefinition> getBeans()
Returns a list of bean configurations for this plugin-in


getStaticResourceMap

Map<String,String> getStaticResourceMap()
Returns a list of static resource paths for this plugin-in


getMenuCustomizations

List getMenuCustomizations()
Returns a list of menu overlays for this plug-in

Returns:

getLifecycleListenerClassname

String getLifecycleListenerClassname()
Returns the fully qualified name of the lifecycle listener class defined by this plugin. The class must be a IPluginLifecycleListener.

Returns:
lifecycle listener class name

addLifecycleListener

void addLifecycleListener(IPluginLifecycleListener listener)
Registers a lifecycle listener with this plugin. This listener will be notified when lifecycle events occur on this plugin.

Parameters:
listener - a lifecycle listener

init

void init()
          throws PluginLifecycleException
Description copied from interface: IPluginLifecycleListener
Called just prior to the plugin being registered with the platform. Note: This event does *not* precede the detection of the plugin by any IPluginProviders

Specified by:
init in interface IPluginLifecycleListener
Throws:
PluginLifecycleException - if an error occurred

loaded

void loaded()
            throws PluginLifecycleException
Description copied from interface: IPluginLifecycleListener
Called after the plugin has been registered with the platform, i.e. all content generators, components, etc. have been loaded.

Specified by:
loaded in interface IPluginLifecycleListener
Throws:
PluginLifecycleException - if an error occurred

unLoaded

void unLoaded()
              throws PluginLifecycleException
Description copied from interface: IPluginLifecycleListener
Called when the plugin needs to be unloaded. This method should release all resources and return things to a pre-loaded state.

Specified by:
unLoaded in interface IPluginLifecycleListener
Throws:
PluginLifecycleException - if an error occurred

getMetaProviderMap

Map<String,String> getMetaProviderMap()
The storage mechanism for a plugin to know what ISolutionFileMetaProvider class should be used for a particular content type.

Returns:
a map of content types (extensions) keys and ISolutionFileMetaProvider (or deprecated IFileInfoGenerator) classnames for values

getServices

Collection<PluginServiceDefinition> getServices()
Returns the list of the webservices defined by this plugin.

Returns:
the definitions of the webservices for this plugin

getLoaderType

IPlatformPlugin.ClassLoaderType getLoaderType()
Indicates what kind of classloader should be used to load classes and resources from this plugin. The default classloader type is no more than an extension of URLClassLoader.

Returns:
the type of classloader to use for this plugin
See Also:
IPlatformPlugin.ClassLoaderType

getExternalResourcesForContext

List<String> getExternalResourcesForContext(String context)
Return a List of scripts registered for a given context.

Parameters:
context - named area in the platform
Returns:
list of registered scripts