Package peppy :: Package yapsy :: Module VersionedPluginManager :: Class VersionedPluginManager
[frames] | no frames]

Class VersionedPluginManager

                          object --+    
                                   |    
PluginManager.PluginManagerDecorator --+
                                       |
                                      VersionedPluginManager
Known Subclasses:

Manage several plugins by ordering them in several categories with versioning capabilities.

Instance Methods
 
__init__(self, decorated_manager=None, categories_filter={'Default': <class 'peppy.yapsy.IPlugin.IPlugin'>}, directories_list=['/home/rob/src/peppy-git/peppy-0.7.2.5/peppy/yapsy'], plugin_info_ext='yapsy-plugin')
Create the plugin manager and record the ConfigParser instance that will be used afterwards.
 
setCategoriesFilter(self, categories_filter)
Set the categories of plugins to be looked for as well as the way to recognise them.
 
getLatestPluginsOfCategory(self, category_name)
Return the list of all plugins belonging to a category.
 
loadPlugins(self, callback=None)
Load the candidate plugins that have been identified through a previous call to locatePlugins.

Inherited from PluginManager.PluginManagerDecorator: __getattr__, collectPlugins

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self, decorated_manager=None, categories_filter={'Default': <class 'peppy.yapsy.IPlugin.IPlugin'>}, directories_list=['/home/rob/src/peppy-git/peppy-0.7.2.5/peppy/yapsy'], plugin_info_ext='yapsy-plugin')
(Constructor)

 

Create the plugin manager and record the ConfigParser instance that will be used afterwards.

The ``config_change_trigger`` argument can be used to set a specific method to call when the configuration is altered. This will let the client application manage the way they want the configuration to be updated (e.g. write on file at each change or at precise time intervalls or whatever....)

Overrides: object.__init__

setCategoriesFilter(self, categories_filter)

 

Set the categories of plugins to be looked for as well as the way to recognise them.

The ``categories_filter`` first defines the various categories in which the plugins will be stored via its keys and it also defines the interface tha has to be inherited by the actual plugin class belonging to each category.

A call to this class will also reset the mapping of the latest version for each plugin.

loadPlugins(self, callback=None)

 

Load the candidate plugins that have been identified through a previous call to locatePlugins.

In addition to the baseclass functionality, this subclass also needs to find the latest version of each plugin.