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

Type ImportStepRegistry

object --+        
         |        
      Base --+    
             |    
      Acquirer --+
                 |
                ImportStepRegistry


Manage knowledge about steps to create / configure site.

o Steps are composed together to define a site profile.
Method Summary
  __init__(self)
  checkComplete(self)
Return a sequence of ( node, edge ) tuples for unsatisifed deps.
  clear(self)
  generateXML(self)
Return a round-trippable XML representation of the registry.
  getStep(self, key, default)
Return the IImportPlugin 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 sequence of IDs of registered steps.
  parseXML(self, text, encoding)
Parse 'text'.
  registerStep(self, id, version, handler, dependencies, title, description)
Register a setup step.
  sortSteps(self)
Return a sequence of registered step IDs o Sequence is sorted topologically by dependency, with the dependent steps *after* the steps they depend on.
    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', 's...
tuple __implements__ = (<Interface CMFSetup.interfaces.IImport...
tuple _computeTopologicalSort__roles__ = ()
tuple _exportTemplate__roles__ = ()
PermissionRole checkComplete__roles__ = <PermissionRole object at 0xb58...
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 0xb58e683...
tuple parseXML__roles__ = ()
tuple registerStep__roles__ = ()
PermissionRole sortSteps__roles__ = <PermissionRole object at 0xb58e683...

Method Details

checkComplete(self)

Return a sequence of ( node, edge ) tuples for unsatisifed deps.

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 IImportPlugin 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 Mappings will be ordered alphabetically.

listSteps(self)

Return a sequence of IDs of registered steps.

o Order is not significant.

parseXML(self, text, encoding=None)

Parse 'text'.

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

Register a setup step.

o 'id' is a unique name for this step,

o 'version' is a string for comparing versions, it is preferred to
  be a yyyy/mm/dd-ii formatted string (date plus two-digit
  ordinal).  when comparing two version strings, the version with
  the lower sort order is considered the older version.

  - Newer versions of a step supplant older ones.

  - Attempting to register an older one after a newer one results
    in a KeyError.

o 'handler' should implement IImportPlugin.

o 'dependencies' is a tuple of step ids which have to run before
  this step in order to be able to run at all. Registration of
  steps that have unmet dependencies are deferred until the
  dependencies have been registered.

o 'title' is a one-line UI description for this step.
  If None, the first line of the documentation string of the handler
  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 handler is used, or default to ''.

sortSteps(self)

Return a sequence of registered step IDs

o Sequence is sorted topologically by dependency, with the dependent
  steps *after* the steps they depend on.

Class Variable Details

__ac_permissions__

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

__implements__

Type:
tuple
Value:
(<Interface CMFSetup.interfaces.IImportStepRegistry at b588d98c>,)     

_computeTopologicalSort__roles__

Type:
tuple
Value:
()                                                                     

_exportTemplate__roles__

Type:
tuple
Value:
()                                                                     

checkComplete__roles__

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

clear__roles__

Type:
tuple
Value:
()                                                                     

generateXML__roles__

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

getStep__roles__

Type:
tuple
Value:
()                                                                     

getStepMetadata__roles__

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

listStepMetadata__roles__

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

listSteps__roles__

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

parseXML__roles__

Type:
tuple
Value:
()                                                                     

registerStep__roles__

Type:
tuple
Value:
()                                                                     

sortSteps__roles__

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

Generated by Epydoc 2.1 on Wed Nov 30 04:00:13 2005 http://epydoc.sf.net