Changeset 5658


Ignore:
Timestamp:
24 Jan 2011, 22:35:32 (14 years ago)
Author:
uli
Message:

Tell more about the plugin mechanism.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py

    r5476 r5658  
    240240class IWAeUPSIRPPluggable(Interface):
    241241    """A component that might be plugged into a WAeUP SIRP app.
     242
     243    Components implementing this interface are referred to as
     244    'plugins'. They are normally called when a new
     245    :class:`waeup.sirp.app.University` instance is created.
     246
     247    Plugins can setup and update parts of the central site without the
     248    site object (normally a :class:`waeup.sirp.app.University` object)
     249    needing to know about that parts. The site simply collects all
     250    available plugins, calls them and the plugins care for their
     251    respective subarea like the applications area or the datacenter
     252    area.
     253
     254    Currently we have no mechanism to define an order of plugins. A
     255    plugin should therefore make no assumptions about the state of the
     256    site or other plugins being run before and instead do appropriate
     257    checks if necessary.
     258
     259    Updates can be triggered for instance by the respective form in
     260    the site configuration. You normally do updates when the
     261    underlying software changed.
    242262    """
    243263    def setup(site, name, logger):
    244264        """Create an instance of the plugin.
    245265
    246         The method is meant to be called by the central app on startup.
     266        The method is meant to be called by the central app (site)
     267        when it is created.
     268
     269        `site`:
     270           The site that requests a setup.
     271
     272        `name`:
     273           The name under which the plugin was registered (utility name).
     274
     275        `logger`:
     276           A standard Python logger for the plugins use.
    247277        """
    248278
     
    251281
    252282        This might be called by a site when something serious
    253         changes. It is a poor-man replacement for Zope generations.
    254         """
     283        changes. It is a poor-man replacement for Zope generations
     284        (but probably more comprehensive and better understandable).
     285
     286        `site`:
     287           The site that requests an update.
     288
     289        `name`:
     290           The name under which the plugin was registered (utility name).
     291
     292        `logger`:
     293           A standard Python logger for the plugins use.
     294        """
Note: See TracChangeset for help on using the changeset viewer.