| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
PluginBase
Plugin base class. Each plugin should inherit from this class.
Variables documentation:
urls: This variable is a tuple of pairs in the form "url-regexp, view" as in web.py applications, but for this plugin only.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
depend = property(get_dependencies, set_dependencies)
|
|||
version = property(get_version, set_version)
|
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
Generates the dependencies given a string. It's necesary for parsing the configuration file. |
Generates the version given a string. It's necesary for parsing the configuration file. |
This function initialize the plugin in such a way that it can used.
It will be called in two cases:
1. When the plugin is disabled and it's going to be enabled by the
admins of the aplication. In this case the install function will
also be called if the plugin has not previously been
installed.
2. Once the plugin is already enabled and installed the pluginmanager
will instanciate the plugin and then will call this enable
function. This is because the enable function will always before
the plugin can be used.
You can reimplement this function if you want to execute custom
actions when your plugin is going to be used.
|
This function will be called when the plugin is enabled and it's going to be disabled by the admins of the aplication. It is called only by the pluginmanager. WARNING: Note that disable will NOT be called when the application shutdowns. Use __del__ for that. You can reimplement this function if you want to execute custom actions when your plugin is going to be disabled. |
This function will be called when the plugin is enabled the first time. You can reimplement this function if you want to install some tables in the data base, or to do something only once. |
This function will be called when the user wants to delete the plugin from the system. You can reimplement this function like a cleanup function. You MUST erase all data that plugin generated when it's not goint to be used ever. For example all tables in the data base or data generated in install function. |
Request a GET or a POST petition to the plugin. Redirects a url to a view inside the plugin and returns the data that the appropiate view returns. The "method" argument can be either "GET" or "POST". This function is ONLY called by PluginView. When a request of type /plugin/<plugin_name>/<args> is received, PluginView deals with it and acts as a proxy, calling to this _request function of the plugin called "plugin_name", with args= "args". Each plugin deals with GET and POST requests by configuring the self.url tuple of pairs url-regexp, view, as webpy applications do. |
This function has to return a form. This form contains the options of the plugin that the user can change. If you want options in your plugin you have to reimplement this function. Also you will want to reimplement save_options function which is called when the user submits. In the other hand if you don't need any options you haven't to do anything. |
This function is called when the user filles the form returned by get_options, which is passed like argument. It's useful to save the user preferences. You can reimplement this function. |
When the user navigates the organizative units tree structure it will a panel with plugins' actions. The navigator view will call this function for each plugin. You can reimplement this function to return the actions that you want the user see. The ou argument is the Organizative Unit that the user is seing. |
The same that get_actions_for_ou but when the user is seing only a computer. The computer argument is the Computer that the user is seing. |
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Wed Aug 4 09:57:30 2010 | http://epydoc.sourceforge.net |