KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > simya > ldap > beans > LdapModifyDnBean


1 package net.simya.ldap.beans;
2
3 import javax.naming.*;
4 import javax.naming.directory.*;
5
6
7 /**
8  * This code makes modify dn operation
9  *
10  */

11 public class LdapModifyDnBean
12 {
13     
14     private DirContext ctx = null;
15     
16     private String JavaDoc olddn;
17     private String JavaDoc newdn;
18     
19     public void setContext (DirContext ctx) { this.ctx = ctx; }
20     
21     public void setOldDn ( String JavaDoc olddn){this.olddn = olddn ; }
22     
23     public void setNewDn ( String JavaDoc newdn){this.newdn = newdn ; }
24     
25     
26     public void modifyDN()
27     throws NamingException
28     {
29         ctx.rename(olddn,newdn);
30     }
31     
32 }// end of class
Popular Tags