KickJava   Java API By Example, From Geeks To Geeks.

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


1 package net.simya.ldap.beans;
2
3 import javax.naming.*;
4 import javax.naming.directory.*;
5
6
7 /**
8  * This code deletes the entry from the ldap
9  *
10  *
11  *
12  * next version will provide : multientry deletion
13  */

14 public class LdapDeleteEntryBean
15 {
16     
17     private DirContext ctx = null;
18     
19     private String JavaDoc dn;
20     
21     public void setContext (DirContext ctx)
22     {
23         this.ctx = ctx;
24     }
25     
26     public void setDn ( String JavaDoc dn)
27     {
28         this.dn = dn ;
29     }
30     
31     public void deleteEntry()
32     throws NamingException
33     {
34         ctx.destroySubcontext(dn);
35     }
36     
37 }// end of class
Popular Tags