Part of vmc.contrib.axiom.item View In Hierarchy
Known subclasses: vmc.contrib.axiom.item.Item, vmc.contrib.axiom.store.Store
Method | powerUp | Installs a powerup (e.g. plugin) on an item or store. |
Method | powerDown | Remove a powerup. |
Method | __conform__ | For 'normal' interfaces, returns the first powerup found when doing |
Method | powerupsFor | Returns powerups installed using powerUp , in order of
descending
|
Method | interfacesFor | Undocumented |
Installs a powerup (e.g. plugin) on an item or store.
Powerups will be returned in an iterator when queried for using the 'powerupsFor' method. Normally they will be returned in order of installation [this may change in future versions, so please don't depend on it]. Higher priorities are returned first. If you have something that should run before "normal" powerups, pass POWERUP_BEFORE; if you have something that should run after, pass POWERUP_AFTER. We suggest not depending too heavily on order of execution of your powerups, but if finer-grained control is necessary you may pass any integer. Normal (unspecified) priority is zero.
Powerups will only be installed once on a given item. If you install a powerup for a given interface with priority 1, then again with priority 30, the powerup will be adjusted to priority 30 but future calls to powerupFor will still only return that powerup once.Parameters | powerup | an Item that implements interface
|
interface | a zope interface | |
priority | An int; preferably either POWERUP_BEFORE, POWERUP_AFTER, or unspecified. | |
Raises | TypeError | raises if interface is IPowerupIndirector You may not install a powerup for IPowerupIndirector because that would be nonsensical. |
For 'normal' interfaces, returns the first powerup found when doing self.powerupsFor(interface).
Certain interfaces are special - IService from twisted.application being the main special case - and will be aggregated according to special rules. The full list of such interfaces is present in the 'aggregateInterfaces' class attribute.