Back to index

plone3  3.1.7
Functions
plone.contentrules.engine.utils Namespace Reference

Functions

def getAvailableConditions
def allAvailableConditions
def getAvailableActions
def allAvailableActions

Function Documentation

Definition at line 21 of file utils.py.

00021 
00022 def allAvailableActions(eventType):
00023     actions = getAllUtilitiesRegisteredFor(IRuleAction)
00024     return [a for a in actions if 
                (a.event is None or eventType.isOrExtends(a.event))]

Definition at line 10 of file utils.py.

00010 
00011 def allAvailableConditions(eventType):
00012     conditions = getAllUtilitiesRegisteredFor(IRuleCondition)
00013     return [c for c in conditions if 
00014                 (c.event is None or eventType.isOrExtends(c.event))]
    
def plone.contentrules.engine.utils.getAvailableActions (   context,
  eventType 
)

Definition at line 15 of file utils.py.

00015 
00016 def getAvailableActions(context, eventType):
00017     actions = getAllUtilitiesRegisteredFor(IRuleAction)
00018     return [a for a in actions if 
00019                 (a.event is None or eventType.isOrExtends(a.event)) and
00020                 (a.for_ is None or a.for_.providedBy(context))]
    
def plone.contentrules.engine.utils.getAvailableConditions (   context,
  eventType 
)

Definition at line 4 of file utils.py.

00004 
00005 def getAvailableConditions(context, eventType):
00006     conditions = getAllUtilitiesRegisteredFor(IRuleCondition)
00007     return [c for c in conditions if 
00008                 (c.event is None or eventType.isOrExtends(c.event)) and
00009                 (c.for_ is None or c.for_.providedBy(context))]