Package org.apache.directory.server.core.api

Examples of org.apache.directory.server.core.api.CoreSession.move()


                        throw new IllegalStateException( I18n.err( I18n.ERR_475 ) );
                    }
                    else if ( oldRdn.equals( newRdn ) )
                    {
                        // Same rdn : it's a move
                        session.move( dn, newSuperior );
                    }
                    else
                    {
                        // it's a move and rename
                        session.moveAndRename( dn, newSuperior, newRdn, entry.isDeleteOldRdn() );
View Full Code Here


                }
            }
            else if ( req.getNewSuperior() != null )
            {
                req.setNewRdn( null );
                coreSession.move( req );
            }
            else
            {
                result.setDiagnosticMessage( "Attempt to move entry onto itself." );
                result.setResultCode( ResultCodeEnum.ENTRY_ALREADY_EXISTS );
View Full Code Here

        Dn dn = new Dn( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" );
        Dn newParent = new Dn( "cn=Emmanuel Lecharny,o=PNN,c=WW,ou=system" );
       
        try
        {
            coreSession.move( dn, newParent, false );
            fail();
        }
        catch ( LdapReferralException re )
        {
            int nbRefs = 0;
View Full Code Here

        Dn dn = new Dn( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" );
        Dn newParent = new Dn( "cn=Emmanuel Lecharny,o=PNN,c=WW,ou=system" );
       
        try
        {
            coreSession.move( dn, newParent, true );
            fail();
        }
        catch ( LdapPartialResultException lpre )
        {
            assertTrue( true );
View Full Code Here

        Dn orig = new Dn( "cn=Alex,ou=roles,o=MNN,c=WW,ou=system" );
        Dn dest = new Dn( "cn=Alex,ou=People,o=MNN,c=WW,ou=system" );
       
        try
        {
            coreSession.move( orig, dest, false );
            fail();
        }
        catch ( LdapReferralException re )
        {
            int nbRefs = 0;
View Full Code Here

        Dn orig = new Dn( "cn=Alex,ou=roles,o=MNN,c=WW,ou=system" );
        Dn dest = new Dn( "cn=Alex,ou=People,o=MNN,c=WW,ou=system" );
       
        try
        {
            coreSession.move( orig, dest, true );
            fail();
        }
        catch ( LdapPartialResultException lpre )
        {
            assertTrue( true );
View Full Code Here

                        throw new IllegalStateException( I18n.err( I18n.ERR_475 ) );
                    }
                    else if ( oldRdn.equals( newRdn ) )
                    {
                        // Same rdn : it's a move
                        session.move( dn, newSuperior );
                    }
                    else
                    {
                        // it's a move and rename
                        session.moveAndRename( dn, newSuperior, newRdn, entry.isDeleteOldRdn() );
View Full Code Here

                }
            }
            else if ( req.getNewSuperior() != null )
            {
                req.setNewRdn( null );
                coreSession.move( req );
            }
            else
            {
                result.setDiagnosticMessage( "Attempt to move entry onto itself." );
                result.setResultCode( ResultCodeEnum.ENTRY_ALREADY_EXISTS );
View Full Code Here

        Dn dn = new Dn( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" );
        Dn newParent = new Dn( "cn=Emmanuel Lecharny,o=PNN,c=WW,ou=system" );
       
        try
        {
            coreSession.move( dn, newParent, false );
            fail();
        }
        catch ( LdapReferralException re )
        {
            int nbRefs = 0;
View Full Code Here

        Dn dn = new Dn( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" );
        Dn newParent = new Dn( "cn=Emmanuel Lecharny,o=PNN,c=WW,ou=system" );
       
        try
        {
            coreSession.move( dn, newParent, true );
            fail();
        }
        catch ( LdapPartialResultException lpre )
        {
            assertTrue( true );
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.