getInitialContext().destroySubcontext( childName );
public int delete( String dn, boolean checkEntry ) throws KettleException { try { if ( checkEntry ) { // First Check entry getInitialContext().lookup( dn ); } // The entry exists getInitialContext().destroySubcontext( dn ); if ( log.isDebug() ) { log.logDebug( BaseMessages.getString( PKG, "LDAPinput.Exception.Deleted", dn ) ); } return STATUS_DELETED; } catch ( NameNotFoundException n ) { // The entry is not found if ( checkEntry ) { throw new KettleException( BaseMessages.getString( PKG, "LDAPConnection.Error.Deleting.NameNotFound", dn ), n ); } return STATUS_SKIPPED; } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "LDAPConnection.Error.Delete", dn ), e ); } }
public void destroySubcontext(String name) throws NamingException { initCtx.destroySubcontext(name); }
public void destroySubcontext(String name) throws NamingException { initCtx.destroySubcontext(name); }
public void destroySubcontext(Name name) throws NamingException { initCtx.destroySubcontext(name); }
public void destroySubcontext(Name name) throws NamingException { initCtx.destroySubcontext(name); }
ctx.destroySubcontext(roleDN);
public boolean deleteUser(String name) { InitialLdapContext ctx = null; try { ctx = initialiseContext(); String userDN = getUserDN(name); ctx.destroySubcontext(userDN); return true; } catch (NamingException ex) { throw new IdentityManagementException("Failed to delete user", ex); } finally { if (ctx != null) { try { ctx.close(); } catch (NamingException ex) {} } } }
public void activate(DirectoryTree tree) { DirectoryTreeObject[] selectedNodes = null; try { selectedNodes = tree.getSelectedNodes(); } catch (NamingException e) { selectedNodes = null; } if (selectedNodes != null) { for (int i = 0; i < selectedNodes.length; i++) { InitialLdapContext iCtx = tree.getConnection(); Name nodeToDelete = selectedNodes[i].getDistinguishedName(); Name parent = nodeToDelete.getPrefix(nodeToDelete.size() - 1); try { workbench.setStatusbarMessage(messages.format( "tree.popup.delete.node", nodeToDelete.toString())); iCtx.destroySubcontext(nodeToDelete); eventRegistry.fireStructureChanged(tree.getConnectionInformation().getGUID(), parent) ; } catch (NamingException e1) { workbench.getErrorReporter().reportError( messages.getMessage("error.tree.delete"), e1); } } } }