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

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


        {
            return null;
        }
        else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 0 )
        {
            IConnection connection = attributeHierarchy.getAttribute().getEntry().getConnection();
            DN dn = null;
            return new DnValueEditorRawValueWrapper( connection, dn );
        }
        else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 1 )
        {
            IConnection connection = attributeHierarchy.getAttribute().getEntry().getConnection();
            try
            {
                DN dn = new DN( getDisplayValue( attributeHierarchy ) );
                return new DnValueEditorRawValueWrapper( connection, dn );
            }
View Full Code Here


    public Object getRawValue( IValue value )
    {
        Object o = super.getRawValue( value );
        if ( o != null && o instanceof String )
        {
            IConnection connection = value.getAttribute().getEntry().getConnection();
            try
            {
                DN dn = new DN( ( String ) o );
                return new DnValueEditorRawValueWrapper( connection, dn );
            }
View Full Code Here

     */
    public void select( Object obj )
    {
        if ( obj instanceof IConnection )
        {
            IConnection connection = ( IConnection ) obj;

            mainWidget.getViewer().reveal( connection );
            mainWidget.getViewer().refresh( connection, true );
            mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
        }
View Full Code Here

        {
            if ( ConnectionTransfer.getInstance().isSupportedType( event.currentDataType ) )
            {
                if ( event.item != null && event.item.getData() instanceof IConnection )
                {
                    IConnection overConn = ( IConnection ) event.item.getData();
                    if ( event.widget instanceof DropTarget )
                    {
                        DropTarget dropTarget = ( DropTarget ) event.widget;
                        if ( dropTarget.getControl() instanceof Table )
                        {
View Full Code Here

        {
            if ( ConnectionTransfer.getInstance().isSupportedType( event.currentDataType ) )
            {
                // get connection to handle
                IConnection[] connections = ( IConnection[] ) event.data;
                IConnection targetConnection = ( IConnection ) event.item.getData();

                if ( event.detail == DND.DROP_MOVE )
                {
                    boolean fromTop = connectionManager.indexOf( connections[0] ) < connectionManager
                        .indexOf( targetConnection );
                    for ( int i = 0; i < connections.length; i++ )
                    {
                        connectionManager.removeConnection( connections[i] );
                    }
                    for ( int i = 0; i < connections.length; i++ )
                    {
                        int index = connectionManager.indexOf( targetConnection );
                        if ( fromTop )
                        {
                            index++;
                            connectionManager.addConnection( index + i, connections[i] );
                        }
                        else
                        {
                            connectionManager.addConnection( index, connections[i] );
                        }
                    }
                }
                else if ( event.detail == DND.DROP_COPY )
                {
                    for ( int i = 0; i < connections.length; i++ )
                    {
                        IConnection newConnection = ( IConnection ) connections[i].clone();
                        int index = connectionManager.indexOf( targetConnection );
                        connectionManager.addConnection( index + i + 1, newConnection );
                    }
                }
            }
View Full Code Here

        cacheDateText = BaseWidgetUtils.createWrappedLabeledText( cacheComposite, "", 1 );

        BaseWidgetUtils.createLabel( cacheComposite, "Cache Size:", 1 );
        cacheSizeText = BaseWidgetUtils.createWrappedLabeledText( cacheComposite, "", 1 );

        IConnection connection = ConnectionPropertyPage.getConnection( getElement() );
        this.connectionUpdated( connection );

        return composite;
    }
View Full Code Here

    }


    private void reloadSchema()
    {
        final IConnection connection = ConnectionPropertyPage.getConnection( getElement() );
        ReloadSchemasJob job = new ReloadSchemasJob( new IConnection[]
            { connection } );
        RunnableContextJobAdapter.execute( job );
        this.connectionUpdated( connection );
    }
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

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.