[CalendarServer-changes] [10640] CalendarServer/trunk/twext/who/idirectory.py

source_changes at macosforge.org source_changes at macosforge.org
Sat Feb 2 12:11:05 PST 2013


Revision: 10640
          http://trac.calendarserver.org//changeset/10640
Author:   wsanchez at apple.com
Date:     2013-02-02 12:11:04 -0800 (Sat, 02 Feb 2013)
Log Message:
-----------
Update docs

Modified Paths:
--------------
    CalendarServer/trunk/twext/who/idirectory.py

Modified: CalendarServer/trunk/twext/who/idirectory.py
===================================================================
--- CalendarServer/trunk/twext/who/idirectory.py	2013-02-02 03:09:10 UTC (rev 10639)
+++ CalendarServer/trunk/twext/who/idirectory.py	2013-02-02 20:11:04 UTC (rev 10640)
@@ -132,12 +132,12 @@
 
 class DirectoryQueryMatchExpression(object):
     """
-    Directory query.
+    Query for a matching value in a given field.
 
-    @ivar fieldName: a L{FieldName}
+    @ivar fieldName: a L{NamedConstant} specifying the field
     @ivar fieldValue: a text value to match
-    @ivar matchType: a L{MatchType}
-    @ivar flags: l{QueryFlags}
+    @ivar matchType: a L{NamedConstant} specifying the match algorythm
+    @ivar flags: L{NamedConstant} specifying additional options
     """
 
     def __init__(self, fieldName, fieldValue, matchType=MatchType.equals, flags=None):
@@ -167,8 +167,12 @@
 
     def recordsFromQuery(expressions, operand=Operand.AND):
         """
-        Find records matching a query consisting of an interable of
-        expressions and an L{Operand}.
+        Find records matching a query consisting of an iterable of
+        expressions and an operand.
+        @param expressions: an iterable of expressions
+        @type expressions: L{object}
+        @param operand: an operand
+        @type operand: a L{NamedConstant}
         @return: a deferred iterable of matching L{IDirectoryRecord}s.
         @raises: L{QueryNotSupportedError} if the query is not
             supported by this directory service.
@@ -176,42 +180,57 @@
 
     def recordsWithFieldValue(fieldName, value):
         """
-        Find records that have the given L{FieldName} with the given
+        Find records that have the given field name with the given
         value.
+        @param fieldName: a field name
+        @type fieldName: L{NamedConstant}
+        @param value: a value to match
+        @type value: L{bytes}
         @return: a deferred iterable of L{IDirectoryRecord}s.
         """
 
     def recordWithUID(uid):
         """
-        Find the record that has the given L{FieldName.uid}.
+        Find the record that has the given UID.
+        @param uid: a UID
+        @type uid: L{bytes}
         @return: a deferred iterable of L{IDirectoryRecord}s, or
             C{None} if there is no such record.
         """
                
     def recordWithGUID(guid):
         """
-        Find the record that has the given L{FieldName.guid}.
+        Find the record that has the given GUID.
+        @param guid: a GUID
+        @type guid: L{bytes}
         @return: a deferred iterable of L{IDirectoryRecord}s, or
             C{None} if there is no such record.
         """
 
     def recordsWithRecordType(recordType):
         """
-        Find the records that have the given L{RecordType}.
+        Find the records that have the given record type.
+        @param recordType: a record type
+        @type recordType: L{NamedConstant}
         @return: a deferred iterable of L{IDirectoryRecord}s.
         """
 
     def recordWithShortName(recordType, shortName):
         """
-        Find the record that has the given L{RecordType} and
-        L{FieldName.shortName}.
+        Find the record that has the given record type and short name.
+        @param recordType: a record type
+        @type recordType: L{NamedConstant}
+        @param shortName: a short name
+        @type shortName: L{bytes}
         @return: a deferred iterable of L{IDirectoryRecord}s, or
             C{None} if there is no such record.
         """
 
     def recordsWithEmailAddress(emailAddress):
         """
-        Find the records that have the given L{FieldName.emailAddress}.
+        Find the records that have the given email address.
+        @param emailAddress: an email address
+        @type emailAddress: L{bytes}
         @return: a deferred iterable of L{IDirectoryRecord}s, or
             C{None} if there is no such record.
         """
@@ -222,10 +241,10 @@
     """
     Directory record.
 
-    Fields may also be accessed as attributes of L{IDirectoryRecord} objects.
+    Fields may also be accessed as attributes.
     """
     service = Attribute("The L{IDirectoryService} this record exists in.")
-    fields  = Attribute("A dictionary with L{FieldName} keys and text values.")
+    fields  = Attribute("A mapping with L{NamedConstant} keys.")
 
     def members():
         """
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130202/25247a9d/attachment.html>


More information about the calendarserver-changes mailing list