# Class e.c.e.e.EggPlugin(Loggable):

Part of elisa.core.epm.egg_plugin View In Hierarchy

An Elisa plugin.

Can represent:

1. a plugin coming from a remote repository
2. a local .elisa (egg) file.
3. an already installed plugin

For now the property list is freely settable.

Line # | Kind | Name | Docs
--- | --- | --- | ---
79 | Method | __init__ | Fill the plugin data.
134 | Method | get_plugin_deps | Get the list of deps with version information.
145 | Method | pre_install | Run the pre-installation script.
153 | Method | post_install | Run the post-installation script.
161 | Method | pre_remove | Run the pre-disinstallation script.
169 | Method | post_remove | Run the post-disinstallation script.
177 | Method | is_installed_systemwide | Tell whether the plugin is installed system wide.
242 | Method | custom_install | Undocumented
299 | Method | uninstall | Undocumented
302 | Method | download | Retrieve the plugin data.
363 | Method | __repr__ | Undocumented

def __init__(self, repository=None, local_file=None, plugin_class=None, **kwargs):
overrides elisa.core.log.Loggable.__init__
Fill the plugin data.

Parameters | repository | the repository where the plugin is coming from, if it doesn't represent a single .elisa file (type: `epm.egg_repository.EggRepository` )
| local_file | a single, local .elisa file's path (type: string )
| plugin_class | the class of an installed plugin (type: `elisa.core.plugin.Plugin` )
| kwargs | properties of the plugin (type: dictionary )

def get_plugin_deps(self):
Get the list of deps with version information.

def pre_install(self):
Run the pre-installation script.

Raises | InstallationError | when the script doesn't return 0

def post_install(self):
Run the post-installation script.

Raises | InstallationError | when the script doesn't return 0

def pre_remove(self):
Run the pre-disinstallation script.

Raises | InstallationError | when the script doesn't return 0

def post_remove(self):
Run the post-disinstallation script.

Raises | InstallationError | when the script doesn't return 0

def is_installed_systemwide(self):
Tell whether the plugin is installed system wide.

Returns | the answer (type: bool )

def custom_install(self, force=False):
Undocumented
def uninstall(self, force=False):
Undocumented
def download(self, directory=None):

Retrieve the plugin data.

If the plugin is not a local .elisa file, ask the repository for the data: if download is ok, set the instance variable "download_path" to the absolute path of the downloaded file, to None otherwise.

Parameters | directory | the absolute path of the directory where to store the downloaded file. Needs to exist and to be writeable (type: string )
Returns | a deferred triggered when the download has finished (type: `twisted.internet.defer.Defer` )

def __repr__(self):
Undocumented