[CMF-checkins] SVN: CMF/trunk/GenericSetup/ - small refactoring
that hopefully makes it easier to understand the code
Yvo Schubbe
y.2005- at wcm-solutions.de
Fri Dec 30 08:48:39 EST 2005
Log message for revision 41057:
- small refactoring that hopefully makes it easier to understand the code
Changed:
U CMF/trunk/GenericSetup/PluginIndexes/exportimport.py
U CMF/trunk/GenericSetup/utils.py
-=-
Modified: CMF/trunk/GenericSetup/PluginIndexes/exportimport.py
===================================================================
--- CMF/trunk/GenericSetup/PluginIndexes/exportimport.py 2005-12-29 23:40:57 UTC (rev 41056)
+++ CMF/trunk/GenericSetup/PluginIndexes/exportimport.py 2005-12-30 13:48:38 UTC (rev 41057)
@@ -125,7 +125,7 @@
"""
return self._getObjectNode('index')
- node = property(_exportNode, NodeAdapterBase._importNode)
+ node = property(_exportNode, lambda self, val: None)
class VocabularyNodeAdapter(NodeAdapterBase):
@@ -142,7 +142,7 @@
node.setAttribute('deprecated', 'True')
return node
- node = property(_exportNode, NodeAdapterBase._importNode)
+ node = property(_exportNode, lambda self, val: None)
class TextIndexNodeAdapter(NodeAdapterBase):
@@ -159,7 +159,7 @@
node.setAttribute('deprecated', 'True')
return node
- node = property(_exportNode, NodeAdapterBase._importNode)
+ node = property(_exportNode, lambda self, val: None)
class FilteredSetNodeAdapter(NodeAdapterBase):
Modified: CMF/trunk/GenericSetup/utils.py
===================================================================
--- CMF/trunk/GenericSetup/utils.py 2005-12-29 23:40:57 UTC (rev 41056)
+++ CMF/trunk/GenericSetup/utils.py 2005-12-30 13:48:38 UTC (rev 41057)
@@ -426,17 +426,6 @@
self._logger = environ.getLogger(self._LOGGER_ID)
self._doc = PrettyDocument()
- def _exportNode(self):
- """Export the object as a DOM node.
- """
- return self._getObjectNode('object', False)
-
- def _importNode(self, node):
- """Import the object from the DOM node.
- """
-
- node = property(_exportNode, _importNode)
-
def _getObjectNode(self, name, i18n=True):
node = self._doc.createElement(name)
node.setAttribute('name', self.context.getId())
@@ -467,6 +456,17 @@
implements(IBody)
+ def _exportSimpleNode(self):
+ """Export the object as a DOM node.
+ """
+ return self._getObjectNode('object', False)
+
+ def _importSimpleNode(self, node):
+ """Import the object from the DOM node.
+ """
+
+ node = property(_exportSimpleNode, _importSimpleNode)
+
def _exportBody(self):
"""Export the object as a file body.
"""
More information about the CMF-checkins
mailing list