Back to index

plone3  3.1.7
kssregistry.py
Go to the documentation of this file.
00001 from Products.ResourceRegistries.interfaces import IKSSRegistry
00002 
00003 from resourceregistry import ResourceRegistryNodeAdapter, \
00004      importResRegistry, exportResRegistry
00005 
00006 _FILENAME = 'kssregistry.xml'
00007 _REG_ID = 'portal_kss'
00008 _REG_TITLE = 'KSS registry'
00009 
00010 def importKSSRegistry(context):
00011     """
00012     Import KSS registry.
00013     """
00014     return importResRegistry(context, _REG_ID, _REG_TITLE, _FILENAME)
00015 
00016 def exportKSSRegistry(context):
00017     """
00018     Export KSS registry.
00019     """
00020     return exportResRegistry(context, _REG_ID, _REG_TITLE, _FILENAME)
00021 
00022 
00023 class KSSRegistryNodeAdapter(ResourceRegistryNodeAdapter):
00024     """
00025     Node im- and exporter for KSSRegistry.
00026     """
00027 
00028     __used_for__ = IKSSRegistry
00029     registry_id = _REG_ID
00030     resource_type = 'kineticstylesheet'
00031     register_method = 'registerKineticStylesheet'
00032     update_method = 'updateKineticStylesheet'