Commit 175087e5 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Reviewed interface specification and comments.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30630 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eb8d253e
......@@ -29,22 +29,43 @@
"""
Products.ERP5.interfaces.rule
"""
from Products.ERP5.interfaces.movement_collection_updater import IMovementCollectionUpdater
from zope.interface import Interface
class IRule(Interface):
"""A Rule describes transformations of documents.
class IRule(IMovementCollectionUpdater):
"""Rule interface specification
Documents which implement IRule can be used to
expand applied rules in ERP5 simulation.
"""
def constructNewAppliedRule(context):
"""Create a new applied rule in the context.
def constructNewAppliedRule(self, context, id=None,
activate_kw=None, **kw):
"""
Create a new applied rule in the context.
An applied rule is an instanciation of a Rule. The applied rule is
linked to the Rule through the `specialise` relation.
context -- usually, a parent simulation movement of the
newly created applied rule
activate_kw -- activity parameters, required to control
activity constraints
kw -- XXX-JPS probably wrong interface specification
"""
def expand(applied_rule):
"""Expand this applied rule to create new documents inside the
applied rule.
def expand(applied_rule, **kw):
"""
Expand this applied rule to create new documents inside the
applied rule.
At expand time, we must replace or compensate certain
properties. However, if some properties were overwriten
by a decision (ie. a resource if changed), then we
should not try to compensate such a decision. The principles
of compensation are implemented through
IMovementCollectionUpdater API
kw -- XXX-JPS probably wrong interface specification
activate_kw should probably be defined explicitely here
"""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment