Back to index

plone3  3.1.7
Classes | Functions | Variables
plone.contentrules.engine.assignments Namespace Reference

Classes

class  RuleAssignment
class  RuleAssignmentManager

Functions

def ruleAssignmentManagerAdapterFactory

Variables

string KEY = 'plone.contentrules.localassignments'

Function Documentation

When adapting an IRuleAssignable, get an IRuleAssignmentManager by 
finding one in the object's annotations. The container will be created 
if necessary.

Definition at line 54 of file assignments.py.

00054 
00055 def ruleAssignmentManagerAdapterFactory(context):
00056     """When adapting an IRuleAssignable, get an IRuleAssignmentManager by 
00057     finding one in the object's annotations. The container will be created 
00058     if necessary.
00059     """
00060     annotations = IAnnotations(context)
00061     manager = annotations.get(KEY, None)
00062     if manager is None:
00063         manager = annotations[KEY] = RuleAssignmentManager()
    return manager

Variable Documentation

string plone.contentrules.engine.assignments.KEY = 'plone.contentrules.localassignments'

Definition at line 17 of file assignments.py.