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

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


    {
        Object rawValue = null;
        Object value = getValue();
        if ( value != null )
        {
            IConnection connection = getConnection();
            rawValue = valueEditor.getRawValue( connection, value );
        }

        return rawValue;
    }
View Full Code Here


    {
        // only if another connection is selected
        if ( connection != viewer.getInput() )
        {

            IConnection currentConnection = viewer.getInput() instanceof IConnection ? ( IConnection ) viewer
                .getInput() : null;

            // save expanded elements and selection
            if ( currentConnection != null )
            {
View Full Code Here

        try
        {
            String type = memento.getString( "TYPE" );
            if ( "IEntry".equals( type ) )
            {
                IConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
                    memento.getString( "CONNECTION" ) );
                DN dn = new DN( memento.getString( "DN" ) );
                IEntry entry = connection.getEntryFromCache( dn );
                super.setInput( new EntryEditorInput( entry ) );
            }
            else if ( "ISearchResult".equals( type ) )
            {
                IConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
                    memento.getString( "CONNECTION" ) );
                ISearch search = connection.getSearchManager().getSearch( memento.getString( "SEARCH" ) );
                ISearchResult[] searchResults = search.getSearchResults();
                DN dn = new DN( memento.getString( "DN" ) );
                for ( int i = 0; i < searchResults.length; i++ )
                {
                    if ( dn.equals( searchResults[i].getDn() ) )
                    {
                        super.setInput( new EntryEditorInput( searchResults[i] ) );
                        break;
                    }
                }
            }
            else if ( "IBookmark".equals( type ) )
            {
                IConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
                    memento.getString( "CONNECTION" ) );
                IBookmark bookmark = connection.getBookmarkManager().getBookmark( memento.getString( "BOOKMARK" ) );
                super.setInput( new EntryEditorInput( bookmark ) );
            }
        }
        catch ( NameException e )
        {
View Full Code Here

            {
                // Do not set the input of the schema browser if
                // the selection was changed programatically.
                if ( !inChange )
                {
                    IConnection connection = getConnection();
                    schemaPage.getSchemaBrowser().setInput( new SchemaBrowserInput( connection, null ) );
                }
            }
        } );
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void restoreState( IMemento memento )
    {
        IConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
            memento.getString( "CONNECTION" ) );
        ISearch search = connection.getSearchManager().getSearch( memento.getString( "SEARCH" ) );
        super.setInput( new SearchResultEditorInput( search ) );
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void run()
    {
        final IConnection connection = schemaPage.getConnection();
        if ( connection != null )
        {
            new ReloadSchemasJob( new IConnection[]
                { connection } ).execute();
            schemaPage.getSchemaBrowser().refresh();
View Full Code Here

        if ( input instanceof SchemaBrowserInput && tabFolder != null )
        {
            SchemaBrowserInput sbi = ( SchemaBrowserInput ) input;

            // set connection;
            IConnection connection = sbi.getConnection();
            setConnection( connection );

            // set schema element and activate tab
            SchemaPart schemaElement = sbi.getSchemaElement();
            if ( schemaElement instanceof ObjectClassDescription )
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

     */
    private IConnection getConnection()
    {
        if ( ( getSelectedValues().length + getSelectedAttributes().length ) + getSelectedAttributeHierarchies().length == 1 )
        {
            IConnection connection = null;
            if ( getSelectedValues().length == 1 )
            {
                connection = getSelectedValues()[0].getAttribute().getEntry().getConnection();
            }
            else if ( getSelectedAttributes().length == 1 )
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.