Home | Trees | Index | Help |
|
---|
Package CedarBackup2 :: Package extend :: Module split :: 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 split-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 a <split> configuration section as the next child of a parent. | |
Adds a text node as the next child of a parent, to contain a byte size. (Static method) | |
Property target used to get the split configuration value. | |
Parses an split configuration section. (Static method) | |
Internal method to parse an XML string into the object. | |
Read a byte size value from an XML document. (Static method) | |
Property target used to set the split 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 | |
---|---|
split : Split configuration in terms of a SplitConfig 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. Split configuration must be filled in. Within that, both the size limit and split size must be filled in.
|
addConfig(self, xmlDom, parentNode)Adds a <split> 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:sizeLimit //cb_config/split/size_limit splitSize //cb_config/split/split_size
|
_getSplit(self)Property target used to get the split 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 split
configuration section.
|
_setSplit(self, value)Property target used to set the split configuration value. If notNone , the value must be a SplitConfig
object.
|
Static Method Details |
---|
_addByteQuantityNode(xmlDom, parentNode, nodeName, byteQuantity)Adds a text node as the next child of a parent, to contain a byte size. If the
|
_parseSplit(parent)Parses an split configuration section. We read the following individual fields:sizeLimit //cb_config/split/size_limit splitSize //cb_config/split/split_size
|
_readByteQuantity(parent, name)Read a byte size value from an XML document. A byte size value is an interpreted string value. If the string value ends with "MB" or "GB", then the string before that is interpreted as megabytes or gigabytes. Otherwise, it is intepreted as bytes.
|
Property Details |
---|
splitSplit configuration in terms of aSplitConfig object.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Mar 29 20:58:25 2007 | http://epydoc.sf.net |