| Home | Trees | Index | Help |
|---|
| Package Pootle :: Package storage :: Module api |
|
Abstract classes (interfaces) that define the Pootle backend API.
These classes only describe the available operations. New backends should
implement operations described here.
Fields marked as optional can have the value None.
You can use the function validateModule to check that a set of backend classes
implements the interfaces described here.
Here is a rough sketch of the class containment hierarchy:
IDatabase
IFolder
...
IModule (maps to a set of translations for a .pot file)
ITranslationStore (one for each language)
ITranslationUnit (maps to an msgid+msgstr)
Object lifecycle semantics
==========================
All content objects (folders, modules, translation stores, etc.) are
to be simultaneously created and added to a container. Afterwards their
name or reference to parent must not be changed. The only exception is
TranslationUnits which are constructed and added in separate steps.
This policy allows the backend to commit changes immediately and avoid floating
unserialized objects.
| Classes | |
|---|---|
Boolean |
|
Class |
|
Date |
|
Field |
An attribute that stores a particular type of data. |
IAnnotatable |
An object that can have annotations. |
Id |
|
IDatabase |
A database. |
IFolder |
A folder is a collection of modules and possibly other folders. |
IHaveStatistics |
An object that can provide translation statistics. |
IHeader |
Information about a translation store (maps to a .po header). |
ILanguageInfo |
Basic information about a language. |
IMapping |
|
IMerger |
An object that can merge translation files. |
IModule |
An object corresponding to a project. |
Integer |
|
Interface |
An interface. |
IRefersToDB |
An object stored in a database that has a reference to the database. |
ISearchable |
An object that can be searched. |
IStatistics |
Statistics. |
ITranslationStore |
A collection of translation units |
ITranslationUnit |
A translatable string. |
String |
|
Unicode |
|
Username |
|
| Exceptions | |
|---|---|
ImplementationError |
|
| Function Summary | |
|---|---|
iface_attrs(iface)
| |
Validate a given class against an interface. | |
Check classes in a module against interfaces. | |
| Variable Summary | |
|---|---|
list |
blacklist = ['__dict__', '__doc__', '__module__', '__wea...
|
| Function Details |
|---|
validateClass(cls, iface)Validate a given class against an interface. |
validateModule(module, complete=False)Check classes in a module against interfaces. The classes to be checked should have the atttribute _interface pointing to the implemented interface. |
| Variable Details |
|---|
blacklist
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Tue Aug 22 04:29:45 2006 | http://epydoc.sf.net |