Logo Search packages:      
Sourcecode: lat version File versions  Download package

void lat::LdapServer::Copy ( string  oldDN,
string  newRDN,
string  parentDN 
) [inline]

Copy a directory entry.

oldDNDistinguished name of the entry to copy
newRDNNew name for entry
parentDNParent name

Definition at line 165 of file LdapServer.cs.

References Search().

Referenced by lat::ServerData::Copy().

                  string newDN = string.Format ("{0},{1}", newRDN, parentDN);             
                  LdapEntry[] entry = Search (oldDN, LdapConnection.SCOPE_BASE, "objectclass=*", null);
                  if (!(entry.Length > 0))
                  LdapEntry oldEntry = entry[0];                        
                  LdapAttributeSet attributeSet = new LdapAttributeSet();
                  foreach (LdapAttribute attr in oldEntry.getAttributeSet()) {
                        LdapAttribute newAttr = new LdapAttribute (attr);
                        attributeSet.Add (newAttr);
                  LdapEntry le = new LdapEntry (newDN, attributeSet);
                  conn.Add (le);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index