Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Private Attributes
GenericSetup.registry.BaseStepRegistry Class Reference
Inheritance diagram for GenericSetup.registry.BaseStepRegistry:
Inheritance graph
[legend]
Collaboration diagram for GenericSetup.registry.BaseStepRegistry:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def listSteps
def getStepMetadata
def listStepMetadata
def generateXML
def getStep
def unregisterStep
def clear
def parseXML

Static Public Attributes

tuple security = ClassSecurityInfo()

Private Attributes

 _registered

Detailed Description

Definition at line 229 of file registry.py.


Constructor & Destructor Documentation

Definition at line 233 of file registry.py.

00233 
00234     def __init__( self ):
00235 
00236         self.clear()

Here is the call graph for this function:


Member Function Documentation

Definition at line 305 of file registry.py.

00305 
00306     def clear( self ):
00307 
00308         self._registered = {}

Here is the caller graph for this function:

Return a round-trippable XML representation of the registry.

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

Definition at line 277 of file registry.py.

00277 
00278     def generateXML( self ):
00279 
00280         """ Return a round-trippable XML representation of the registry.
00281 
00282         o 'handler' values are serialized using their dotted names.
00283         """
00284         return self._exportTemplate()

def GenericSetup.registry.BaseStepRegistry.getStep (   self,
  key,
  default = None 
)
Return the I(Export|Import)Plugin registered for 'key'.

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

Definition at line 286 of file registry.py.

00286 
00287     def getStep( self, key, default=None ):
00288 
00289         """ Return the I(Export|Import)Plugin registered for 'key'.
00290 
00291         o Return 'default' if no such step is registered.
00292         """
00293         marker = object()
00294         info = self._registered.get( key, marker )
00295 
00296         if info is marker:
00297             return default
00298 
00299         return _resolveDottedName( info[ 'handler' ] )

Here is the call graph for this function:

def GenericSetup.registry.BaseStepRegistry.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'.

Definition at line 245 of file registry.py.

00245 
00246     def getStepMetadata( self, key, default=None ):
00247 
00248         """ Return a mapping of metadata for the step identified by 'key'.
00249 
00250         o Return 'default' if no such step is registered.
00251 
00252         o The 'handler' metadata is available via 'getStep'.
00253         """
00254         result = {}
00255 
00256         info = self._registered.get( key )
00257 
00258         if info is None:
00259             return default
00260 
00261         result = info.copy()
00262         result['invalid'] =  _resolveDottedName( result[ 'handler' ] ) is None
00263 
00264         return result

Here is the call graph for this function:

Here is the caller graph for this function:

Return a sequence of mappings describing registered steps.

o Mappings will be ordered alphabetically.

Definition at line 266 of file registry.py.

00266 
00267     def listStepMetadata( self ):
00268 
00269         """ Return a sequence of mappings describing registered steps.
00270 
00271         o Mappings will be ordered alphabetically.
00272         """
00273         step_ids = self.listSteps()
00274         step_ids.sort()
00275         return [ self.getStepMetadata( x ) for x in step_ids ]

Here is the call graph for this function:

Return a list of registered step IDs.

Definition at line 238 of file registry.py.

00238 
00239     def listSteps( self ):
00240 
00241         """ Return a list of registered step IDs.
00242         """
00243         return self._registered.keys()

Here is the caller graph for this function:

def GenericSetup.registry.BaseStepRegistry.parseXML (   self,
  text,
  encoding = None 
)
Parse 'text'.

Definition at line 310 of file registry.py.

00310 
00311     def parseXML( self, text, encoding=None ):
00312 
00313         """ Parse 'text'.
00314         """
00315         reader = getattr( text, 'read', None )
00316 
00317         if reader is not None:
00318             text = reader()
00319 
00320         parser = self.RegistryParser( encoding )
00321         parseString( text, parser )
00322 
00323         return parser._parsed
00324 InitializeClass( BaseStepRegistry )

Here is the caller graph for this function:

Definition at line 301 of file registry.py.

00301 
00302     def unregisterStep( self, id ):
00303         del self._registered[id]


Member Data Documentation

Definition at line 307 of file registry.py.

tuple GenericSetup.registry.BaseStepRegistry.security = ClassSecurityInfo() [static]

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