Package javax.naming.ldap

Examples of javax.naming.ldap.ManageReferralControl


        {
            String referral = (String)re.getReferralInfo();
            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
        }
       
        ((LdapContext)ctx).setRequestControls( new javax.naming.ldap.Control[]{new ManageReferralControl()} );

        // Now let's move the entry
        ctx.rename( "c=america,ou=Countries,ou=system", "c=us,ou=system" );

        controls.setSearchScope( SearchControls.OBJECT_SCOPE );
View Full Code Here


        if ( referralsHandlingMethod == ReferralHandlingMethod.MANAGE )
        {
            if ( currentControls == null )
            {
                localControls = new Control[]
                    { new ManageReferralControl( false ) };
            }
            else
            {
                boolean manageDsaItControlAlreadyContained = false;
                for ( Control control : currentControls )
                {
                    if ( ManageReferralControl.OID.equals( control.getID() ) )
                    {
                        manageDsaItControlAlreadyContained = true;
                        break;
                    }
                }
                if ( !manageDsaItControlAlreadyContained )
                {
                    localControls = new Control[currentControls.length + 1];
                    System.arraycopy( currentControls, 0, localControls, 0, currentControls.length );
                    localControls[localControls.length - 1] = new ManageReferralControl( false );
                }
            }
        }
        return localControls;
    }
View Full Code Here

        {
            String referral = (String)re.getReferralInfo();
            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
        }
       
        ((LdapContext)ctx).setRequestControls( new javax.naming.ldap.Control[]{new ManageReferralControl()} );

        // Now let's move the entry
        ctx.rename( "c=america,ou=Countries,ou=system", "c=USA,ou=Countries,ou=system" );

        controls.setSearchScope( SearchControls.OBJECT_SCOPE );
View Full Code Here

        {
            String referral = (String)re.getReferralInfo();
            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
        }
       
        ((LdapContext)ctx).setRequestControls( new javax.naming.ldap.Control[]{new ManageReferralControl()} );

        // Now let's move the entry
        ctx.rename( "c=america,ou=Countries,ou=system", "c=america,ou=system" );

        controls.setSearchScope( SearchControls.OBJECT_SCOPE );
View Full Code Here

        {
            String referral = (String)re.getReferralInfo();
            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
        }
       
        ((LdapContext)ctx).setRequestControls( new javax.naming.ldap.Control[]{new ManageReferralControl()} );

        // Now let's move the entry
        ctx.rename( "c=america,ou=Countries,ou=system", "c=us,ou=system" );

        controls.setSearchScope( SearchControls.OBJECT_SCOPE );
View Full Code Here

        if ( referralsHandlingMethod == ReferralHandlingMethod.MANAGE )
        {
            if ( currentControls == null )
            {
                localControls = new Control[]
                    { new ManageReferralControl( false ) };
            }
            else
            {
                boolean manageDsaItControlAlreadyContained = false;
                for ( Control control : currentControls )
                {
                    if ( ManageReferralControl.OID.equals( control.getID() ) )
                    {
                        manageDsaItControlAlreadyContained = true;
                        break;
                    }
                }
                if ( !manageDsaItControlAlreadyContained )
                {
                    localControls = new Control[currentControls.length + 1];
                    System.arraycopy( currentControls, 0, localControls, 0, currentControls.length );
                    localControls[localControls.length - 1] = new ManageReferralControl( false );
                }
            }
        }
        return localControls;
    }
View Full Code Here

        // ManageDsaIT control
        Control[] controls = null;
        if ( entryToCopy.isReferral() )
        {
            controls = new Control[]
                { new ManageReferralControl( false ) };
        }

        NamingEnumeration<SearchResult> result = entryToCopy
            .getBrowserConnection()
            .getConnection()
View Full Code Here

                Control[] controls = null;
                if ( newAttributes.get( SchemaConstants.OBJECT_CLASS_AT ) != null
                    && newAttributes.get( SchemaConstants.OBJECT_CLASS_AT ).contains( SchemaConstants.REFERRAL_OC ) )
                {
                    controls = new Control[]
                        { new ManageReferralControl( false ) };
                }

                // create entry
                targetBrowserConnection.getConnection().getConnectionWrapper()
                    .createEntry( newLdapDn.getName(), newAttributes, controls, dummyMonitor, null );
View Full Code Here

            controlList.add( treeDeleteControl );
        }
        if ( useManageDsaItControl
            && browserConnection.getRootDSE().isControlSupported( StudioControl.MANAGEDSAIT_CONTROL.getOid() ) )
        {
            controlList.add( new ManageReferralControl( false ) );
        }
        Control[] controls = controlList.toArray( new Control[controlList.size()] );

        // delete entry
        if ( browserConnection.getConnection() != null )
View Full Code Here

        // ManageDsaIT control
        Control[] controls = null;
        if ( entryToCreate.isReferral() )
        {
            controls = new Control[]
                { new ManageReferralControl( false ) };
        }

        browserConnection.getConnection().getConnectionWrapper()
            .createEntry( dn, jndiAttributes, controls, monitor, null );
    }
View Full Code Here

TOP

Related Classes of javax.naming.ldap.ManageReferralControl

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.