interface documentation

Interface definition for LDAP entries that are part of a bigger whole.

Method children List the direct children of this entry. Try to avoid using .search(), as this will be used later to implement .search() on LDAP backends.
Method fetch Fetch the attributes of this object from the server.
Method lookup Lookup the referred to by dn.
Method match Does entry match filter.
Method namingContext Return an LDAPEntry for the naming context that contains this object.
Method search Perform an LDAP search with this object as the base.
Method subtree List the subtree rooted at this entry, including this entry. Try to avoid using .search(), as this will be used later to implement .search() on LDAP backends.
def children(self, callback=None): (source)

List the direct children of this entry. Try to avoid using .search(), as this will be used later to implement .search() on LDAP backends. @param callback: Callback function to call for each resulting LDAPEntry. None means gather the results into a list and give that to the Deferred returned from here. @return: A Deferred that will complete when the list is over. The Deferred gives None if callback was given and a list of the children if callback is not given or is None.

def fetch(self, *attributes): (source)

Fetch the attributes of this object from the server. @param attributes: Attributes to fetch. If none, fetch all attributes. Fetched attributes are overwritten, and if fetching all attributes, attributes that are not on the server are removed. @return: A Deferred that will complete when the operation is done.

def lookup(self, dn): (source)

Lookup the referred to by dn. @return: A Deferred returning an ILDAPEntry, or failing with e.g. LDAPNoSuchObject.

def match(self, filter): (source)

Does entry match filter. @param filter: An LDAPFilter (e.g. LDAPFilter_present, LDAPFilter_equalityMatch etc. TODO provide an interface or superclass for filters.) @return: Boolean.

def namingContext(self): (source)

Return an LDAPEntry for the naming context that contains this object.

def search(self, filterText=None, filterObject=None, attributes=(), scope=None, derefAliases=None, sizeLimit=0, timeLimit=0, typesOnly=0, callback=None): (source)

Perform an LDAP search with this object as the base. @param filterText: LDAP search filter as a string. @param filterObject: LDAP search filter as LDAPFilter. Note if both filterText and filterObject are given, they are combined with AND. If neither is given, the search is made with a filter that matches everything. @param attributes: List of attributes to retrieve for the result objects. An empty list and means all. @param scope: Whether to recurse into subtrees. @param derefAliases: Whether to deref LDAP aliases. TODO write better documentation. @param sizeLimit: At most how many entries to return. 0 means unlimited. @param timeLimit: At most how long to use for processing the search request. 0 means unlimited. @param typesOnly: Whether to return attribute types only, or also values. @param callback: Callback function to call for each resulting LDAPEntry. None means gather the results into a list and give that to the Deferred returned from here. @return: A Deferred that will complete when the search is done. The Deferred gives None if callback was given and a list of the search results if callback is not given or is None.

def subtree(self, callback=None): (source)

List the subtree rooted at this entry, including this entry. Try to avoid using .search(), as this will be used later to implement .search() on LDAP backends. @param callback: Callback function to call for each resulting LDAPEntry. None means gather the results into a list and give that to the Deferred returned from here. @return: A Deferred that will complete when the list is over. The Deferred gives None if callback was given and a list of the children if callback is not given or is None.