Home | Trees | Index | Help |
|
---|
Package CedarBackup2 :: Package extend :: Module mbox :: Class LocalConfig |
|
object
--+
|
LocalConfig
Class representing this extension's configuration document.
This is not a general-purpose configuration object like the main Cedar Backup configuration object. Instead, it just knows how to parse and emit Mbox-specific configuration values. Third parties who need to read and write configuration related to this extension should access it through the constructor,validate
and addConfig
methods.
Note: Lists within this class are "unordered" for equality comparisons.
Method Summary | |
---|---|
Initializes a configuration object. | |
Official string representation for class instance. | |
Informal string representation for class instance. | |
Definition of equals operator for this class. | |
Validates configuration represented by the object. | |
Adds an <mbox> configuration section as the next child of a parent. | |
Adds an mbox directory container as the next child of a parent. (Static method) | |
Adds an mbox file container as the next child of a parent. (Static method) | |
Property target used to get the mbox configuration value. | |
Reads exclusions data from immediately beneath the parent. (Static method) | |
Parses an mbox configuration section. (Static method) | |
Reads a list of MboxDir objects from immediately beneath
the parent. (Static method)
| |
Reads a list of MboxFile objects from immediately beneath
the parent. (Static method)
| |
Internal method to parse an XML string into the object. | |
Property target used to set the mbox configuration value. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value |
Property Summary | |
---|---|
mbox : Mbox configuration in terms of a MboxConfig object. |
Instance Method Details |
---|
__init__(self,
xmlData=None,
xmlPath=None,
validate=True)
|
__repr__(self)
Official string representation for class instance.
|
__str__(self)
Informal string representation for class instance.
|
__cmp__(self,
other)
Definition of equals operator for this class. Lists within this
class are "unordered" for equality comparisons.
|
validate(self)Validates configuration represented by the object. Mbox configuration must be filled in. Within that, the collect mode and compress mode are both optional, but the list of repositories must contain at least one entry. Each configured file or directory must contain an absolute path, and then must be either able to take collect mode and compress mode configuration from the parentMboxConfig object, or must
set each value on its own.
|
addConfig(self, xmlDom, parentNode)Adds an <mbox> configuration section as the next child of a parent. Third parties should use this function to write configuration related to this extension. We add the following fields to the document:collectMode //cb_config/mbox/collectMode compressMode //cb_config/mbox/compressModeWe also add groups of the following items, one list element per item: mboxFiles //cb_config/mbox/file mboxDirs //cb_config/mbox/dirThe mbox files and mbox directories are added by _addMboxFile and _addMboxDir .
|
_getMbox(self)Property target used to get the mbox configuration value. |
_parseXmlData(self, xmlData)Internal method to parse an XML string into the object. This method parses the XML document into a DOM tree (xmlDom ) and then calls a static method to parse the mbox
configuration section.
|
_setMbox(self, value)Property target used to set the mbox configuration value. If notNone , the value must be a MboxConfig
object.
|
Static Method Details |
---|
_addMboxDir(xmlDom, parentNode, mboxDir)Adds an mbox directory container as the next child of a parent. We add the following fields to the document:absolutePath dir/abs_path collectMode dir/collect_mode compressMode dir/compress_modeWe also add groups of the following items, one list element per item: relativeExcludePaths dir/exclude/rel_path excludePatterns dir/exclude/pattern The <dir> node itself is created as the next child of the
parent node. This method only adds one mbox directory node. The parent
must loop for each mbox directory in the mboxDir is None , this method call will
be a no-op.
|
_addMboxFile(xmlDom, parentNode, mboxFile)Adds an mbox file container as the next child of a parent. We add the following fields to the document:absolutePath file/abs_path collectMode file/collect_mode compressMode file/compress_mode The <file> node itself is created as the next child of the
parent node. This method only adds one mbox file node. The parent must
loop for each mbox file in the mboxFile is None , this method call will
be a no-op.
|
_parseExclusions(parentNode)Reads exclusions data from immediately beneath the parent. We read groups of the following items, one list element per item:relative exclude/rel_path patterns exclude/patternIf there are none of some pattern (i.e. no relative path items) then None will be returned for that item in the tuple.
|
_parseMbox(parent)Parses an mbox configuration section. We read the following individual fields:collectMode //cb_config/mbox/collect_mode compressMode //cb_config/mbox/compress_modeWe also read groups of the following item, one list element per item: mboxFiles //cb_config/mbox/file mboxDirs //cb_config/mbox/dirThe mbox files are parsed by _parseMboxFiles and the mbox directories
are parsed by _parseMboxDirs .
|
_parseMboxDirs(parent)Reads a list of absolutePath abs_path collectMode collect_mode compressMode compess_modeWe also read groups of the following items, one list element per item: relativeExcludePaths exclude/rel_path excludePatterns exclude/patternThe exclusions are parsed by _parseExclusions .
|
_parseMboxFiles(parent)Reads a list of absolutePath abs_path collectMode collect_mode compressMode compess_mode
|
Property Details |
---|
mboxMbox configuration in terms of aMboxConfig object.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Dec 18 22:53:29 2006 | http://epydoc.sf.net |