Utilisation des png24 (et apng) pour l'affichage des boutons de déploiement de l...
[MosaicDocument.git] / exportimport / mosaictool.py
1 from Products.CMFCore.utils import getToolByName
2 from Products.GenericSetup.utils import importObjects, exportObjects
3
4 def importMosaicTool(context):
5 """Import mosaic tool and content types from XML files.
6 """
7 site = context.getSite()
8 tool = getToolByName(site, 'mosaic_tool')
9
10 importObjects(tool, 'mosaic_tool/', context)
11
12 def exportMosaicTool(context):
13 """Export mosaic tool content types as a set of XML files.
14 """
15 site = context.getSite()
16 tool = getToolByName(site, 'mosaic_tool', None)
17 if tool is None:
18 logger = context.getLogger('mosaictool')
19 logger.info('Nothing to export.')
20 return
21
22 exportObjects(tool, 'mosaic_tool/', context)