Back to index

plone3  3.1.7
controllervalidator.py
Go to the documentation of this file.
00001 from Products.GenericSetup.PythonScripts.exportimport \
00002      import PythonScriptBodyAdapter
00003 
00004 from Products.CMFFormController.interfaces import IControllerValidator
00005 
00006 
00007 class ControllerValidatorBodyAdapter(PythonScriptBodyAdapter):
00008     """
00009     Body im- and exporter for ControllerPythonScript.
00010     """
00011     __used_for__ = IControllerValidator
00012 
00013     suffix = '.vpy'
00014 
00015     def _exportBody(self):
00016         """Export the object as a file body.  Don't export FS versions.
00017         """
00018         if self.context.meta_type == 'Controller Validator':
00019             return PythonScriptBodyAdapter._exportBody(self)
00020         return None
00021 
00022     body = property(_exportBody, PythonScriptBodyAdapter._importBody)