Package svnmailer :: Package browser :: Class Manager
[show private | hide private]
[frames | no frames]

Class Manager

object --+    
         |    
 Singleton --+
             |
            Manager


Repository browser manager
Method Summary
  registerGenerator(self, name, classname)
Registers a new browser generator
_base.BaseGenerator select(self, config)
Returns an initialized repository browser generator
  _load(self, name)
Loads the class indexed by name
tuple _parseBrowserBase(self, base_config)
Parses the given option value into type and base url
    Inherited from Singleton
  __init__(self)
Non-initialization
  __new__(cls)
Returns the one and only instance (Static method)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __reduce__(...)
helper for pickle...
  __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
dict _GENERATORS: The mapping of all available generator names to their actual implementation classes.
module _util: The svnmailer.util module
    Inherited from Singleton
NoneType __singletoninstance__ = None                                                                  

Instance Method Details

registerGenerator(self, name, classname)

Registers a new browser generator
Parameters:
name - The name of the generator. This is the name that appears in the configuration. It's lowercased by the registerGenerator method.
           (type=unicode)
classname - The fully qualified class name (e.g. 'svnmailer.browser.generic.Generator')
           (type=str)

select(self, config)

Returns an initialized repository browser generator
Parameters:
config - The group configuration
           (type=svnmailer.settings._base.GroupSettingsContainer)
Returns:
The generator object or None if no generator was configured
           (type=_base.BaseGenerator)
Raises:
InvalidGeneratorError - The configured generator could not be recognized
ImportError - The registered generator could not be loaded

_load(self, name)

Loads the class indexed by name
Parameters:
name - The name that is looked up in the internal registry for the fully qualified class name
           (type=unicode)
Raises:
KeyError - name was not found in the registry
ImportError - The import of the class failed

_parseBrowserBase(self, base_config)

Parses the given option value into type and base url
Parameters:
base_config - The option value
           (type=str)
Returns:
The type and the base url
           (type=tuple)

Class Variable Details

_GENERATORS

The mapping of all available generator names to their actual implementation classes. It should be modified by the registerGenerator method only. The classes are expressed by their fully qualified names in string form (like 'svnmailer.browser.generic.Generator'). The dict is initially filled with the builtin browser generator classes. ({'name': 'classname', ...})
Type:
dict
Value:
{u'chora': 'svnmailer.browser.chora.Generator',
 u'generic': 'svnmailer.browser.generic.Generator',
 u'svn::web': 'svnmailer.browser.svnweb.Generator',
 u'trac': 'svnmailer.browser.trac.Generator',
 u'viewcvs': 'svnmailer.browser.viewcvs.Generator',
 u'websvn': 'svnmailer.browser.websvn.Generator'}                      

_util

The svnmailer.util module
Type:
module

Generated by Epydoc 2.0 on Sun Sep 25 20:49:10 2005 http://epydoc.sf.net