Commit 8850da63 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

implement SolverTool.getSolverDecisionApplicationValueList() in "Short Term...

implement SolverTool.getSolverDecisionApplicationValueList() in "Short Term Implementation Approach".


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31368 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 65df6db9
...@@ -196,19 +196,23 @@ class SolverTool(BaseTool): ...@@ -196,19 +196,23 @@ class SolverTool(BaseTool):
of the interface definition. of the interface definition.
""" """
# Short Term Implementation Approach # Short Term Implementation Approach
test_property = divergence_tester.getTestedProperty()
application_value = movement
try:
while not application_value.hasProperty(test_property):
application_value = application_value.getParentValue()
except AttributeError:
# if missing, it should be in Delivery level ?
application_value = movement.getDeliveryValue()
return [application_value]
# Alternate short Term Implementation Approach
return self.SolverTool_getSolverDecisionApplicationValueList(movement, divergence_tester) return self.SolverTool_getSolverDecisionApplicationValueList(movement, divergence_tester)
# Alternate short Term Implementation Approach # Alternate short Term Implementation Approach
return divergence_tester.getTypeBasedMethod('getSolverDecisionApplicationValueList')( return divergence_tester.getTypeBasedMethod('getSolverDecisionApplicationValueList')(
movement, divergence_tester) movement, divergence_tester)
# Alternate short Term Implementation Approach
test_property = divergence_tester.getTestedProperty()
application_value = movement
while not application_value.hasProperty(test_property):
application_value = application_value.getParentValue()
return application_value
# Mid-term implementation (we suppose movement is a delivery) # Mid-term implementation (we suppose movement is a delivery)
# use delivery builders to find out at which level the given # use delivery builders to find out at which level the given
# property can be modified # property can be modified
......
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