Package org.apache.directory.shared.ldap.util

Examples of org.apache.directory.shared.ldap.util.LdapURL


        ConnectionParameterPage[] connectionParameterPages = ConnectionParameterPageManager
            .getConnectionParameterPages();
        for ( Connection connection : connections )
        {
            ConnectionParameter parameter = connection.getConnectionParameter();
            LdapURL ldapUrl = new LdapURL();
            ldapUrl.setDn( LdapDN.EMPTY_LDAPDN );
            for ( ConnectionParameterPage connectionParameterPage : connectionParameterPages )
            {
                connectionParameterPage.mergeParametersToLdapURL( parameter, ldapUrl );
            }
            sb.append( ldapUrl.toString() );
            sb.append( ConnectionCoreConstants.LINE_SEPARATOR );
        }
        return sb.toString();
    }
View Full Code Here


        {
            Connection[] connections = ConnectionCorePlugin.getDefault().getConnectionManager().getConnections();
            for ( int i = 0; i < connections.length; i++ )
            {
                Connection connection = connections[i];
                LdapURL connectionUrl = connection.getUrl();
                if ( connectionUrl != null && referralUrl.toString().startsWith( connectionUrl.toString() ) )
                {
                    mainWidget.getViewer().reveal( connection );
                    mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
                }
            }
View Full Code Here

                line = line.trim();
                if ( StringUtils.isNotEmpty( line ) )
                {
                    try
                    {
                        LdapURL ldapUrl = new LdapURL( line );
                        ConnectionParameter parameter = new ConnectionParameter();
                        for ( ConnectionParameterPage connectionParameterPage : connectionParameterPages )
                        {
                            connectionParameterPage.mergeLdapUrlToParameters( ldapUrl, parameter );
                        }
View Full Code Here

            {
                for ( Iterator<Value<?>> iterator = refAttribute.iterator(); iterator.hasNext(); )
                {
                    Value<?> value = ( Value<?> ) iterator.next();

                    srr.addSearchResultReference( new LdapURL( ( String ) value.get() ) );
                }
            }

            return srr;
        }
View Full Code Here

     * @param entry the entry
     * @return the LDAP URL
     */
    public static LdapURL getLdapURL( IBrowserConnection browserConnection )
    {
        LdapURL url = new LdapURL();
        if ( browserConnection.getConnection() != null )
        {
            if ( browserConnection.getConnection().getEncryptionMethod() == EncryptionMethod.LDAPS )
            {
                url.setScheme( LdapURL.LDAPS_SCHEME );
            }
            else
            {
                url.setScheme( LdapURL.LDAP_SCHEME );
            }
            url.setHost( browserConnection.getConnection().getHost() );
            url.setPort( browserConnection.getConnection().getPort() );
        }
        return url;
    }
View Full Code Here

     * @param entry the entry
     * @return the LDAP URL
     */
    public static LdapURL getLdapURL( IEntry entry )
    {
        LdapURL url = getLdapURL( entry.getBrowserConnection() );
        url.setDn( entry.getDn() );
        return url;
    }
View Full Code Here

     * @param search the search
     * @return the LDAP URL
     */
    public static LdapURL getLdapURL( ISearch search )
    {
        LdapURL url = getLdapURL( search.getBrowserConnection() );
        url.setDn( search.getSearchBase() );
        if ( search.getReturningAttributes() != null )
        {
            url.setAttributes( Arrays.asList( search.getReturningAttributes() ) );
        }
        url.setScope( search.getScope().getOrdinal() );
        url.setFilter( search.getFilter() );
        return url;
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.util.LdapURL

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.