Back to index

plone3  3.1.7
Functions | Variables
CMFPlone.exportimport.memberdata_properties Namespace Reference

Functions

def importMemberDataProperties
def exportMemberDataProperties

Variables

string _FILENAME = 'memberdata_properties.xml'

Detailed Description

MemberData tool properties setup handlers.

$Id:$

Function Documentation

Export MemberData tool properties .

Definition at line 32 of file memberdata_properties.py.

00032 
00033 def exportMemberDataProperties(context):
00034     """ Export MemberData tool properties .
00035     """
00036     site = context.getSite()
00037     logger = context.getLogger('memberdata')
00038     ptool = getToolByName(site, 'portal_memberdata', None)
00039     if ptool is None:
00040         logger.info('Nothing to export.')
00041         return
00042 
00043     exporter = zapi.queryMultiAdapter((ptool, context), IBody)
00044     if exporter is None:
00045         logger.warning('Export adapter missing.')
00046         return
00047 
00048     context.writeDataFile(_FILENAME, exporter.body, exporter.mime_type)
00049     logger.info('MemberData tool exported.')
00050 

Here is the call graph for this function:

Import MemberData tool properties.

Definition at line 12 of file memberdata_properties.py.

00012 
00013 def importMemberDataProperties(context):
00014     """ Import MemberData tool properties.
00015     """
00016     site = context.getSite()
00017     logger = context.getLogger('memberdata')
00018     ptool = getToolByName(site, 'portal_memberdata')
00019 
00020     body = context.readDataFile(_FILENAME)
00021     if body is None:
00022         logger.info('Nothing to import.')
00023         return
00024 
00025     importer = zapi.queryMultiAdapter((ptool, context), IBody)
00026     if importer is None:
00027         logger.warning('Import adapter missing.')
00028         return
00029 
00030     importer.body = body
00031     logger.info('MemberData tool imported.')

Here is the call graph for this function:


Variable Documentation

string CMFPlone.exportimport.memberdata_properties._FILENAME = 'memberdata_properties.xml'

Definition at line 10 of file memberdata_properties.py.