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

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


        EntryEditorInput eei = getEntryEditorInput();
        if ( eei != null )
        {
            if ( eei.getEntryInput() != null )
            {
                IEntry entry = eei.getEntryInput();
                memento.putString( "TYPE", "IEntry" );
                memento.putString( "DN", entry.getDn().toString() );
                memento.putString( "CONNECTION", entry.getConnection().getName() );
            }
            else if ( eei.getSearchResultInput() != null )
            {
                ISearchResult searchResult = eei.getSearchResultInput();
                memento.putString( "TYPE", "ISearchResult" );
View Full Code Here


            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(
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void decorate( Object element, IDecoration decoration )
    {
        IEntry entry = null;

        if ( element instanceof ISearchResult )
        {
            ISearchResult searchResult = ( ISearchResult ) element;
            entry = searchResult.getEntry();
            decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
                BrowserUIConstants.IMG_OVR_SEARCHRESULT ), IDecoration.BOTTOM_RIGHT );
        }
        else if ( element instanceof IEntry )
        {
            entry = ( IEntry ) element;
            if ( entry.getChildrenFilter() != null )
            {
                decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
                    BrowserUIConstants.IMG_OVR_FILTERED ), IDecoration.BOTTOM_RIGHT );
            }
        }
        else
        {
            decoration.addOverlay( null, IDecoration.BOTTOM_RIGHT );
        }

        if ( entry != null )
        {
            if ( !entry.isConsistent() )
            {
                decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
                    BrowserUIConstants.IMG_OVR_ERROR ), IDecoration.BOTTOM_LEFT );
            }
            else if ( !entry.isDirectoryEntry() )
            {
                decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
                    BrowserUIConstants.IMG_OVR_WARNING ), IDecoration.BOTTOM_LEFT );
            }
            else
View Full Code Here

        super.setInput( input );

        if ( input instanceof EntryEditorInput && universalListener != null )
        {
            EntryEditorInput eei = ( EntryEditorInput ) input;
            IEntry entry = eei.getResolvedEntry();

            // inform listener
            universalListener.setInput( entry );

            // mark location for back/forward history navigation
View Full Code Here

        if ( moveDialog.open() == Dialog.OK )
        {
            DN newParentDn = moveDialog.getParentDn();
            if ( newParentDn != null /* && !newRdn.equals(entry.getRdn()) */)
            {
                IEntry newParentEntry = entries[0].getConnection().getEntryFromCache( newParentDn );
                if ( newParentEntry != null )
                {
                    new MoveEntriesJob( entries, newParentEntry ).execute();
                }
            }
View Full Code Here

        final DN dn = new DN( rdns[0], parentDns[0] );

        // check if parent exists or new entry already exists
        ReadEntryJob readEntryJob1 = new ReadEntryJob( wizard.getSelectedConnection(), parentDns[0] );
        RunnableContextJobAdapter.execute( readEntryJob1, getContainer(), false );
        IEntry parentEntry = readEntryJob1.getReadEntry();
        if ( parentEntry == null )
        {
            getShell().getDisplay().syncExec( new Runnable()
            {
                public void run()
                {
                    MessageDialog.openError( getShell(), "Error", "Parent " + dnBuilderWidget.getParentDn().toString()
                        + " doesn't exists" );
                }
            } );
            return null;
        }
        ReadEntryJob readEntryJob2 = new ReadEntryJob( wizard.getSelectedConnection(), dn );
        RunnableContextJobAdapter.execute( readEntryJob2, getContainer(), false );
        IEntry entry = readEntryJob2.getReadEntry();
        if ( entry != null )
        {
            getShell().getDisplay().syncExec( new Runnable()
            {
                public void run()
View Full Code Here

        ocViewer.getList().setLayoutData( new GridData( GridData.FILL_BOTH ) );
        ocViewer.setContentProvider( new ArrayContentProvider() );
        ocViewer.setLabelProvider( new LabelProvider() );
        if ( EntryPropertyPage.getEntry( getElement() ) != null )
        {
            IEntry entry = EntryPropertyPage.getEntry( getElement() );
            if ( entry != null )
            {
                Object[] ocds = entry.getSubschema().getObjectClassNames();
                ocViewer.setInput( ocds );
            }
        }
        this.ocTab = new TabItem( this.tabFolder, SWT.NONE );
        this.ocTab.setText( "Object Classes" );
        this.ocTab.setControl( ocComposite );

        Composite atComposite = new Composite( this.tabFolder, SWT.NONE );
        atComposite.setLayoutData( new RowData( 10, 10 ) );
        GridLayout atLayout = new GridLayout();
        atComposite.setLayout( atLayout );
        ListViewer atViewer = new ListViewer( atComposite );
        atViewer.getList().setLayoutData( new GridData( GridData.FILL_BOTH ) );
        atViewer.setContentProvider( new ArrayContentProvider() );
        atViewer.setLabelProvider( new LabelProvider() );
        if ( EntryPropertyPage.getEntry( getElement() ) != null )
        {
            IEntry entry = EntryPropertyPage.getEntry( getElement() );
            if ( entry != null )
            {
                Object[] atds = entry.getSubschema().getAllAttributeNames();
                atViewer.setInput( atds );
            }
        }
        this.atTab = new TabItem( this.tabFolder, SWT.NONE );
        this.atTab.setText( "Attribute Types" );
View Full Code Here

        {
            entryList.add( getSelectedSearchResults()[i].getEntry() );
        }
        for ( int i = 0; i < getSelectedBookmarks().length; i++ )
        {
            IEntry entry = getSelectedBookmarks()[0].getConnection().getEntryFromCache(
                getSelectedBookmarks()[0].getDn() );
            if ( entry == null )
            {
                ReadEntryJob job = new ReadEntryJob( getSelectedBookmarks()[0].getConnection(),
                    getSelectedBookmarks()[0].getDn() );
View Full Code Here

    }


    private void reloadOperationalAttributes()
    {
        IEntry entry = EntryPropertyPage.getEntry( getElement() );
        InitializeAttributesJob job = new InitializeAttributesJob( new IEntry[]
            { entry }, true );
        RunnableContextJobAdapter.execute( job );

        this.entryUpdated( entry );
View Full Code Here

    }


    private void reloadEntry()
    {
        IEntry entry = EntryPropertyPage.getEntry( getElement() );
        InitializeChildrenJob job1 = new InitializeChildrenJob( new IEntry[]
            { entry } );
        InitializeAttributesJob job2 = new InitializeAttributesJob( new IEntry[]
            { entry }, true );
        RunnableContextJobAdapter.execute( job1 );
View Full Code Here

TOP

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

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.