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

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


    /**
     * {@inheritDoc}
     */
    public void rename( String entryDn, String newRdn, boolean deleteOldRdn ) throws LdapException
    {
        rename( new Dn( schemaManager, entryDn ), new Rdn( newRdn ), deleteOldRdn );
    }
View Full Code Here


            String msg = "Cannot process a rename with a null Rdn";
            LOG.debug( msg );
            throw new IllegalArgumentException( msg );
        }

        rename( new Dn( schemaManager, entryDn ), new Rdn( newRdn ) );
    }
View Full Code Here

            "entryUUID", UUID.randomUUID().toString() );

        AddOperationContext addContext = new AddOperationContext( null, entry );
        store.add( addContext );

        Rdn rdn = new Rdn( "sn=James" );

        store.rename( dn, rdn, true, null );

        dn = new Dn( schemaManager, "sn=James,ou=Engineering,o=Good Times Co." );
        Entry renamed = store.lookup( new LookupOperationContext( session, dn ) );
View Full Code Here

            "entryUUID", UUID.randomUUID().toString() );

        AddOperationContext addContext = new AddOperationContext( null, entry );
        store.add( addContext );

        Rdn rdn = new Rdn( "sn=Ja\\+es" );

        store.rename( dn, rdn, true, null );

        Dn dn2 = new Dn( schemaManager, "sn=Ja\\+es,ou=Engineering,o=Good Times Co." );
        String id = store.getEntryId( dn2 );
View Full Code Here

        AddOperationContext addContext = new AddOperationContext( null, childEntry );
        store.add( addContext );

        Dn parentDn = new Dn( schemaManager, "ou=Sales,o=Good Times Co." );

        Rdn rdn = new Rdn( "cn=Ryan" );

        store.moveAndRename( childDn, parentDn, rdn, childEntry, true );

        // to drop the alias indices
        childDn = new Dn( schemaManager, "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co." );
View Full Code Here

        assertFalse( session.exists( oldDn ) );

        Entry entry = session.lookup( new Dn( "cn=modifyDnWithString,ou=system" ) );
        assertNotNull( entry );

        Rdn oldRdn = oldDn.getRdn();
        assertTrue( entry.contains( oldRdn.getType(), oldRdn.getNormValue() ) );
    }
View Full Code Here

        Dn oldDn = new Dn( DN );
        Dn newDn = new Dn( "cn=modifyDnWithString,ou=system" );

        ModifyDnRequest modDnReq = new ModifyDnRequestImpl();
        modDnReq.setName( oldDn );
        modDnReq.setNewRdn( new Rdn( "cn=modifyDnWithString" ) );
        modDnReq.setDeleteOldRdn( true );

        ModifyDnFuture modifyDnFuture = connection.modifyDnAsync( modDnReq );

        ModifyDnResponse response = modifyDnFuture.get( 1000, TimeUnit.MILLISECONDS );
View Full Code Here

        try
        {
            getService().getAdminSession().rename(
                new Dn( "uid=admin,ou=system" ),
                new Rdn( "uid=alex" ),
                false );
            fail( "admin should not be able to rename his account" );
        }
        catch ( LdapNoPermissionException e )
        {
View Full Code Here

            nc = connections.get( connectionIndex );
           
            Dn personDn = present.get( i );
           
            ModifyDnRequest modReq = new ModifyDnRequestImpl();
            Rdn newRdn = new Rdn( "cn=p_rename" + i );
            modReq.setName( personDn );
            modReq.setNewRdn( newRdn );
           
            if( verbose )
            {
View Full Code Here

        partitionLookupTree.add( suffix, partition );

        assertNotNull( partitionLookupTree );
        assertTrue( partitionLookupTree.hasChildren() );
        assertTrue( partitionLookupTree.contains( new Rdn( schemaManager, "dc=com" ) ) );

        DnNode<Partition> child = partitionLookupTree.getChild( new Rdn( schemaManager, "dc=com" ) );
        assertTrue( child.hasChildren() );
        assertTrue( child.contains( new Rdn( schemaManager, "dc=example" ) ) );

        child = child.getChild( new Rdn( schemaManager, "dc=example" ) );
        assertEquals( "dc=example, dc=com", child.getElement().getSuffixDn().getName() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.api.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.