Package caldavclientlibrary :: Package admin :: Package xmlaccounts :: Package commands :: Module command :: Class Command
[hide private]
[frames] | no frames]

Class Command

source code

object --+
         |
        Command
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, cmdname, description)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
usage(self) source code
 
allRecordsAllowed(self)
Indicates whether a command is able to operate on all record types in addition to individual record types.
source code
int
execute(self, argv)
Execute the command specified by the command line arguments.
source code
list
getTypeArgument(self, argv)
Extract the user specified record type argument from the command line arguments.
source code
admin.xmlaccounts.recordtypes
mapType(self, type)
Map the specified user record type input to the actual record type identifier.
source code
 
loadAccounts(self)
Load the entire directory from the XML file.
source code
 
writeAccounts(self)
Write the entire directory to the XML file.
source code
 
doCommand(self)
Run the command.
source code
 
promptPassword(self)
Prompt the user for a password.
source code
 
getMemberList(self, prompt, title, type)
Prompt the user for a list of members.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cmdname, description)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

allRecordsAllowed(self)

source code 

Indicates whether a command is able to operate on all record types in addition to individual record types. Sub-classes should override this if they can handle all record in one go.

execute(self, argv)

source code 

Execute the command specified by the command line arguments.

Parameters:
  • argv (list) - command line arguments.
Returns: int
1 for success, 0 for failure.

getTypeArgument(self, argv)

source code 

Extract the user specified record type argument from the command line arguments.

Parameters:
  • argv (list) - command line arguments.
Returns: list
the modified arguments (if a record type is found the corresponding argument is removed from the argv passed in).

mapType(self, type)

source code 

Map the specified user record type input to the actual record type identifier.

Parameters:
  • type (str) - user input from the command line.
Returns: admin.xmlaccounts.recordtypes
identifier matching the user input, or None if no match.

doCommand(self)

source code 

Run the command. Sub-classes must implement this.