[doc/book] talk about the existing categories stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 16 Apr 2010 19:24:24 +0200
branchstable
changeset 5318 81cd2540c7d2
parent 5317 ab757d9be796
child 5319 9b1b7020d179
[doc/book] talk about the existing categories
doc/book/en/development/devrepo/hooks.rst
--- a/doc/book/en/development/devrepo/hooks.rst	Fri Apr 16 17:52:31 2010 +0200
+++ b/doc/book/en/development/devrepo/hooks.rst	Fri Apr 16 19:24:24 2010 +0200
@@ -41,7 +41,7 @@
 
 * implement computed attributes
 
-Operations are Hook-like objects that maye be created by Hooks and
+Operations are Hook-like objects that may be created by Hooks and
 scheduled to happen just before (or after) the `commit` event. Hooks
 being fired immediately on data operations, it is sometime necessary
 to delay the actual work down to a time where all other Hooks have
@@ -56,7 +56,7 @@
 
 Operations are subclasses of the Operation class in `server/hook.py`,
 implementing `precommit_event` and other standard methods (wholly
-described later in this chapter).
+described in :ref:`operations_api`).
 
 Events
 ------
@@ -219,6 +219,7 @@
 is no self.entity, but `self.eidfrom` and `self.eidto` hook attributes
 which represent the subject and object eid of the relation.
 
+
 Using Operations
 ----------------
 
@@ -325,6 +326,8 @@
   A more realistic example can be found in the advanced tutorial
   chapter :ref:`adv_tuto_security_propagation`.
 
+.. _operations_api:
+
 Operation: a small API overview
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -416,7 +419,7 @@
 manager.
 
 This can be controlled more finely through the `category` Hook class
-attribute.
+attribute, which is a string.
 
 .. sourcecode:: python
 
@@ -424,3 +427,10 @@
        # ... do stuff
 
 .. autoclass:: cubicweb.server.session.hooks_control
+
+The existing categories are: ``email``, ``syncsession``,
+``syncschema``, ``bookmark``, ``security``, ``worfklow``,
+``metadata``, ``notification``, ``integrity``, ``activeintegrity``.
+
+Nothing precludes one to invent new categories and use the
+hooks_control context manager to filter them (in or out).