Package CMFSetup :: Module registry :: Class ExportStepRegistry
[show private | hide private]
[frames | no frames]

Type ExportStepRegistry

object --+        
         |        
      Base --+    
             |    
      Acquirer --+
                 |
                ExportStepRegistry


Registry of known site-configuration export steps.

o Each step is registered with a unique id.

o When called, with the portal object passed in as an argument,
  the step must return a sequence of three-tuples,
  ( 'data', 'content_type', 'filename' ), one for each file exported
  by the step.

  - 'data' is a string containing the file data;

  - 'content_type' is the MIME type of the data;

  - 'filename' is a suggested filename for use when downloading.

Method Summary
  __init__(self)
  clear(self)
  generateXML(self)
Return a round-trippable XML representation of the registry.
  getStep(self, key, default)
Return the IExportPlugin registered for 'key'.
  getStepMetadata(self, key, default)
Return a mapping of metadata for the step identified by 'key'.
  listStepMetadata(self)
Return a sequence of mappings describing registered steps.
  listSteps(self)
Return a list of registered step IDs.
  parseXML(self, text, encoding)
Parse 'text'.
  registerStep(self, id, handler, title, description)
Register an export step.
    Inherited from Base
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __getnewargs__(...)
Get arguments to be passed to __new__
  __getstate__(...)
Get the object serialization state
  __reduce__(...)
Reduce an object to contituent parts for serialization
  __setstate__(...)
Set the object serialization state The state should be in one of 3 forms: - None Ignored - A dictionary In this case, the object's instance dictionary will be cleared and updated with the new state.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
tuple __ac_permissions__ = (('Manage portal', ('listSteps', 'l...
tuple __implements__ = (<Interface CMFSetup.interfaces.IExport...
tuple _exportTemplate__roles__ = ()
tuple clear__roles__ = ()
PermissionRole generateXML__roles__ = <PermissionRole object at 0xb58e6...
tuple getStep__roles__ = ()
PermissionRole getStepMetadata__roles__ = <PermissionRole object at 0xb...
PermissionRole listStepMetadata__roles__ = <PermissionRole object at 0x...
PermissionRole listSteps__roles__ = <PermissionRole object at 0xb58e677...
tuple parseXML__roles__ = ()
tuple registerStep__roles__ = ()

Method Details

generateXML(self)

Return a round-trippable XML representation of the registry.

o 'handler' values are serialized using their dotted names.

getStep(self, key, default=None)

Return the IExportPlugin registered for 'key'.

o Return 'default' if no such step is registered.

getStepMetadata(self, key, default=None)

Return a mapping of metadata for the step identified by 'key'.

o Return 'default' if no such step is registered.

o The 'handler' metadata is available via 'getStep'.

listStepMetadata(self)

Return a sequence of mappings describing registered steps.

o Steps will be alphabetical by ID.

listSteps(self)

Return a list of registered step IDs.

parseXML(self, text, encoding=None)

Parse 'text'.

registerStep(self, id, handler, title=None, description=None)

Register an export step.

o 'id' is the unique identifier for this step

o 'step' should implement IExportPlugin.

o 'title' is a one-line UI description for this step.
  If None, the first line of the documentation string of the step
  is used, or the id if no docstring can be found.

o 'description' is a one-line UI description for this step.
  If None, the remaining line of the documentation string of
  the step is used, or default to ''.

Class Variable Details

__ac_permissions__

Type:
tuple
Value:
(('Manage portal',
  ('listSteps', 'listStepMetadata', 'generateXML', 'getStepMetadata'))\
,)                                                                     

__implements__

Type:
tuple
Value:
(<Interface CMFSetup.interfaces.IExportStepRegistry at b588daac>,)     

_exportTemplate__roles__

Type:
tuple
Value:
()                                                                     

clear__roles__

Type:
tuple
Value:
()                                                                     

generateXML__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xb58e6770>                                  

getStep__roles__

Type:
tuple
Value:
()                                                                     

getStepMetadata__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xb58e6770>                                  

listStepMetadata__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xb58e6770>                                  

listSteps__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xb58e6770>                                  

parseXML__roles__

Type:
tuple
Value:
()                                                                     

registerStep__roles__

Type:
tuple
Value:
()                                                                     

Generated by Epydoc 2.1 on Wed Nov 30 03:58:05 2005 http://epydoc.sf.net