Package CedarBackup2 :: Module config :: Class CommandOverride
[hide private]
[frames] | no frames]

Class CommandOverride

source code

object --+
         |
        CommandOverride

Class representing a piece of Cedar Backup command override configuration.

As with all of the other classes that represent configuration sections, all of these values are optional. It is up to some higher-level construct to decide whether everything they need is filled in. Some validation is done on non-None assignments through the use of the Python property() construct.

The following restrictions exist on data in this class:


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

Instance Methods [hide private]
 
__init__(self, command=None, absolutePath=None)
Constructor for the CommandOverride 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
 
_setCommand(self, value)
Property target used to set the command.
source code
 
_getCommand(self)
Property target used to get the command.
source code
 
_setAbsolutePath(self, value)
Property target used to set the absolute path.
source code
 
_getAbsolutePath(self)
Property target used to get the absolute path.
source code

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

Properties [hide private]
  command
Name of command to be overridden.
  absolutePath
Absolute path of the overrridden command.

Inherited from object: __class__

Method Details [hide private]

__init__(self, command=None, absolutePath=None)
(Constructor)

source code 

Constructor for the CommandOverride class.

Parameters:
  • command - Name of command to be overridden.
  • absolutePath - Absolute path of the overrridden command.
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.

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

_setCommand(self, value)

source code 

Property target used to set the command. The value must be a non-empty string if it is not None.

Raises:
  • ValueError - If the value is an empty string.

_setAbsolutePath(self, value)

source code 

Property target used to set the absolute path. The value must be an absolute path if it is not None. It does not have to exist on disk at the time of assignment.

Raises:
  • ValueError - If the value is not an absolute path.
  • ValueError - If the value cannot be encoded properly.

Property Details [hide private]

command

Name of command to be overridden.

Get Method:
_getCommand(self) - Property target used to get the command.
Set Method:
_setCommand(self, value) - Property target used to set the command.

absolutePath

Absolute path of the overrridden command.

Get Method:
_getAbsolutePath(self) - Property target used to get the absolute path.
Set Method:
_setAbsolutePath(self, value) - Property target used to set the absolute path.