doc/book/en/devrepo/entityclasses/adapters.rst
branchstable
changeset 6157 81ae5bc958db
parent 6152 6824f8b61098
child 6324 bdb85e3602c8
--- a/doc/book/en/devrepo/entityclasses/adapters.rst	Thu Aug 26 10:52:25 2010 +0200
+++ b/doc/book/en/devrepo/entityclasses/adapters.rst	Thu Aug 26 10:52:59 2010 +0200
@@ -42,6 +42,16 @@
 The adapter object has ``self.entity`` attribute which represents the
 entity being adapted.
 
+.. Note::
+
+   Adapters came with the notion of service identified by the registry identifier
+   of an adapters, hence dropping the need for explicit interface and the
+   :class:`cubicweb.selectors.implements` selector. You should instead use
+   :class:`cubicweb.selectors.is_instance` when you want to select on an entity
+   type, or :class:`cubicweb.selectors.adaptable` when you want to select on a
+   service.
+
+
 Specializing and binding an adapter
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -61,12 +71,6 @@
 ``MyEntity`` entity type (the `adaptee`).
 
 
-Selecting on an adapter
-~~~~~~~~~~~~~~~~~~~~~~~
-
-There is an ``adaptable`` selector which can be used instead of
-``implements``.
-
 .. _interfaces_to_adapters:
 
 Converting code from Interfaces/Mixins to Adapters
@@ -94,11 +98,11 @@
 
 .. sourcecode:: python
 
-    from cubicweb.selectors import adaptable, implements
+    from cubicweb.selectors import adaptable, is_instance
     from cubicweb.entities.adapters import ITreeAdapter
 
     class MyEntityITreeAdapter(ITreeAdapter):
-        __select__ = implements('MyEntity')
+        __select__ = is_instance('MyEntity')
 
     class ITreeView(EntityView):
         __select__ = adaptable('ITree')