Package org.apache.directory.studio.ldapbrowser.core.model

Examples of org.apache.directory.studio.ldapbrowser.core.model.IContinuation


            entry = null;
        }

        if ( entry != null && entry instanceof IContinuation )
        {
            IContinuation continuation = ( IContinuation ) entry;
            if ( continuation.getState() == State.UNRESOLVED )
            {
                continuation.resolve();
            }
        }

        String editorId = extension.getEditorId();
View Full Code Here


            entry = null;
        }

        if ( entry != null && entry instanceof IContinuation )
        {
            IContinuation continuation = ( IContinuation ) entry;
            if ( continuation.getState() == State.UNRESOLVED )
            {
                continuation.resolve();
            }
        }

        String editorId = extension.getEditorId();
View Full Code Here

        {
            for ( IEntry entry : entries )
            {
                if ( entry instanceof IContinuation )
                {
                    IContinuation continuation = ( IContinuation ) entry;
                    if ( continuation.getState() != State.RESOLVED )
                    {
                        continuation.resolve();
                    }
                }
            }
            InitializeChildrenRunnable initializeChildrenRunnable = new InitializeChildrenRunnable( true, entries
                .toArray( new IEntry[0] ) );
            new StudioBrowserJob( initializeChildrenRunnable ).execute();
        }
        if ( searches.length > 0 )
        {
            for ( ISearch search : searches )
            {
                search.setSearchResults( null );
                if ( search instanceof IContinuation )
                {
                    IContinuation continuation = ( IContinuation ) search;
                    if ( continuation.getState() != State.RESOLVED )
                    {
                        continuation.resolve();
                    }
                }
            }
            new StudioBrowserJob( new SearchRunnable( searches ) ).execute();
        }
View Full Code Here

        {
            for ( IEntry entry : entries )
            {
                if ( entry instanceof IContinuation )
                {
                    IContinuation continuation = ( IContinuation ) entry;
                    if ( continuation.getState() != State.RESOLVED )
                    {
                        continuation.resolve();
                    }
                }
            }
            InitializeChildrenRunnable initializeChildrenRunnable = new InitializeChildrenRunnable( true, entries
                .toArray( new IEntry[0] ) );
            new StudioBrowserJob( initializeChildrenRunnable ).execute();
        }
        if ( searches.length > 0 )
        {
            for ( ISearch search : searches )
            {
                search.setSearchResults( null );
                if ( search instanceof IContinuation )
                {
                    IContinuation continuation = ( IContinuation ) search;
                    if ( continuation.getState() != State.RESOLVED )
                    {
                        continuation.resolve();
                    }
                }
            }
            new StudioBrowserJob( new SearchRunnable( searches ) ).execute();
        }
View Full Code Here

        {
            final IEntry parentEntry = ( IEntry ) parent;

            if ( parentEntry instanceof IContinuation )
            {
                IContinuation continuation = ( IContinuation ) parentEntry;
                if ( continuation.getState() == State.UNRESOLVED )
                {
                    continuation.resolve();
                }
                if ( continuation.getState() == State.CANCELED )
                {
                    return new Object[0];
                }
            }

            if ( !parentEntry.isChildrenInitialized() )
            {
                new StudioBrowserJob( new InitializeChildrenRunnable( false, parentEntry ) ).execute();
                return new String[]
                    { Messages.getString( "BrowserContentProvider.FetchingEntries" ) }; //$NON-NLS-1$
            }
            else if ( parentEntry.getChildrenCount() <= preferences.getFoldingSize() || !preferences.isUseFolding() )
            {
                if ( entryToEntryPagesMap.containsKey( parentEntry ) )
                {
                    entryToEntryPagesMap.remove( parentEntry );
                }

                IEntry[] results = parentEntry.getChildren();

                List<Object> objects = new ArrayList<Object>();

                SearchManager sm = parentEntry.getBrowserConnection().getSearchManager();
                if ( sm != null && sm.getQuickSearch() != null
                    && parentEntry.getDn().equals( sm.getQuickSearch().getSearchBase() ) )
                {
                    objects.add( sm.getQuickSearch() );
                }

                if ( parentEntry.getTopPageChildrenRunnable() != null )
                {
                    objects.add( parentEntry.getTopPageChildrenRunnable() );
                }

                objects.addAll( Arrays.asList( results ) );

                if ( parentEntry.getNextPageChildrenRunnable() != null )
                {
                    objects.add( parentEntry.getNextPageChildrenRunnable() );
                }

                return objects.toArray();
            }
            else
            {
                BrowserEntryPage[] entryPages = getEntryPages( parentEntry );;
                return entryPages;
            }
        }
        else if ( parent instanceof BrowserSearchResultPage )
        {
            BrowserSearchResultPage srPage = ( BrowserSearchResultPage ) parent;
            Object[] objects = srPage.getChildren();
            if ( objects == null )
            {
                return new String[]
                    { Messages.getString( "BrowserContentProvider.FetchingSearchResults" ) }; //$NON-NLS-1$
            }
            else if ( objects instanceof ISearchResult[] )
            {
                ISearchResult[] srs = ( ISearchResult[] ) objects;
                return srs;
            }
            else
            {
                return objects;
            }
        }
        else if ( parent instanceof ISearch )
        {
            ISearch search = ( ISearch ) parent;
            if ( search instanceof IContinuation )
            {
                IContinuation continuation = ( IContinuation ) search;
                if ( continuation.getState() == State.UNRESOLVED )
                {
                    continuation.resolve();
                }
                if ( continuation.getState() == State.CANCELED )
                {
                    return new Object[0];
                }
            }
View Full Code Here

        if ( entry != null )
        {
            if ( entry instanceof IContinuation )
            {
                IContinuation continuation = ( IContinuation ) entry;
                if ( continuation.getState() == State.UNRESOLVED )
                {
                    continuation.resolve();
                }
            }
            else
            {
                // Making sure attributes are initialized
View Full Code Here

        {
            final IEntry parentEntry = ( IEntry ) parent;

            if ( parentEntry instanceof IContinuation )
            {
                IContinuation continuation = ( IContinuation ) parentEntry;
                if ( continuation.getState() == State.UNRESOLVED )
                {
                    continuation.resolve();
                }
                if ( continuation.getState() == State.CANCELED )
                {
                    return new Object[0];
                }
            }

            if ( !parentEntry.isChildrenInitialized() )
            {
                new StudioBrowserJob( new InitializeChildrenRunnable( false, parentEntry ) ).execute();
                return new String[]
                    { Messages.getString( "BrowserContentProvider.FetchingEntries" ) }; //$NON-NLS-1$
            }
            else if ( parentEntry.getChildrenCount() <= preferences.getFoldingSize() || !preferences.isUseFolding() )
            {
                if ( entryToEntryPagesMap.containsKey( parentEntry ) )
                {
                    entryToEntryPagesMap.remove( parentEntry );
                }

                IEntry[] results = parentEntry.getChildren();

                List<Object> objects = new ArrayList<Object>();

                if ( widget.getQuickSearch() != null
                    && parentEntry.getDn().equals( widget.getQuickSearch().getSearchBase() ) )
                {
                    objects.add( widget.getQuickSearch() );
                }

                if ( parentEntry.getTopPageChildrenRunnable() != null )
                {
                    objects.add( parentEntry.getTopPageChildrenRunnable() );
                }

                objects.addAll( Arrays.asList( results ) );

                if ( parentEntry.getNextPageChildrenRunnable() != null )
                {
                    objects.add( parentEntry.getNextPageChildrenRunnable() );
                }

                return objects.toArray();
            }
            else
            {
                BrowserEntryPage[] entryPages = getEntryPages( parentEntry );

                List<Object> objects = new ArrayList<Object>();

                if ( widget.getQuickSearch() != null
                    && parentEntry.getDn().equals( widget.getQuickSearch().getSearchBase() ) )
                {
                    objects.add( widget.getQuickSearch() );
                }

                objects.addAll( Arrays.asList( entryPages ) );

                return objects.toArray();
            }
        }
        else if ( parent instanceof BrowserSearchResultPage )
        {
            BrowserSearchResultPage srPage = ( BrowserSearchResultPage ) parent;
            Object[] objects = srPage.getChildren();
            if ( objects == null )
            {
                return new String[]
                    { Messages.getString( "BrowserContentProvider.FetchingSearchResults" ) }; //$NON-NLS-1$
            }
            else if ( objects instanceof ISearchResult[] )
            {
                ISearchResult[] srs = ( ISearchResult[] ) objects;
                return srs;
            }
            else
            {
                return objects;
            }
        }
        else if ( parent instanceof ISearch )
        {
            ISearch search = ( ISearch ) parent;
            if ( search instanceof IContinuation )
            {
                IContinuation continuation = ( IContinuation ) search;
                if ( continuation.getState() == State.UNRESOLVED )
                {
                    continuation.resolve();
                }
                if ( continuation.getState() == State.CANCELED )
                {
                    return new Object[0];
                }
            }
View Full Code Here

        {
            for ( IEntry entry : entries )
            {
                if ( entry instanceof IContinuation )
                {
                    IContinuation continuation = ( IContinuation ) entry;
                    if ( continuation.getState() != State.RESOLVED )
                    {
                        continuation.resolve();
                    }
                }
            }
            InitializeChildrenRunnable initializeChildrenRunnable = new InitializeChildrenRunnable( true, entries
                .toArray( new IEntry[0] ) );
            new StudioBrowserJob( initializeChildrenRunnable ).execute();
        }
        if ( searches.length > 0 )
        {
            for ( ISearch search : searches )
            {
                search.setSearchResults( null );
                if ( search instanceof IContinuation )
                {
                    IContinuation continuation = ( IContinuation ) search;
                    if ( continuation.getState() != State.RESOLVED )
                    {
                        continuation.resolve();
                    }
                }
            }
            new StudioBrowserJob( new SearchRunnable( searches ) ).execute();
        }
View Full Code Here

        if ( entry != null )
        {
            if ( entry instanceof IContinuation )
            {
                IContinuation continuation = ( IContinuation ) entry;
                if ( continuation.getState() == State.UNRESOLVED )
                {
                    continuation.resolve();
                }
            }
            else
            {
                // Making sure attributes are initialized
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.ldapbrowser.core.model.IContinuation

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.