Package CedarBackup2 :: Package extend :: Module mbox :: Class MboxConfig
[hide private]
[frames] | no frames]

Class MboxConfig

source code

object --+
         |
        MboxConfig

Class representing mbox configuration.

Mbox configuration is used for backing up mbox email files.

The following restrictions exist on data in this class:

For the mboxFiles and mboxDirs lists, validation is accomplished through the util.ObjectTypeList list implementation that overrides common list methods and transparently ensures that each element is of the proper type.

Unlike collect configuration, no global exclusions are allowed on this level. We only allow relative exclusions at the mbox directory level. Also, there is no configured ignore file. This is because mbox directory backups are not recursive.


Note: Lists within this class are "unordered" for equality comparisons.

Instance Methods [hide private]
 
__init__(self, collectMode=None, compressMode=None, mboxFiles=None, mboxDirs=None)
Constructor for the MboxConfig class.
source code
 
__repr__(self)
Official string representation for class instance.
source code
 
__str__(self)
Informal string representation for class instance.
source code
 
__cmp__(self, other)
Definition of equals operator for this class.
source code
 
_setCollectMode(self, value)
Property target used to set the collect mode.
source code
 
_getCollectMode(self)
Property target used to get the collect mode.
source code
 
_setCompressMode(self, value)
Property target used to set the compress mode.
source code
 
_getCompressMode(self)
Property target used to get the compress mode.
source code
 
_setMboxFiles(self, value)
Property target used to set the mboxFiles list.
source code
 
_getMboxFiles(self)
Property target used to get the mboxFiles list.
source code
 
_setMboxDirs(self, value)
Property target used to set the mboxDirs list.
source code
 
_getMboxDirs(self)
Property target used to get the mboxDirs list.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
  collectMode
Default collect mode.
  compressMode
Default compress mode.
  mboxFiles
List of mbox files to back up.
  mboxDirs
List of mbox directories to back up.

Inherited from object: __class__

Method Details [hide private]

__init__(self, collectMode=None, compressMode=None, mboxFiles=None, mboxDirs=None)
(Constructor)

source code 

Constructor for the MboxConfig class.

Parameters:
  • collectMode - Default collect mode.
  • compressMode - Default compress mode.
  • mboxFiles - List of mbox files to back up
  • mboxDirs - List of mbox directories to back up
Raises:
  • ValueError - If one of the values is invalid.
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Official string representation for class instance.

Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 

Informal string representation for class instance.

Overrides: object.__str__

__cmp__(self, other)
(Comparison operator)

source code 

Definition of equals operator for this class. Lists within this class are "unordered" for equality comparisons.

Parameters:
  • other - Other object to compare to.
Returns:
-1/0/1 depending on whether self is <, = or > other.

_setCollectMode(self, value)

source code 

Property target used to set the collect mode. If not None, the mode must be one of the values in VALID_COLLECT_MODES.

Raises:
  • ValueError - If the value is not valid.

_setCompressMode(self, value)

source code 

Property target used to set the compress mode. If not None, the mode must be one of the values in VALID_COMPRESS_MODES.

Raises:
  • ValueError - If the value is not valid.

_setMboxFiles(self, value)

source code 

Property target used to set the mboxFiles list. Either the value must be None or each element must be an MboxFile.

Raises:
  • ValueError - If the value is not an MboxFile

_setMboxDirs(self, value)

source code 

Property target used to set the mboxDirs list. Either the value must be None or each element must be an MboxDir.

Raises:
  • ValueError - If the value is not an MboxDir

Property Details [hide private]

collectMode

Default collect mode.

Get Method:
_getCollectMode(self) - Property target used to get the collect mode.
Set Method:
_setCollectMode(self, value) - Property target used to set the collect mode.

compressMode

Default compress mode.

Get Method:
_getCompressMode(self) - Property target used to get the compress mode.
Set Method:
_setCompressMode(self, value) - Property target used to set the compress mode.

mboxFiles

List of mbox files to back up.

Get Method:
_getMboxFiles(self) - Property target used to get the mboxFiles list.
Set Method:
_setMboxFiles(self, value) - Property target used to set the mboxFiles list.

mboxDirs

List of mbox directories to back up.

Get Method:
_getMboxDirs(self) - Property target used to get the mboxDirs list.
Set Method:
_setMboxDirs(self, value) - Property target used to set the mboxDirs list.