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

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


    /**
     * {@inheritDoc}
     */
    public void run()
    {
        URL url = null;
        if ( getSelectedSearches().length > 0 )
        {
            url = getSelectedSearches()[0].getUrl();
        }
        else if ( getSelectedEntries().length > 0 )
        {
            url = getSelectedEntries()[0].getUrl();
        }
        else if ( getSelectedAttributes().length > 0 )
        {
            url = getSelectedAttributes()[0].getEntry().getUrl();
        }
        else if ( getSelectedAttributeHierarchies().length > 0 )
        {
            url = getSelectedAttributeHierarchies()[0].getAttribute().getEntry().getUrl();
        }
        else if ( getSelectedValues().length > 0 )
        {
            url = getSelectedValues()[0].getAttribute().getEntry().getUrl();
        }
        else if ( getSelectedSearchResults().length > 0 )
        {
            url = getSelectedSearchResults()[0].getEntry().getUrl();
        }
        else if ( getSelectedBookmarks().length > 0 )
        {
            url = getSelectedBookmarks()[0].getEntry().getUrl();
        }

        if ( url != null )
        {
            CopyAction.copyToClipboard( new Object[]
                { url.toString() }, new Transfer[]
                { TextTransfer.getInstance() } );
        }
    }
View Full Code Here


        {
            IConnection[] connections = BrowserCorePlugin.getDefault().getConnectionManager().getConnections();
            for ( int i = 0; i < connections.length; i++ )
            {
                IConnection connection = connections[i];
                URL connectionUrl = connection.getUrl();
                if ( connectionUrl != null && referralUrl.toString().startsWith( connectionUrl.toString() ) )
                {
                    this.mainWidget.getViewer().reveal( connection );
                    this.mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
                }
            }
View Full Code Here

    }


    public URL getUrl()
    {
        return new URL( this );
    }
View Full Code Here

    }


    public URL getUrl()
    {
        return new URL( getConnection(), getDn() );
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public URL getUrl()
    {
        return new URL( this );
    }
View Full Code Here

    }


    public URL getUrl()
    {
        return new URL( getConnection(), getDn() );
    }
View Full Code Here

                            for ( int r = 0; r < re.getReferrals().length; r++ )
                            {

                                // parse referral URL
                                String referral = re.getReferrals()[r];
                                URL referralUrl = new URL( referral );

                                // get referral connection
                                IConnection referralConnection = referralHandler.getReferralConnection( referralUrl );
                                if ( referralConnection == null )
                                {
View Full Code Here

    public URL getUrl()
    {
        if ( this.getDelegate() != null )
            return getDelegate().getUrl();
        else
            return new URL( getConnection(), getDn() );
    }
View Full Code Here

        for ( int i = 0; i < getReferrals().length; i++ )
        {

            // parse referral URL
            String referral = getReferrals()[i];
            URL referralUrl = new URL( referral );

            // get referral connection
            IConnection referralConnection = referralHandler.getReferralConnection( referralUrl );
            if ( referralConnection == null )
            {
                // throw new
                // ConnectionException(BrowserCoreMessages.model__no_referral_connection);
                continue;
            }

            // create search
            try
            {
                ISearch referralSearch = new Search(
                    null, //
                    referralConnection, //
                    referralUrl.hasDn() ? referralUrl.getDn() : originalSearchParameter.getSearchBase(), referralUrl
                        .hasFilter() ? referralUrl.getFilter() : originalSearchParameter.getFilter(),
                    originalSearchParameter.getReturningAttributes(), referralUrl.hasScope() ? referralUrl.getScope()
                        : originalSearchParameter.getScope(), originalSearchParameter.getCountLimit(),
                    originalSearchParameter.getTimeLimit(), originalSearchParameter.getAliasesDereferencingMethod(),
                    originalSearchParameter.getReferralsHandlingMethod(), originalSearchParameter.isInitHasChildrenFlag(),
                    originalSearchParameter.isInitAliasAndReferralFlag(), originalSearchParameter.getControls() );
                referralSearchList.add( referralSearch );
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void run()
    {
        URL url = null;
        if ( getSelectedSearches().length > 0 )
        {
            url = getSelectedSearches()[0].getUrl();
        }
        else if ( getSelectedEntries().length > 0 )
        {
            url = getSelectedEntries()[0].getUrl();
        }
        else if ( getSelectedAttributes().length > 0 )
        {
            url = getSelectedAttributes()[0].getEntry().getUrl();
        }
        else if ( getSelectedAttributeHierarchies().length > 0 )
        {
            url = getSelectedAttributeHierarchies()[0].getAttribute().getEntry().getUrl();
        }
        else if ( getSelectedValues().length > 0 )
        {
            url = getSelectedValues()[0].getAttribute().getEntry().getUrl();
        }
        else if ( getSelectedSearchResults().length > 0 )
        {
            url = getSelectedSearchResults()[0].getEntry().getUrl();
        }
        else if ( getSelectedBookmarks().length > 0 )
        {
            url = getSelectedBookmarks()[0].getEntry().getUrl();
        }

        if ( url != null )
        {
            CopyAction.copyToClipboard( new Object[]
                { url.toString() }, new Transfer[]
                { TextTransfer.getInstance() } );
        }
    }
View Full Code Here

TOP

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

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.