From 0764d781cbf603a0637cc6fd3cf354d3b73fdd8f Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Sat, 7 Nov 2009 09:45:16 +0000
Subject: [PATCH] First version of target_solver refactored interface. Names do
 not conflict with existing solvers because target solvers are now ERP5
 Documents.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30380 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/interfaces/target_solver.py | 46 ++++++++++++++++++++++--
 1 file changed, 43 insertions(+), 3 deletions(-)

diff --git a/product/ERP5/interfaces/target_solver.py b/product/ERP5/interfaces/target_solver.py
index cd982cf3c0..eedc1c3633 100644
--- a/product/ERP5/interfaces/target_solver.py
+++ b/product/ERP5/interfaces/target_solver.py
@@ -30,6 +30,46 @@
 from zope.interface import Interface
 
 class ITargetSolver(Interface):
-  """Solves changes of properties up to simulation tree with taking proper decisions"""
-  # placeholder to define
-  pass
+  """Target Solver interface specification
+
+  This interface must be implemented by all target solvers
+  which are used to solve divergences in ERP5 simulation. Documents
+  which implemet ITargetSolver provide a solve method.
+
+  Besides ITargetSolver static interface definition, target solvers
+  must support IDeliveryGetter to access simulation movements to solve.
+
+  TODO-XXX: 
+    - find a way to make static interfaces inherit from
+      dynamic interfaces in ERP5 (ex. solver process workflow)
+    - IDeliveryGetter is not appropriate name / interface
+    - find a way to define at which level to solve divergences
+      (ex. line, delivery)
+  """
+  def solve():
+    """
+    Start the solving process (and trigger the workflow method
+    in solver_process_workflow). At the end the solving process,
+    appropriate methods of the solver_process_workflow must be invoked
+    (ex. succeed, fail, abort).
+    """
+
+  def isSolving():
+    """
+    Returns True if the solver processing in ongoing. False else.
+    """
+
+  def isSolved():
+    """
+    Returns True if all divergences are solved, False else.
+    """
+
+  def isFailed():
+    """
+    Returns True if divergence resolution fails. False else.
+    """
+
+  def isAborted():
+    """
+    Returns True if divergence resolution was aborted. False else.
+    """
\ No newline at end of file
-- 
2.30.9