Package org.apache.directory.shared.ldap.model.name

Examples of org.apache.directory.shared.ldap.model.name.Rdn


            throw new IllegalArgumentException( msg );
        }

        try
        {
            rename( new Dn( entryDn ), new Rdn( newRdn ), deleteOldRdn );
        }
        catch ( LdapInvalidDnException e )
        {
            LOG.error( e.getMessage(), e );
            throw new LdapException( e.getMessage(), e );
View Full Code Here


                }

                // Check the newRdn value
                try
                {
                    Rdn thisNewRdn = new Rdn( newRdn );
                    Rdn entryNewRdn = new Rdn( otherEntry.newRdn );

                    if ( !thisNewRdn.equals( entryNewRdn ) )
                    {
                        return false;
                    }
View Full Code Here

        assertNotNull( children );

        assertEquals( 1, children.size() );
        assertNull( tree.getElement() );

        DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
        DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );
        DnNode<Dn> level3 = level2.getChildren().get( new Rdn( "dc=c" ) );

        assertNotNull( level3 );
        assertFalse( level3.hasElement() );
    }
View Full Code Here

        assertNotNull( children );

        assertEquals( 2, children.size() );
        assertNull( tree.getElement() );

        DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
        DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );

        assertNotNull( level2 );
        assertFalse( level2.hasElement() );

        level1 = children.get( new Rdn( "dc=e" ) );
        level2 = level1.getChildren().get( new Rdn( "dc=f" ) );

        assertNotNull( level2 );
        assertFalse( level2.hasElement() );
    }
View Full Code Here

        assertNotNull( children );

        assertEquals( 1, children.size() );
        assertNull( tree.getElement() );

        DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
        DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );

        Map<Rdn, DnNode<Dn>> childrenDn1 = level1.getChildren();
        assertNotNull( childrenDn1 );

        assertEquals( 2, childrenDn1.size() );
        assertNull( level1.getElement() );

        assertNotNull( level2 );
        assertFalse( level2.hasElement() );

        level1 = children.get( new Rdn( "dc=a" ) );
        level2 = level1.getChildren().get( new Rdn( "dc=f" ) );

        assertNotNull( level2 );
        assertFalse( level2.hasElement() );
    }
View Full Code Here

        assertNotNull( children );

        assertEquals( 1, children.size() );
        assertNull( tree.getElement() );

        DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
        DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );
        DnNode<Dn> level3 = level2.getChildren().get( new Rdn( "dc=c" ) );

        assertNotNull( level3 );
        assertEquals( dn, level3.getElement() );
    }
View Full Code Here

        assertNotNull( children );

        assertEquals( 2, children.size() );
        assertNull( tree.getElement() );

        DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
        DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );

        assertNotNull( level2 );
        assertEquals( dn1, level2.getElement() );

        level1 = children.get( new Rdn( "dc=e" ) );
        level2 = level1.getChildren().get( new Rdn( "dc=f" ) );

        assertNotNull( level2 );
        assertEquals( dn2, level2.getElement() );
    }
View Full Code Here

        assertNotNull( children );

        assertEquals( 1, children.size() );
        assertNull( tree.getElement() );

        DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
        DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );

        Map<Rdn, DnNode<Dn>> childrenDn1 = level1.getChildren();
        assertNotNull( childrenDn1 );

        assertEquals( 2, childrenDn1.size() );
        assertNull( level1.getElement() );

        assertNotNull( level2 );
        assertEquals( dn1, level2.getElement() );

        level1 = children.get( new Rdn( "dc=a" ) );
        level2 = level1.getChildren().get( new Rdn( "dc=f" ) );

        assertNotNull( level2 );
        assertEquals( dn2, level2.getElement() );
    }
View Full Code Here

        assertTrue( tree.hasChildren() );
        Map<Rdn, DnNode<Dn>> children = tree.getChildren();
        assertNotNull( children );

        DnNode<Dn> child = children.get( new Rdn( "dc=a" ) );
        assertTrue( child.hasChildren() );

        children = child.getChildren();
        child = children.get( new Rdn( "dc=b" ) );
        assertFalse( child.hasChildren() );
    }
View Full Code Here

        Dn dn = new Dn( "dc=c,dc=b,dc=a" );
        tree.add( dn );

        assertFalse( tree.isLeaf() );

        DnNode<Dn> child = tree.getChild( new Rdn( "dc=a" ) );
        assertFalse( child.isLeaf() );

        child = child.getChild( new Rdn( "dc=b" ) );
        assertFalse( child.isLeaf() );

        child = child.getChild( new Rdn( "dc=c" ) );
        assertTrue( child.isLeaf() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.name.Rdn

Copyright © 2018 www.massapicom. 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.