Edgewall Software

Changes between Version 9 and Version 10 of TracDev/ComponentArchitecture


Ignore:
Timestamp:
Jul 4, 2007, 4:31:40 PM (17 years ago)
Author:
Christian Boos
Comment:

Replying to Dave: implementing an Interface and declaring an extension point for an Interface are completely orthogonal; a Component can do one or the other, or both for a given Interface.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/ComponentArchitecture

    v9 v10  
    175175}}}
    176176
    177 Note that it has a list of extension points implementing {{{IPermissionRequestor}}} ([browser:trunk/trac/perm.py:r5790#L40 in context]):
     177Note that this `Component`:
     178 1. implements the `IPermissionRequestor` interface
     179 1. has an extension point for registering all the Components implementing {{{IPermissionRequestor}}} ([browser:trunk/trac/perm.py:r5790#L40 in context]):
    178180{{{
    179181#!python
     
    188190
    189191When we use {{{PermissionSystem}}}, the plugin system will have automatically gathered up all implementations of {{{IPermissionRequestor}}} and placed them in {{{PermissionSystem}}}'s list of {{{requestors}}}.
    190 
    191  '''Notes that I hope a Trac dev will check:'''
    192    * ''As far as I understand,the line in {{{PermissionSystem}}} that declares it to implement {{{IPermissionRequestor}}} is completely superfluous except for documentation purposes, because it will always be used directly''
    193    * ''Does something avoid putting {{{PermissionSystem}}} in its own list?'' [[br]]—dave
     192In this specific case `PermissionSystem` will be part of that list as well, because it implements that interface as well. In no way a Component is bound to implement the interfaces it declares an extension point for, the two operations being entirely independent. But when that make sense, it's entirely possible to do so.
    194193
    195194Next in {{{PermissionSystem}}} there is a declaration of an {{{ExtensionOption}}} called {{{store}}}: