class documentation

class BaseLDAPEntry(WireStrAlias): (source)

Known subclasses: ldaptor.entry.EditableLDAPEntry

Implements interfaces: ldaptor.interfaces.ILDAPEntry

View In Hierarchy

Undocumented

Method __bool__ Undocumented
Method __contains__ TODO
Method __eq__ Comparison. Only equality is supported.
Method __getitem__ Get all values of an attribute.
Method __hash__ Undocumented
Method __init__ Initialize the object.
Method __iter__ Undocumented
Method __len__ TODO
Method __ne__ Inequality comparison. See L{__eq__}.
Method __nonzero__ Always return True
Method __repr__ Undocumented
Method bind Try to authenticate with given secret.
Method buildAttributeSet Undocumented
Method diff Compute differences between this and another LDAP entry.
Method get Get all values of an attribute.
Method getLDIF Undocumented
Method has_key TODO
Method hasMember Undocumented
Method items TODO
Method keys TODO
Method toWire Undocumented
Instance Variable dn Undocumented
Method _bind Undocumented
Class Variable _object_class_keys Undocumented
Class Variable _object_class_lower_keys Undocumented
Class Variable _user_password_keys Undocumented
Instance Variable _attributes Undocumented

Inherited from WireStrAlias:

Method __str__ Undocumented
def __bool__(self): (source)

Undocumented

def __eq__(self, other): (source)

Comparison. Only equality is supported. >>> client=ldapclient.LDAPClient() >>> a=LDAPEntry(client=client, ... dn='dc=example,dc=com') >>> b=LDAPEntry(client=client, ... dn='dc=example,dc=com') >>> a==b 1 >>> c=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='ou=different,dc=example,dc=com') >>> a==c 0 Comparison does not consider the client of the object. >>> anotherClient=ldapclient.LDAPClient() >>> d=LDAPEntry(client=anotherClient, ... dn='dc=example,dc=com') >>> a==d 1

def __getitem__(self, key): (source)

Get all values of an attribute. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={'anAttribute': ['itsValue']}) >>> o['anAttribute'] ['itsValue']

def __hash__(self): (source)
def __init__(self, dn, attributes={}): (source)

Initialize the object. @param dn: Distinguished Name of the object, as a string. @param attributes: Attributes of the object. A dictionary of attribute types to list of attribute values.

def __iter__(self): (source)

Undocumented

def __ne__(self, other): (source)

Inequality comparison. See L{__eq__}.

def bind(self, password): (source)

Try to authenticate with given secret. @return: Deferred ILDAPEntry (that is, self). @raise ldaperrors.LDAPInvalidCredentials: password was incorrect.

def buildAttributeSet(self, key, values): (source)
def diff(self, other): (source)

Compute differences between this and another LDAP entry. @param other: An LDAPEntry to compare to. @return: None if equal, otherwise a ModifyOp that would make this entry look like other.

def get(self, key, default=None): (source)

Get all values of an attribute. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={'anAttribute': ['itsValue']}) >>> o.get('anAttribute') ['itsValue'] >>> o.get('foo') >>> o.get('foo', []) []

def getLDIF(self): (source)

Undocumented

def hasMember(self, dn): (source)

Undocumented

def _bind(self, password): (source)

Undocumented

_object_class_keys = (source)

Undocumented

_object_class_lower_keys = (source)

Undocumented

_user_password_keys = (source)

Undocumented

_attributes = (source)

Undocumented