Package javax.naming.ldap

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


            SearchResult result = results.next();
            Name childRdn = new DN( result.getName() );
            childRdn.remove( 0 );
            recursivelyDelete( childRdn );
        }
        sysRoot.destroySubcontext( rdn );
    }


    /**
     * Performs a single level search as a specific user on newly created data and checks
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 ( LdapOperationNotSupportedException e )
        {
            assertTrue( e.getResultCode().equals( ResultCodeEnum.UNWILLING_TO_PERFORM ) );
View Full Code Here

            "ou: Test" );

        DirContext ctx = ctxRoot.createSubcontext( dn, attributes );
        assertNotNull( ctx );

        ctxRoot.destroySubcontext( dn );

        SearchControls sc = new SearchControls();
        sc.setSearchScope( SearchControls.OBJECT_SCOPE );

        try
View Full Code Here

        LdapContext sysRoot = getSystemContext( service );

        /*
         * delete ou=testing00,ou=system
         */
        sysRoot.destroySubcontext( "ou=testing00" );

        try
        {
            sysRoot.lookup( "ou=testing00" );
            fail( "ou=testing00, ou=system should not exist" );
View Full Code Here

        }

        /*
         * delete ou=subtest,ou=testing01,ou=system
         */
        sysRoot.destroySubcontext( "ou=subtest,ou=testing01" );

        try
        {
            sysRoot.lookup( "ou=subtest,ou=testing01" );
            fail( "ou=subtest,ou=testing01,ou=system should not exist" );
View Full Code Here

        }

        /*
         * delete ou=testing01,ou=system
         */
        sysRoot.destroySubcontext( "ou=testing01" );

        try
        {
            sysRoot.lookup( "ou=testing01" );
            fail( "ou=testing01, ou=system should not exist" );
View Full Code Here

        }

        /*
         * delete ou=testing01,ou=system
         */
        sysRoot.destroySubcontext( "ou=testing02" );

        try
        {
            sysRoot.lookup( "ou=testing02" );
            fail( "ou=testing02, ou=system should not exist" );
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

       
        // Inject the ldif file into the server.
        injectEntries( service, ldif2 );
       
        // Delete the test entry in order to fire the Trigger.
        sysRoot.destroySubcontext( "ou=testou" );
       
        // ------------------------------------------
        // The trigger should be fired at this point.
        // ------------------------------------------
       
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.