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

Type IEditableLDAPEntry

object --+    
         |    
 Interface --+
             |
            IEditableLDAPEntry


Interface definition for editable LDAP entries.
Method Summary
  __delitem__(self, key)
Delete all values of an attribute.
  __setitem__(self, key, value)
Set values of an attribute.
  commit(self)
Send all pending changes to the LDAP server.
  delete(self)
Delete this object from the LDAP server.
  move(self, newDN)
Move the object to a new DN.
  setPassword(self, newPasswd)
Set all applicable passwords for this object.
  undo(self)
Forget all pending changes.
    Inherited from Interface
  adaptWith(self, using, to, registry)
(Class method)
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Instance Method Details

__delitem__(self, key)
(Index deletion operator)

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

__setitem__(self, key, value)
(Index assignment operator)

Set values of an attribute. Please use lists. Do not modify the lists in place, that's not supported _yet_.
>>> o=LDAPEntry(client=ldapclient.LDAPClient(),
...     dn='cn=foo,dc=example,dc=com',
...     attributes={'anAttribute': ['itsValue']})
>>> o['anAttribute']=['foo', 'bar']
>>> o['anAttribute']
['bar', 'foo']

commit(self)

Send all pending changes to the LDAP server.
Returns:
a Deferred that tells you whether the operation succeeded or not. (TODO specify how)

delete(self)

Delete this object from the LDAP server.
Returns:
A Deferred that will complete when the delete is done.

move(self, newDN)

Move the object to a new DN.
Parameters:
newDN - the new DistinguishedName
Returns:
A Deferred that will complete when the move is done.

setPassword(self, newPasswd)

Set all applicable passwords for this object.
Parameters:
newPasswd - A string containing the new password.
Returns:
A Deferred that will complete when the operation is done.

undo(self)

Forget all pending changes.

Generated by Epydoc 2.1 on Tue Aug 17 17:08:21 2004 http://epydoc.sf.net