Package javax.naming.directory

Examples of javax.naming.directory.DirContext.destroySubcontext()


    }
    catch ( AttributeModificationException ame )
    {
        assertTrue( true );
        // Remove the person entry
        ctx.destroySubcontext( rdn );
    }
    catch ( NamingException ne )
    {
        assertTrue( true );
        // Remove the person entry
View Full Code Here


    }
    catch ( NamingException ne )
    {
        assertTrue( true );
        // Remove the person entry
        ctx.destroySubcontext( rdn );
    }
}


/**
 
View Full Code Here

        DirContext ctx = ( DirContext ) initCtx.lookup( "" );
        LdapNoPermissionException notNull = null;

        try
        {
            ctx.destroySubcontext( "" );
            fail( "we should never get here" );
        }
        catch ( LdapNoPermissionException e )
        {
            notNull = e;
View Full Code Here

            assertTrue(desc.contains(description3));
            assertEquals(3, desc.size());
        }

        // Remove the person entry
        ctx.destroySubcontext(rdn);
    }
}
View Full Code Here

            LdapDN userName = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
            adminContext.createSubcontext( entryRdn, testEntry );

            // delete the newly created context as the user
            DirContext userContext = getContextAs( userName, password );
            userContext.destroySubcontext( entryRdn );

            return true;
        }
        catch ( LdapNoPermissionException e )
        {
View Full Code Here

            DirContext userContext = getContextAs( userName, password );
            userContext.createSubcontext( entryRdn, testEntry );

            // delete the newly created context as the admin user
            DirContext adminContext = getContextAsAdmin();
            adminContext.destroySubcontext( entryRdn );

            return true;
        }
        catch ( LdapNoPermissionException e )
        {
View Full Code Here

     * i.e. user does not exist
     */
    public static void deleteUser( String uid ) throws Exception
    {
        DirContext adminCtx = getContextAsAdmin();
        adminCtx.destroySubcontext( "uid=" + uid + ",ou=users" );
    }


    /**
     * Creates a simple user as an inetOrgPerson under the ou=users,ou=system
View Full Code Here


    public static void deleteAccessControlSubentry( String cn ) throws Exception
    {
        DirContext adminCtx = getContextAsAdmin();
        adminCtx.destroySubcontext( "cn=" + cn );
    }


    /**
     * Creates an access control subentry under ou=system whose subtree covers
View Full Code Here

        LdapNoPermissionException notNull = null;

        try
        {
            ctx.destroySubcontext( "" );

            fail( "we should never get here" );
        }
        catch ( LdapNoPermissionException e )
        {
View Full Code Here

        result = new EncodableLdapResult(LdapResult.REFERRAL, null, null, null);

        server.setResponseSeq(new LdapMessage[] { new LdapMessage(
                LdapASN1Constant.OP_DEL_RESPONSE, result, null) });
        try {
            context.destroySubcontext("cn=test");
            fail("Should throw PartialResultException");
        } catch (PartialResultException e) {
            // expected
        }
    }
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.