Package org.apache.directory.ldapstudio.browser.core.model

Examples of org.apache.directory.ldapstudio.browser.core.model.IConnection


    {

        if ( !"".equals( this.testPasswordText.getText() ) && this.entry != null )
        {

            IConnection connection = ( IConnection ) this.entry.getConnection().clone();;
            connection.setName( null );
            connection.setBindPrincipal( this.entry.getDn().toString() );
            connection.setBindPassword( this.testPasswordText.getText() );
            connection.setAuthMethod( IConnection.AUTH_SIMPLE );

            CheckBindJob job = new CheckBindJob( connection );
            RunnableContextJobAdapter.execute( job );
            if ( job.getExternalResult().isOK() )
            {
View Full Code Here


        IConnection[] connections = getConnectionsToPaste();
        if ( connections != null )
        {
            for ( int i = 0; i < connections.length; i++ )
            {
                IConnection newConnection = ( IConnection ) connections[i].clone();
                BrowserCorePlugin.getDefault().getConnectionManager().addConnection( newConnection );
            }
            return;
        }
View Full Code Here

        checkConnectionButton.setEnabled( !isConnectionOpened );
        checkConnectionButton.addSelectionListener( new SelectionListener()
        {
            public void widgetSelected( SelectionEvent e )
            {
                IConnection connection = getTestConnection();
                CheckNetworkParameterJob job = new CheckNetworkParameterJob( connection );
                RunnableContextJobAdapter.execute( job, runnableContext );
                if ( job.getExternalResult().isOK() )
                {
                    MessageDialog.openInformation( Display.getDefault().getActiveShell(), "Check Network Parameter",
View Full Code Here

        fetchBaseDnsButton.addSelectionListener( new SelectionListener()
        {

            public void widgetSelected( SelectionEvent e )
            {
                IConnection connection = getTestConnection();

                FetchBaseDNsJob job = new FetchBaseDNsJob( connection );
                RunnableContextJobAdapter.execute( job, runnableContext );
                if ( job.getExternalResult().isOK() )
                {
View Full Code Here

        checkSimpleAuthButton.setEnabled( false );
        checkSimpleAuthButton.addSelectionListener( new SelectionListener()
        {
            public void widgetSelected( SelectionEvent e )
            {
                IConnection connection = getTestConnection();
                CheckBindJob job = new CheckBindJob( connection );
                RunnableContextJobAdapter.execute( job, runnableContext );
                if ( job.getExternalResult().isOK() )
                {
                    MessageDialog.openInformation( Display.getDefault().getActiveShell(), "Check Authentication",
View Full Code Here

            {
                // if(selectedConnection != null) {
                SelectConnectionDialog dialog = new SelectConnectionDialog( parent.getShell(), "Select Connection",
                    selectedConnection );
                dialog.open();
                IConnection connection = dialog.getSelectedConnection();
                if ( connection != null )
                {
                    setConnection( connection );
                    notifyListeners();
                }
View Full Code Here

     * {@inheritDoc}
     */
    public void run()
    {

        IConnection connection = editor.getConnection();
        String ldif = editor.getLdifModel().toRawString();

        new ExecuteLdifJob( connection, ldif, true ).execute();

    }
View Full Code Here

        connectionUpdated( null );
        connectionCombo.addModifyListener( new ModifyListener()
        {
            public void modifyText( ModifyEvent e )
            {
                IConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
                    connectionCombo.getText() );
                setConnection( connection );
                IAction action = getAction( ExecuteLdifAction.class.getName() );
                if ( action != null )
                {
View Full Code Here

     */
    public Object[] getElements( Object parent )
    {
        if ( parent instanceof IConnection )
        {
            IConnection connection = ( IConnection ) parent;
            if ( !connectionToCategoriesMap.containsKey( connection ) )
            {
                BrowserCategory[] categories = new BrowserCategory[3];
                categories[0] = new BrowserCategory( BrowserCategory.TYPE_DIT, connection );
                categories[1] = new BrowserCategory( BrowserCategory.TYPE_SEARCHES, connection );
View Full Code Here

            }
        }
        else if ( parent instanceof BrowserCategory )
        {
            BrowserCategory category = ( BrowserCategory ) parent;
            IConnection connection = category.getParent();

            switch ( category.getType() )
            {
                case BrowserCategory.TYPE_DIT:
                {
                    // open connection when expanding DIT
                    if ( !connection.isOpened() )
                    {
                        new OpenConnectionsJob( connection ).execute();
                        return new String[]
                            { "Opening Connection..." };
                    }

                    return new Object[]
                        { connection.getRootDSE() };
                }

                case BrowserCategory.TYPE_SEARCHES:
                {
                    return connection.getSearchManager().getSearches();
                }

                case BrowserCategory.TYPE_BOOKMARKS:
                {
                    return connection.getBookmarkManager().getBookmarks();
                }
            }

            return new Object[0];
        }
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.core.model.IConnection

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.