Package svnmailer :: Package browser :: Module _base :: Class Template
[show private | hide private]
[frames | no frames]

Class Template

object --+
         |
        Template


Template storage, selector
Method Summary
  __init__(self, **kwargs)
Initialization
Template fromTemplates(cls, base_url, templates)
Creates a Template class from template templates (Class method)
str or unicode getRevisionUrl(self)
Returns the revision URL template
bool hasTemplates(self)
Returns whether there are templates at all
str or unicode selectByChange(self, change)
Returns the approriate diff URL template
    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)...
    Inherited from type
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...

Instance Variable Summary
dict _templates: The actual templates ({'type': 'template', ...})

Class Variable Summary
tuple _TYPES: List of possible template types (('type', ...))

Instance Method Details

__init__(self, **kwargs)
(Constructor)

Initialization
Parameters:
kwargs - The templates ({'type': 'template', ...})
Raises:
AttributeError - A type was not recognized
Overrides:
__builtin__.object.__init__

getRevisionUrl(self)

Returns the revision URL template
Returns:
The template or None if there's no such template
           (type=str or unicode)

hasTemplates(self)

Returns whether there are templates at all
Returns:
Are there templates?
           (type=bool)

selectByChange(self, change)

Returns the approriate diff URL template
Parameters:
change - The change description
           (type=svnmailer.subversion.VersionedPathDescriptor)
Returns:
The template or None if there's no such template
           (type=str or unicode)

Class Method Details

fromTemplates(cls, base_url, templates)

Creates a Template class from template templates
Parameters:
base_url - The base url, which should be modified by the template templates.
           (type=ParsedUrl)
templates - The template templates. This is a dict, which contains an entry for each template type (see _TYPES for all possibilities). The value is a tuple consisting of the path that should be added to base_url and keyword parameters for base_url.query.modify. Both may be None. ('type': ('path', {dict(querykw)}))
           (type=dict)
Returns:
A new Template instance
           (type=Template)
Raises:
AttributeError - An unknown template type was supplied by the templates parameter

Instance Variable Details

_templates

The actual templates ({'type': 'template', ...})
Type:
dict

Class Variable Details

_TYPES

List of possible template types (('type', ...))
Type:
tuple
Value:
('revision',
 'deleted',
 'deleted_dir',
 'copied',
 'copied_dir',
 'added',
 'added_dir',
 'modified',
...                                                                    

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