Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
GenericSetup.content.INIAwareFileAdapter Class Reference

List of all members.

Public Member Functions

def __init__
def export
def listExportableItems
def import_

Public Attributes

 context

Detailed Description

Exporter/importer for content whose "natural" representation is an
    '.ini' file.

Definition at line 281 of file content.py.


Constructor & Destructor Documentation

Definition at line 287 of file content.py.

00287 
00288     def __init__(self, context):
00289         self.context = context


Member Function Documentation

def GenericSetup.content.INIAwareFileAdapter.export (   self,
  export_context,
  subdir,
  root = False 
)
See IFilesystemExporter.

Definition at line 290 of file content.py.

00290 
00291     def export(self, export_context, subdir, root=False):
00292         """ See IFilesystemExporter.
00293         """
00294         export_context.writeDataFile('%s.ini' % self.context.getId(),
00295                                      self.context.as_ini(),
00296                                      'text/plain',
00297                                      subdir,
00298                                     )

def GenericSetup.content.INIAwareFileAdapter.import_ (   self,
  import_context,
  subdir,
  root = False 
)
See IFilesystemImporter.

Definition at line 304 of file content.py.

00304 
00305     def import_(self, import_context, subdir, root=False):
00306         """ See IFilesystemImporter.
00307         """
00308         cid = self.context.getId()
00309         data = import_context.readDataFile('%s.ini' % cid, subdir)
00310         if data is None:
00311             logger = import_context.getLogger('SGAIFA')
00312             logger.info('no .ini file for %s/%s' % (subdir, cid))
00313         else:
00314             self.context.put_ini(data)

See IFilesystemExporter.

Definition at line 299 of file content.py.

00299 
00300     def listExportableItems(self):
00301         """ See IFilesystemExporter.
00302         """
00303         return ()


Member Data Documentation

Definition at line 288 of file content.py.


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