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

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


        if ( dn == null || entry == null )
        {
            return;
        }

        RDN rdn = dn.getRdn();

        // Loop on all the AVAs
        for ( AVA ava : rdn )
        {
            Value<?> value = ava.getNormValue();
View Full Code Here


         * new RDN.
         */

        if ( deleteOldRdn )
        {
            RDN oldRdn = updn.getRdn();
            for ( AVA oldAtav : oldRdn )
            {
                // check if the new ATAV is part of the old RDN
                // if that is the case we do not remove the ATAV
                boolean mustRemove = true;
View Full Code Here

        try
        {
            service.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

    public void testMoveAndRenameEntrySuperiorHasReferralAncestorCoreAPIWithoutManageDsaIT() throws Exception
    {
        CoreSession coreSession = service.getAdminSession();
        DN dn = new DN( "cn=Emmanuel Lecharny,ou=apache,ou=Roles,o=MNN,c=WW,ou=system" );
        DN newParent = new DN( "o=PNN,c=WW,ou=system" );
        RDN newRdn = new RDN( "cn=Alex" );
       
        try
        {
            coreSession.moveAndRename( dn, newParent, newRdn, false, false );
            fail();
View Full Code Here

    public void testMoveAndRenameSuperiorHasReferralAncestorCoreAPIWithManageDsaIT() throws Exception
    {
        CoreSession coreSession = service.getAdminSession();
        DN dn = new DN( "cn=Emmanuel Lecharny,ou=apache,ou=Roles,o=MNN,c=WW,ou=system" );
        DN newParent = new DN( "o=PNN,c=WW,ou=system" );
        RDN newRdn = new RDN( "cn=Alex" );
       
        try
        {
            coreSession.moveAndRename( dn, newParent, newRdn, false, true );
            fail();
View Full Code Here

    public void testMoveAndRenameIsReferralCoreAPIWithoutManageDsaIT() throws Exception
    {
        CoreSession coreSession = service.getAdminSession();
        DN dn = new DN( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" );
        DN newParent = new DN( "o=PNN,c=WW,ou=system" );
        RDN newRdn = new RDN( "cn=Alex" );
       
        try
        {
            coreSession.moveAndRename( dn, newParent, newRdn, false, false );
            fail();
View Full Code Here

    public void testMoveAndRenameIsReferralCoreAPIWithManageDsaIT() throws Exception
    {
        CoreSession coreSession = service.getAdminSession();
        DN dn = new DN( "cn=Emmanuel Lecharny,ou=apache,ou=Roles,o=MNN,c=WW,ou=system" );
        DN newParent = new DN( "o=PNN,c=WW,ou=system" );
        RDN newRdn = new RDN( "cn=Alex" );
       
        try
        {
            coreSession.moveAndRename( dn, newParent, newRdn, false, true );
            fail();
View Full Code Here

        CoreSession session = service.getAdminSession();

        try
        {
            DN dn = new DN( "cn=Emmanuel Lecharny,ou=apache,ou=roles,o=MNN,c=WW,ou=system" );
            RDN newRdn = new RDN( "cn=Alex Karasulu" );
            session.rename( dn, newRdn, false, false );
            fail();
        }
        catch ( ReferralException re )
        {
View Full Code Here

    {
        CoreSession session = service.getAdminSession();
        try
        {
            DN dn = new DN( "cn=Emmanuel Lecharny,ou=apache,ou=roles,o=MNN,c=WW,ou=system" );
            RDN newRdn = new RDN( "cn=Alex Karasulu" );
            session.rename( dn, newRdn, false, true );
            fail();
        }
        catch ( PartialResultException pre )
        {
View Full Code Here

        CoreSession session = service.getAdminSession();

        try
        {
            DN dn = new DN( "ou=roles,o=MNN,c=WW,ou=system" );
            RDN newRdn = new RDN( "cn=Alex Karasulu" );
            session.rename( dn, newRdn, false, false );
            fail();
        }
        catch ( ReferralException re )
        {
View Full Code Here

TOP

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