Package caldavclientlibrary :: Package admin :: Package xmlaccounts :: Module directory :: Class XMLDirectory
[hide private]
[frames] | no frames]

Class XMLDirectory

source code

object --+
         |
        XMLDirectory

Model object for the XML-based directory. This can parse and generate the full XML file.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
addRecord(self, record)
Add a new principal record to the directory.
source code
boolean
containsRecord(self, recordType, uid)
Test whether the directory contains a record of the specified type and user id.
source code
boolean
containsGUID(self, guid)
Test whether the directory contains a record with the specified GUID.
source code
admin.xmlaccounts.record.XMLRecord
getRecord(self, recordType, uid)
Return the record in the directory with the matching record type and user id.
source code
boolean
removeRecord(self, recordType, uid)
Remove the record with the matching type and user id from the directory.
source code
 
parseXML(self, node)
Parse an entire XML directory.
source code
xml.etree.ElementTree.Element
writeXML(self)
Generate an entire XML directory.
source code
 
writeXMLRecords(self, root, records)
Generate the XML for all records in the specified list.
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)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

addRecord(self, record)

source code 

Add a new principal record to the directory.

Parameters:

containsRecord(self, recordType, uid)

source code 

Test whether the directory contains a record of the specified type and user id.

Parameters:
Returns: boolean
True if present in the directory, False otherwise.

containsGUID(self, guid)

source code 

Test whether the directory contains a record with the specified GUID.

Parameters:
  • guid (str) - the GUID to check.
Returns: boolean
True if present in the directory, False otherwise.

getRecord(self, recordType, uid)

source code 

Return the record in the directory with the matching record type and user id.

Parameters:
Returns: admin.xmlaccounts.record.XMLRecord
the matching record, or None if not found.

removeRecord(self, recordType, uid)

source code 

Remove the record with the matching type and user id from the directory.

Parameters:
Returns: boolean
True if found and removed, False otherwise.

parseXML(self, node)

source code 

Parse an entire XML directory.

Parameters:
  • node (xml.etree.ElementTree.Element) - the XML element for the root of the directory file.

writeXML(self)

source code 

Generate an entire XML directory.

Returns: xml.etree.ElementTree.Element
the root element for the principal record.

writeXMLRecords(self, root, records)

source code 

Generate the XML for all records in the specified list.

Parameters: