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

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


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

        ModifyDnRequest modDnReq = new ModifyDnRequest();
        modDnReq.setEntryDn( oldDn );
        modDnReq.setNewRdn( new RDN( "cn=modifyDnWithString" ) );
        modDnReq.setDeleteOldRdn( true );

        ModifyDnFuture modifyDnFuture = connection.modifyDnAsync( modDnReq );
       
        try
View Full Code Here


        assertNotNull(bindResponse);
        assertEquals(ResultCodeEnum.SUCCESS, bindResponse.getLdapResult().getResultCode());
        assertTrue(connection.isAuthenticated());

        ModifyDnResponse resp = connection.rename(new DN("cn=TEST.FOO,ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"),
                new RDN("cn=TEST.BAR"));

        Thread.sleep(2000);

        failedACLs = map.getReadACLs(new ActiveMQQueue("TEST.FOO"));
        assertEquals("set size: " + failedACLs, 0, failedACLs.size());
View Full Code Here

        {
            throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION,
                I18n.err( I18n.ERR_357 ) );
        }

        RDN rdn = newParent.getRdn();

        if ( !schemaManager.getAttributeTypeRegistry().getOidByName( rdn.getNormType() ).equals(
            SchemaConstants.OU_AT_OID ) )
        {
            throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err( I18n.ERR_358 ) );
        }

        if ( !( ( String ) rdn.getNormValue() ).equalsIgnoreCase( SchemaConstants.COMPARATORS_AT ) )
        {
            throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err( I18n.ERR_359 ) );
        }
    }
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 ( LdapReferralException 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 ( LdapPartialResultException lpre )
        {
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 ( LdapReferralException re )
        {
View Full Code Here

    public void testRenameExistingReferralCoreAPIWithManageDsaIt() throws Exception
    {
        CoreSession session = service.getAdminSession();
        DN dnRoles = new DN( "ou=Roles,o=MNN,c=WW,ou=system" );
        DN dnGroups = new DN( "ou=Groups,o=MNN,c=WW,ou=system" );
        RDN newRdn = new RDN( "ou=Groups" );

        // First check that the object exists
        ServerEntry renamed = session.lookup( dnRoles );
        assertNotNull( renamed );
View Full Code Here

    @Test
    public void testRenameRdnExistIsReferralCoreAPIWithoutManageDsaIt() throws Exception
    {
        CoreSession session = service.getAdminSession();
        DN dn = new DN( "ou=Roles,o=MNN,c=WW,ou=system" );
        RDN newRdn = new RDN( "ou=People" );

        try
        {
            session.rename( dn, newRdn, false, false );
            fail();
View Full Code Here

    @Test
    public void testRenameRdnExistIsReferralCoreAPIWithManageDsaIt() throws Exception
    {
        CoreSession session = service.getAdminSession();
        DN dn = new DN( "ou=Roles,o=MNN,c=WW,ou=system" );
        RDN newRdn = new RDN( "ou=People" );

        try
        {
            session.rename( dn, newRdn, false, true );
            fail();
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

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.