|
2 | 2 | Customising Roundup |
3 | 3 | =================== |
4 | 4 |
|
5 | | -:Version: $Revision: 1.133 $ |
| 5 | +:Version: $Revision: 1.134 $ |
6 | 6 |
|
7 | 7 | .. This document borrows from the ZopeBook section on ZPT. The original is at: |
8 | 8 | http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx |
@@ -585,6 +585,45 @@ interface for detectors. |
585 | 585 |
|
586 | 586 | __ design.html |
587 | 587 |
|
| 588 | + |
| 589 | +Detector API |
| 590 | +------------ |
| 591 | + |
| 592 | +Auditors are called with the arguments:: |
| 593 | + |
| 594 | + audit(db, cl, itemid, newdata) |
| 595 | + |
| 596 | +where ``db`` is the database, ``cl`` is an instance of Class or |
| 597 | +IssueClass within the database, and ``newdata`` is a dictionary mapping |
| 598 | +property names to values. |
| 599 | + |
| 600 | +For a ``create()`` operation, the ``itemid`` argument is None and |
| 601 | +newdata contains all of the initial property values with which the item |
| 602 | +is about to be created. |
| 603 | + |
| 604 | +For a ``set()`` operation, newdata contains only the names and values of |
| 605 | +properties that are about to be changed. |
| 606 | + |
| 607 | +For a ``retire()`` or ``restore()`` operation, newdata is None. |
| 608 | + |
| 609 | +Reactors are called with the arguments:: |
| 610 | + |
| 611 | + react(db, cl, itemid, olddata) |
| 612 | + |
| 613 | +where ``db`` is the database, ``cl`` is an instance of Class or |
| 614 | +IssueClass within the database, and ``olddata`` is a dictionary mapping |
| 615 | +property names to values. |
| 616 | + |
| 617 | +For a ``create()`` operation, the ``itemid`` argument is the id of the |
| 618 | +newly-created item and ``olddata`` is None. |
| 619 | + |
| 620 | +For a ``set()`` operation, ``olddata`` contains the names and previous |
| 621 | +values of properties that were changed. |
| 622 | + |
| 623 | +For a ``retire()`` or ``restore()`` operation, ``itemid`` is the id of |
| 624 | +the retired or restored item and ``olddata`` is None. |
| 625 | + |
| 626 | + |
588 | 627 | Additional Detectors Ready For Use |
589 | 628 | ---------------------------------- |
590 | 629 |
|
|
0 commit comments