@Override public void destroySubcontext(Name name) throws NamingException { delegating.destroySubcontext(name); }
@Override public void destroySubcontext(String name) throws NamingException { delegating.destroySubcontext(name); }
@Override public void engineDeleteEntry(String alias) throws KeyStoreException { DirContext context = obtainDirContext(); try { SearchResult result = searchAlias(context, alias, null, new String[]{}); if (result == null) { throw log.ldapKeyStoreFailedToDeleteNonExisting(alias); } context.destroySubcontext(result.getNameInNamespace()); } catch (NamingException e) { throw log.ldapKeyStoreFailedToDelete(alias, e); } finally { returnDirContext(context); } }
@Override public void delete() throws RealmUnavailableException { DirContext context = obtainContext(); try { LdapIdentity identity = getIdentity(context); if (identity == null) { throw log.noSuchIdentity(); } log.debugf("Removing identity [%s] with DN [%s] from LDAP", name, identity.getDistinguishedName()); identity.getDirContext().destroySubcontext(new LdapName(identity.getDistinguishedName())); } catch (NamingException e) { throw log.ldapRealmFailedDeleteIdentityFromServer(e); } finally { closeContext(context); } }
@Override public synchronized void destroySubcontext(String name) throws NamingException { this.delegate.destroySubcontext(name); }
/** * Delete the attribute from the ldap directory. * * @param string * the string (dn) value * @throws NamingException when destroying sub context fails */ public void deleteTest(String string) throws NamingException { dirContext.destroySubcontext(string); } }
@Override public void destroySubcontext(String name) throws NamingException { delegating.destroySubcontext(name); }
@Override public synchronized void destroySubcontext(Name name) throws NamingException { this.delegate.destroySubcontext(name); }
public void deleteEntry(Name dn) throws NamingException { ctx.destroySubcontext(dn); }
@Override public void destroySubcontext(String name) throws NamingException { delegating.destroySubcontext(name); }
/** {@inheritDoc} */ public void destroySubcontext(Name name) throws NamingException { _directory.destroySubcontext(name); }
public void deleteEntry(String dn) throws NamingException { ctx.destroySubcontext(dn); }
public void deleteUser(String id) throws Exception { //"id=" + id +",ou=users," +this.pathbase构成了树型目录里面唯一标志(usrs时自定义的) ctx.destroySubcontext("uid=" + id +",ou=authuser," +this.pathbase); System.out.println("用户号为"+ id + "的用户删除成功!"); }
public void remove(String name) throws Exception { if (!name.isEmpty()) { name = "uid=" + name + fUserContext; } fContext.destroySubcontext(name); } }
public void destroySubcontext(String name) throws NamingException { try { ctx.destroySubcontext(name); } catch (CommunicationException e) { reconnect(); ctx.destroySubcontext(name); } }
public void destroySubcontext(String name) throws NamingException { try { ctx.destroySubcontext(name); } catch (CommunicationException e) { reconnect(); ctx.destroySubcontext(name); } }
public void deleteGroup(String name) throws NamingException { try { context.destroySubcontext(getGroupDN(name)); } catch (NameNotFoundException e) { // If the group is not found, ignore the error } }
public void deleteUser(String username) throws NamingException { try { context.destroySubcontext(getUserDN(username)); } catch (NameNotFoundException e) { // If the user is not found, ignore the error } }
public boolean deleteLdapUser(LdapUser e) { DirContext dirContext = null; try { dirContext = getBaseContext(); dirContext.destroySubcontext(e.getDn()); return true; } catch (Exception ex) { throw new RuntimeException("Delete failed", ex); } finally { closeContext(dirContext); } }
public void deleteSampleEntry() throws Exception { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, providerUrl); env.put(Context.SECURITY_PRINCIPAL, securityPrincipal); env.put(Context.SECURITY_CREDENTIALS, securityCredentials); DirContext ctx = new InitialDirContext(env); String dn = "uid=" + testUserId + "," + userBase; ctx.destroySubcontext(dn); }