[Erp5-report] r15670 - /erp5/trunk/products/ERP5SyncML/Interface/IConduit.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Aug 14 16:01:50 CEST 2007
Author: fabien
Date: Tue Aug 14 16:01:50 2007
New Revision: 15670
URL: http://svn.erp5.org?rev=15670&view=rev
Log:
add an interface for Conduits
Added:
erp5/trunk/products/ERP5SyncML/Interface/IConduit.py
Added: erp5/trunk/products/ERP5SyncML/Interface/IConduit.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Interface/IConduit.py?rev=15670&view=auto
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Interface/IConduit.py (added)
+++ erp5/trunk/products/ERP5SyncML/Interface/IConduit.py Tue Aug 14 16:01:50 2007
@@ -1,0 +1,90 @@
+##############################################################################
+#
+# Copyright (c) 2007 Nexedi SARL and Contributors. All Rights Reserved.
+# Fabien Morin <fabien.morin at gmail.com>
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+##############################################################################
+
+try:
+ from Interface import Interface
+except ImportError:
+ # for Zope versions before 2.6.0
+ from Interface import Base as Interface
+
+class IConduit(Interface):
+ """
+ A conduit is a piece of code in charge of
+
+ - updating an object attributes from an XUpdate XML stream
+
+ (Conduits are not in charge of creating new objects which
+ are eventually missing in a synchronisation process)
+
+ If an object has be created during a synchronisation process,
+ the way to proceed consists in:
+
+ 1- creating an empty instance of the appropriate class
+ in the appropriate directory
+
+ 2- updating that empty instance with the conduit
+
+ The first implementation of ERP5 synchronisation
+ will define a default location to create new objects and
+ a default class. This will be defined at the level of the synchronisation
+ tool
+
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
+ Look carefully when we are adding elements,
+ for example, when we do 'insert-after', with 2 xupdate:element,
+ so adding 2 differents objects, actually it adds only XXXX one XXX object
+ In this case the getSubObjectDepth(), doesn't have
+ too much sence
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ There is also one problem, when we synchronize a conflict,
+ we are not waiting
+ the response of the client, so that we are not sure if it take into account,
+ we may have CONFLICT_NOT_SYNCHRONIZED AND CONFLICT_SYNCHRONIZED
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ """
+
+ def __init__(self):
+ self.args = {}
+
+ def addNode():
+ """
+ A node is added
+ """
+
+ def deleteNode():
+ """
+ A node is deleted
+ """
+
+ def updateNode():
+ """
+ A node is updated with some xupdate
+ """
+
More information about the Erp5-report
mailing list