Package javax.naming.ldap

Examples of javax.naming.ldap.LdapContext.destroySubcontext()


        Attributes reloaded = rootDSE.getAttributes( entryDn );
        assertNotNull( reloaded );
        assertTrue( reloaded.get( "ou" ).contains( "people" ) );
        LOG.debug( "looked up entry {} from partition {}", entryDn, partitionSuffix );
       
        rootDSE.destroySubcontext( entryDn );
        try
        {
            rootDSE.getAttributes( entryDn );
            fail( "should never get here" );
        }
View Full Code Here


        // add the dummy schema enabled
        testAddEnabledSchemaNoDeps();
        assertNotNull( IntegrationUtils.getLoadedSchemas( service ).get( "dummy" ) );
       
        // delete it now
        schemaRoot.destroySubcontext( "cn=dummy" );
        assertNull( IntegrationUtils.getLoadedSchemas( service ).get( "dummy" ) );
    }
   
   
    /**
 
View Full Code Here

        schemaRoot.modifyAttributes( "cn=nis", mods );
       
        // attempt to delete it now & it should fail
        try
        {
            schemaRoot.destroySubcontext( "cn=dummy" );
            fail( "should not be able to delete a schema with dependents" );
        }
        catch ( LdapOperationNotSupportedException e )
        {
            assertTrue( e.getResultCode().equals( ResultCodeEnum.UNWILLING_TO_PERFORM ) );
View Full Code Here

        createEnabledValidSchema( "dummy" );
        assertTrue( isOnDisk( dn ) );
        assertTrue( IntegrationUtils.isLoaded( service, "dummy" ) );

        // Delete the schema
        schemaRoot.destroySubcontext( "cn=dummy" );

        assertFalse( isOnDisk( dn ) );
        assertFalse( IntegrationUtils.isLoaded( service, "dummy" ) );
    }
View Full Code Here

        // add the dummy schema enabled
        testAddEnabledSchemaNoDeps();
        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
       
        // delete it now
        schemaRoot.destroySubcontext( "cn=dummy" );
        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
    }
   
   
    /**
 
View Full Code Here

        schemaRoot.modifyAttributes( "cn=nis", mods );
       
        // attempt to delete it now & it should fail
        try
        {
            schemaRoot.destroySubcontext( "cn=dummy" );
            fail( "should not be able to delete a schema with dependents" );
        }
        catch ( OperationNotSupportedException e )
        {
            // expected       
View Full Code Here

                    // we use LdapName here for the following reason:
                    // - when passing dn as String, JNDI doesn't handle slashes '/' correctly
                    // - when using LdapDN from shared-ldap, JNDI uses the toString() method
                    //   and LdapDN.toString() returns the normalized ATAV, but we need the
                    //   user provided ATAV.
                    modCtx.destroySubcontext( new LdapName( dn ) );
                }
                catch ( ReferralException re )
                {
                    try
                    {
View Full Code Here

                try
                {
                    LdapContext modCtx = context.newInstance( controls );
                    modCtx.addToEnvironment( Context.REFERRAL, "throw" ); //$NON-NLS-1$

                    modCtx.destroySubcontext( new LdapName( dn ) );
                }
                catch ( NamingException ne )
                {
                    namingException = ne;
                }
View Full Code Here

                try
                {
                    LdapContext modCtx = context.newInstance( controls );
                    modCtx.addToEnvironment( Context.REFERRAL, "throw" ); //$NON-NLS-1$

                    modCtx.destroySubcontext( new LdapName( dn ) );
                }
                catch ( NamingException ne )
                {
                    namingException = ne;
                }
View Full Code Here

               if (broadcast)
               {
                  preDelete(user);
               }

               ctx.destroySubcontext(userDN);
               if (os != null)
               {
                  os.getUserProfileHandler().removeUserProfile(userName, broadcast);
               }
               cacheHandler.remove(userName, CacheType.USER);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.