Package ldaptor :: Module interfaces :: Class IConnectedLDAPEntry
[hide private]
[frames] | no frames]

Class IConnectedLDAPEntry

source code

zope.interface.Interface --+
                           |
                          IConnectedLDAPEntry

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

Instance Methods [hide private]
 
namingContext(self)
Return an LDAPEntry for the naming context that contains this object.
source code
 
fetch(self, *attributes)
Fetch the attributes of this object from the server.
source code
 
search(self, filterText=None, filterObject=None, attributes=(), scope=None, derefAliases=None, sizeLimit=0, timeLimit=0, typesOnly=0, callback=None)
Perform an LDAP search with this object as the base.
source code
 
children(self, callback=None)
List the direct children of this entry.
source code
 
subtree(self, callback=None)
List the subtree rooted at this entry, including this entry.
source code
 
lookup(self, dn)
Lookup the referred to by dn.
source code
 
match(self, filter)
Does entry match filter.
source code
Class Variables [hide private]
  _InterfaceClass__attrs = {'children': <zope.interface.interfac...
  __bases__ = (<InterfaceClass zope.interface.Interface>)
  __identifier__ = 'ldaptor.interfaces.IConnectedLDAPEntry'
  __iro__ = (<InterfaceClass ldaptor.interfaces.IConnectedLDAPEn...
  __name__ = 'IConnectedLDAPEntry'
  __sro__ = (<InterfaceClass ldaptor.interfaces.IConnectedLDAPEn...
  _implied = {<InterfaceClass ldaptor.interfaces.IConnectedLDAPE...
  dependents = <WeakKeyDictionary at 4138784972>

Inherited from zope.interface.Interface (private): _Element__tagged_values

Method Details [hide private]

fetch(self, *attributes)

source code 

Fetch the attributes of this object from the server.

Parameters:
  • 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.
Returns:
A Deferred that will complete when the operation is done.

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

source code 

Perform an LDAP search with this object as the base.

Parameters:
  • filterText - LDAP search filter as a string.
  • 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.
  • attributes - List of attributes to retrieve for the result objects. An empty list and means all.
  • scope - Whether to recurse into subtrees.
  • derefAliases - Whether to deref LDAP aliases. TODO write better documentation.
  • sizeLimit - At most how many entries to return. 0 means unlimited.
  • timeLimit - At most how long to use for processing the search request. 0 means unlimited.
  • typesOnly - Whether to return attribute types only, or also values.
  • 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.
Returns:
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.

children(self, callback=None)

source code 

List the direct children of this entry. Try to avoid using .search(), as this will be used later to implement .search() on LDAP backends.

Parameters:
  • 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.
Returns:
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.

subtree(self, callback=None)

source code 

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.

Parameters:
  • 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.
Returns:
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.

lookup(self, dn)

source code 

Lookup the referred to by dn.

Returns:
A Deferred returning an ILDAPEntry, or failing with e.g. LDAPNoSuchObject.

match(self, filter)

source code 

Does entry match filter.

Parameters:
  • filter - An LDAPFilter (e.g. LDAPFilter_present, LDAPFilter_equalityMatch etc. TODO provide an interface or superclass for filters.)
Returns:
Boolean.

Class Variable Details [hide private]

_InterfaceClass__attrs

Value:
{'children': <zope.interface.interface.Method object>,
 'fetch': <zope.interface.interface.Method object>,
 'lookup': <zope.interface.interface.Method object>,
 'match': <zope.interface.interface.Method object>,
 'namingContext': <zope.interface.interface.Method object>,
 'search': <zope.interface.interface.Method object>,
 'subtree': <zope.interface.interface.Method object>}

__iro__

Value:
(<InterfaceClass ldaptor.interfaces.IConnectedLDAPEntry>,
 <InterfaceClass zope.interface.Interface>)

__sro__

Value:
(<InterfaceClass ldaptor.interfaces.IConnectedLDAPEntry>,
 <InterfaceClass zope.interface.Interface>)

_implied

Value:
{<InterfaceClass ldaptor.interfaces.IConnectedLDAPEntry>: (),
 <InterfaceClass zope.interface.Interface>: ()}