Examples of ISearch


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

            && connections[0].getJNDIConnectionWrapper().isConnected()
            || searches.length + entries.length + searchResults.length + bookmarks.length + attributes.length
                + values.length > 0 )
        {

            ISearch search = BrowserSelectionUtils.getExampleSearch( selection );
            search.setName( null );
            this.connection = search.getBrowserConnection();

            applyOnPage = new BatchOperationApplyOnWizardPage( BatchOperationApplyOnWizardPage.class.getName(), this );
            addPage( applyOnPage );

            typePage = new BatchOperationTypeWizardPage( BatchOperationTypeWizardPage.class.getName(), this );
View Full Code Here

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

            LdapDN[] dns = applyOnPage.getApplyOnDns();
            if ( dns == null )
            {
                if ( applyOnPage.getApplyOnSearch() != null )
                {
                    ISearch search = applyOnPage.getApplyOnSearch();
                    if ( search.getBrowserConnection() != null )
                    {
                        search.setSearchResults( null );
                        SearchRunnable runnable = new SearchRunnable( new ISearch[]
                            { search } );
                        IStatus status = RunnableContextRunner.execute( runnable, getContainer(), true );
                        if ( status.isOK() )
                        {
                            ISearchResult[] srs = search.getSearchResults();
                            dns = new LdapDN[srs.length];
                            for ( int i = 0; i < srs.length; i++ )
                            {
                                dns[i] = srs[i].getDn();
                            }
View Full Code Here

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

            }
            else if ( "ISearchResult".equals( type ) ) //$NON-NLS-1$
            {
                IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager()
                    .getBrowserConnectionById( memento.getString( "CONNECTION" ) ); //$NON-NLS-1$
                ISearch search = connection.getSearchManager().getSearch( memento.getString( "SEARCH" ) ); //$NON-NLS-1$
                ISearchResult[] searchResults = search.getSearchResults();
                LdapDN dn = new LdapDN( memento.getString( "DN" ) ); //$NON-NLS-1$
                for ( int i = 0; i < searchResults.length; i++ )
                {
                    if ( dn.equals( searchResults[i].getDn() ) )
                    {
View Full Code Here

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

        // update state
        String url = ""; //$NON-NLS-1$
        boolean enabled = true;
        if ( input != null && input instanceof ISearch )
        {
            ISearch search = ( ISearch ) input;

            if ( filteredAndSortedElements.length < elements.length )
            {
                url += filteredAndSortedElements.length + Messages.getString( "SearchResultEditorContentProvider.Of" ); //$NON-NLS-1$
            }

            if ( search.getSearchResults() == null )
            {
                url += Messages.getString( "SearchResultEditorContentProvider.SearchNotPerformed" ); //$NON-NLS-1$
                enabled = false;
            }
            else if ( search.getSearchResults().length == 1 )
            {
                url += search.getSearchResults().length
                    + Messages.getString( "SearchResultEditorContentProvider.Result" ); //$NON-NLS-1$
            }
            else
            {
                url += search.getSearchResults().length
                    + Messages.getString( "SearchResultEditorContentProvider.Results" ); //$NON-NLS-1$
            }

            // url += search.getURL();
            url += Messages.getString( "SearchResultEditorContentProvider.SearchBase" ) + search.getSearchBase().getUpName() + "  -  "; //$NON-NLS-1$ //$NON-NLS-2$
            url += Messages.getString( "SearchResultEditorContentProvider.Filter" ) + search.getFilter(); //$NON-NLS-1$

            boolean showDn = BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(
                BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN )
                || search.getReturningAttributes().length == 0;
            configuration.getFilter().inputChanged( search, showDn );
            configuration.getSorter().inputChanged( search, showDn );
        }
        else
        {
View Full Code Here

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

     */
    public Object[] getElements( Object inputElement )
    {
        if ( inputElement != null && inputElement instanceof ISearch )
        {
            ISearch search = ( ISearch ) inputElement;
            return search.getSearchResults() != null ? search.getSearchResults() : new Object[0];
        }
        else
        {
            return new Object[]
                {};
View Full Code Here

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

    /**
     * {@inheritDoc}
     */
    public String getText()
    {
        ISearch search = getSearch();
        if ( search != null )
        {
            String connectionName = search.getBrowserConnection().getConnection() != null ? " - " //$NON-NLS-1$
                + search.getBrowserConnection().getConnection().getName() : ""; //$NON-NLS-1$
            return NLS.bind(
                Messages.getString( "SearchResultEditorNavigationLocation.Search" ), new String[] { search.getName() } ) //$NON-NLS-1$
                + connectionName;
        }
        else
        {
            return super.getText();
View Full Code Here

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

    /**
     * {@inheritDoc}
     */
    public void saveState( IMemento memento )
    {
        ISearch search = getSearch();
        memento.putString( "SEARCH", search.getName() ); //$NON-NLS-1$
        memento.putString( "CONNECTION", search.getBrowserConnection().getConnection().getId() ); //$NON-NLS-1$
    }
View Full Code Here

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

     */
    public void restoreState( IMemento memento )
    {
        IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnectionById(
            memento.getString( "CONNECTION" ) ); //$NON-NLS-1$
        ISearch search = connection.getSearchManager().getSearch( memento.getString( "SEARCH" ) ); //$NON-NLS-1$
        super.setInput( new SearchResultEditorInput( search ) );
    }
View Full Code Here

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

        {
            return false;
        }

        SearchResultEditorNavigationLocation location = ( SearchResultEditorNavigationLocation ) currentLocation;
        ISearch other = location.getSearch();
        ISearch search = getSearch();

        if ( other == null && search == null )
        {
            return true;
        }
        else if ( other == null || search == null )
        {
            return false;
        }
        else
        {
            return search.equals( other );
        }
    }
View Full Code Here

Examples of org.eclipse.ecf.presence.search.ISearch

      criteria.add(name);
      criteria.add(email);
      criteria.add(username);

      // call the block search
      ISearch search = searchManager.search(criteria);

      // the collection of IResult
      IResultList resultList = search.getResultList();

      // check if there is at least one result
      assertTrue(0 != resultList.getResults().size());

      Iterator it = resultList.getResults().iterator();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.