| Trees | Indices | Help |
|
|---|
|
|
License: The BSD License All rights reserved. This program and the accompanying materials are made available under the terms of the BSD license which accompanies this distribution, and is available at http://www.opensource.org/licenses/bsd-license.php
|
|||
|
AdaptationError Error raised when a suitable adapter could not be found. |
|||
|
Interface Base class for all interfaces. |
|||
|
AEAccAdapter Base class for all adapter classes. |
|||
|
PORAdapter Convenience base class for AEAccAdapters for AEPors. |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Registers all AEAccAdapters in the caller's local namespace. An adapter must be a class deriving from AEAccAdapter and should have a class variable named provides containing a list of Interfaces that the adapter implements. An adapter can also expose a when attribute containing a condition under which the adapter can be used. If when is not given, the adapter is used as the default for the given interface. Only one default may be registered per interface.Note: This function uses a small hack to get the caller's locals. This hack can be removed in favor of the caller passing in its locals dictionary explicitly, but that places more responsibility on the caller who may already forget to call this function to begin with. |
Adds an adapter to the registry. If condition is specified, the adapter is added to the _adapters dictionary. If no condition is given, the adapter is set as the default for the given interface in the _default_adapters dictionary.
|
Gets an appropriate adapter to the desired interface for the given subject. First tries to find an AEAccAdapter to the Interface by satisfying one of the conditions of the registered AEAccAdapters. If that fails, trys to use a default AEAccAdapter to the Interface. If no default is registered, raises an exception.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Mon Jun 30 13:05:46 2008 | http://epydoc.sourceforge.net |