Back to index

plone3  3.1.7
Private Member Functions | Static Private Attributes
CMFPlone.exportimport.factorytool.PortalFactoryXMLAdapter Class Reference
Inheritance diagram for CMFPlone.exportimport.factorytool.PortalFactoryXMLAdapter:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.exportimport.factorytool.PortalFactoryXMLAdapter:
Collaboration graph
[legend]

List of all members.

Private Member Functions

def _exportNode
def _importNode
def _purgeFactoryToolSettings
def _initFactoryToolSettings
def _extractFactoryToolSettings

Static Private Attributes

 __used_for__ = IFactoryTool
string _LOGGER_ID = 'factorytool'

Detailed Description

In- and exporter for FactoryTool.

Definition at line 13 of file factorytool.py.


Member Function Documentation

Export the object as a DOM node.

Definition at line 21 of file factorytool.py.

00021 
00022     def _exportNode(self):
00023         """Export the object as a DOM node.
00024         """
00025         node = self._getObjectNode("object")
00026         node.appendChild(self._extractFactoryToolSettings())
00027 
00028         self._logger.info("FactoryTool settings exported.")
00029         return node

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 51 of file factorytool.py.

00051 
00052     def _extractFactoryToolSettings(self):
00053         node=self._doc.createElement("factorytypes")
00054         for type in self.context.getFactoryTypes():
00055             child=self._doc.createElement("type")
00056             child.setAttribute("portal_type", type)
00057             node.appendChild(child)
00058 
00059         return node
00060 

Here is the caller graph for this function:

Definition at line 30 of file factorytool.py.

00030 
00031     def _importNode(self, node):
00032         if self.environ.shouldPurge():
00033             self._purgeFactoryToolSettings()
00034 
00035         self._initFactoryToolSettings(node)
00036         self._logger.info("FactoryTool settings imported.")

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 41 of file factorytool.py.

00041 
00042     def _initFactoryToolSettings(self, node):
00043         for child in node.childNodes:
00044             if child.nodeName=="factorytypes":
00045                 types=set(self.context.getFactoryTypes())
00046                 for type in child.getElementsByTagName("type"):
00047                     types.add(type.getAttribute("portal_type"))
00048                 self.context.manage_setPortalFactoryTypes(
00049                                     listOfTypeIds=list(types))
00050 

Here is the caller graph for this function:

Definition at line 37 of file factorytool.py.

00037 
00038     def _purgeFactoryToolSettings(self):
00039         self.context.manage_setPortalFactoryTypes(listOfTypeIds=[])
00040 

Here is the caller graph for this function:


Member Data Documentation

Definition at line 17 of file factorytool.py.

Definition at line 19 of file factorytool.py.


The documentation for this class was generated from the following file: