Package javax.naming.directory

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


            assertNotNull( cn );
            assertTrue( cn.contains( "Mackie \"The Knife\" Messer" ) );
        }

        // JNDI issue: must use the name object here rather then string
        ctx.destroySubcontext( ldapRdn );
    }


    /**
     * adding an entry with backslash (\) in RDN.
View Full Code Here


            Attribute ou = sr.getAttributes().get( "ou" );
            assertNotNull( ou );
            assertTrue( ou.contains( "AC\\DC" ) );
        }

        ctx.destroySubcontext( ldapRdn );
    }


    /**
     * adding an entry with greater sign (>) in RDN.
View Full Code Here

            Attribute ou = sr.getAttributes().get( "ou" );
            assertNotNull( ou );
            assertTrue( ou.contains( "East -> West" ) );
        }

        ctx.destroySubcontext( rdn );
    }


    /**
     * adding an entry with less sign (<) in RDN.
View Full Code Here

            Attribute ou = sr.getAttributes().get( "ou" );
            assertNotNull( ou );
            assertTrue( ou.contains( "Scissors 8<" ) );
        }

        ctx.destroySubcontext( rdn );
    }


    /**
     * adding an entry with semicolon (;) in RDN.
View Full Code Here

            Attribute ou = sr.getAttributes().get( "ou" );
            assertNotNull( ou );
            assertTrue( ou.contains( "semicolon group;" ) );
        }

        ctx.destroySubcontext( rdn );
    }


    /**
     * adding an entry with equals sign (=) in RDN.
View Full Code Here

            Attribute ou = sr.getAttributes().get( "ou" );
            assertNotNull( ou );
            assertTrue( ou.contains( "nomen=omen" ) );
        }

        ctx.destroySubcontext( rdn );
    }
}
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

            DN userName = new DN( "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

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.