Package entropy :: Package db :: Module skel :: Class EntropyRepositoryPluginStore

Class EntropyRepositoryPluginStore

source code


EntropyRepository plugin interface. This is the EntropyRepository part aimed to handle connected plugins.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
add_plugin(self, entropy_repository_plugin)
Overloaded from EntropyPluginStore, adds support for hooks execution.
source code
 
remove_plugin(self, plugin_id)
Overloaded from EntropyPluginStore, adds support for hooks execution.
source code
dict
get_plugins(self)
Overloaded from EntropyPluginStore, adds support for permanent plugins.
source code
dict
get_plugins_metadata(self)
Return EntropyRepositoryPluginStore registered plugins metadata.
source code
any Python object
get_plugin_metadata(self, plugin_id, key)
Return EntropyRepositoryPlugin metadata value referenced by "key".
source code
 
set_plugin_metadata(self, plugin_id, key, value)
Set EntropyRepositoryPlugin stored metadata.
source code

Inherited from core.EntropyPluginStore: drop_plugins, has_plugin

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

Static Methods
 
add_permanent_plugin(entropy_repository_plugin)
Add EntropyRepository permanent plugin.
source code
 
remove_permanent_plugin(plugin_id)
Remove EntropyRepository permanent plugin.
source code
dict
get_permanent_plugins()
Return EntropyRepositoryStore installed permanent plugins.
source code
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

add_plugin(self, entropy_repository_plugin)

source code 

Overloaded from EntropyPluginStore, adds support for hooks execution.

Parameters:
  • plugin_id - plugin identifier
  • plugin_object - valid SystemSettingsPlugin instance
Overrides: core.EntropyPluginStore.add_plugin

remove_plugin(self, plugin_id)

source code 

Overloaded from EntropyPluginStore, adds support for hooks execution.

Parameters:
  • plugin_id - plugin identifier
Overrides: core.EntropyPluginStore.remove_plugin

add_permanent_plugin(entropy_repository_plugin)
Static Method

source code 

Add EntropyRepository permanent plugin. This plugin object will be used across all the instantiated EntropyRepositoryPluginStore classes. Each time a new instance is created, add_plugin_hook will be executed for all the permanent plugins.

Parameters:
  • entropy_repository_plugin (EntropyRepositoryPlugin instance) - EntropyRepositoryPlugin instance

remove_permanent_plugin(plugin_id)
Static Method

source code 

Remove EntropyRepository permanent plugin. This plugin object will be removed across all the EntropyRepository instances around. Please note: due to the fact that there are no destructors around, the "remove_plugin_hook" callback won't be executed when calling this static method.

Parameters:
  • plugin_id (string) - EntropyRepositoryPlugin identifier
Raises:
  • KeyError - in case of unavailable plugin identifier

get_permanent_plugins()
Static Method

source code 

Return EntropyRepositoryStore installed permanent plugins.

Returns: dict
copy of internal permanent plugins dict

get_plugins(self)

source code 

Overloaded from EntropyPluginStore, adds support for permanent plugins.

Returns: dict
stored plugins map
Overrides: core.EntropyPluginStore.get_plugins

get_plugins_metadata(self)

source code 

Return EntropyRepositoryPluginStore registered plugins metadata.

Returns: dict
plugins metadata

get_plugin_metadata(self, plugin_id, key)

source code 

Return EntropyRepositoryPlugin metadata value referenced by "key".

@param plugin_id. EntropyRepositoryPlugin identifier

Parameters:
  • key (string) - EntropyRepositoryPlugin metadatum identifier
  • plugin_id (string)
Returns: any Python object
metadatum value
Raises:
  • KeyError - if provided key or plugin_id is not available

set_plugin_metadata(self, plugin_id, key, value)

source code 

Set EntropyRepositoryPlugin stored metadata.

@param plugin_id. EntropyRepositoryPlugin identifier

Parameters:
  • key (string) - EntropyRepositoryPlugin metadatum identifier
  • value (any valid Python object) - value to set
  • plugin_id (string)
Raises:
  • KeyError - if plugin_id is not available