Back to index

plone3  3.1.7
Public Member Functions | Public Attributes Class Reference

List of all members.

Public Member Functions

def __init__
def reset
def __call__

Public Attributes


Detailed Description

A filter which can prevent rules from being executed more than once
regardless of context.

Definition at line 16 of file

Constructor & Destructor Documentation

Definition at line 21 of file

00022     def __init__(self):
00023         self.reset()

Here is the call graph for this function:

Here is the caller graph for this function:

Member Function Documentation

def (   self,

Definition at line 28 of file

00029     def __call__(self, context, rule, event):
00030         obj = context
00031         if IObjectEvent.providedBy(event):
00032             obj = event.object
00034         uid_method = getattr(obj, 'UID', None)
00035         if uid_method is not None:
00036             uid = uid_method()
00037         else:
00038             uid = '/'.join(context.getPhysicalPath())
00039         if (uid, rule.__name__,) in self.executed:
00040             return False
00041         else:
00042             self.executed.add((uid, rule.__name__,))
00043             return True
# A thread local for keeping track of rule execution across events

Here is the caller graph for this function:

Definition at line 24 of file

00025     def reset(self):
00026         self.executed = set()
00027         self.in_progress = False

Here is the caller graph for this function:

Member Data Documentation

Definition at line 25 of file

Definition at line 26 of file

The documentation for this class was generated from the following file: