Back to index

plone3  3.1.7
storage.py
Go to the documentation of this file.
00001 from zope.interface import implements
00002 from zope.app.container.ordered import OrderedContainer
00003 
00004 from plone.contentrules.engine.interfaces import IRuleStorage
00005 
00006 from BTrees.OOBTree import OOBTree
00007 
00008 class RuleStorage(OrderedContainer):
00009     """A container for rules.
00010     """
00011     
00012     implements(IRuleStorage)
00013 
00014     active = True
00015 
00016     def __init__(self):
00017         # XXX: This depends on implementation detail in OrderedContainer,
00018         # but it uses a PersistentDict, which sucks :-/
00019         OrderedContainer.__init__(self)
00020         self._data = OOBTree()