Examples of LdapDN


Examples of org.apache.directory.shared.ldap.name.LdapDN


    private static void initBaseEntry( IEntry entry, StudioProgressMonitor monitor )
    {
        IBrowserConnection browserConnection = entry.getBrowserConnection();
        LdapDN dn = entry.getDn();

        // search the entry
        AliasDereferencingMethod derefAliasMethod = browserConnection.getAliasesDereferencingMethod();
        ReferralHandlingMethod handleReferralsMethod = browserConnection.getReferralsHandlingMethod();
        ISearch search = new Search( null, browserConnection, dn, ISearch.FILTER_TRUE, ISearch.NO_ATTRIBUTES,
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.LdapDN

            {
                if ( dn != null && !"".equals( dn ) )
                {
                    try
                    {
                        metadataEntryDnList.add( new LdapDN( dn ) );
                    }
                    catch ( InvalidNameException e )
                    {
                    }
                }
            }
        }

        IEntry[] metadataEntries = new IEntry[metadataEntryDnList.size()];
        for ( int i = 0; i < metadataEntryDnList.size(); i++ )
        {
            LdapDN dn = metadataEntryDnList.get( i );
            metadataEntries[i] = browserConnection.getEntryFromCache( dn );
            if ( metadataEntries[i] == null )
            {
                metadataEntries[i] = new DirectoryMetadataEntry( dn, browserConnection );
                metadataEntries[i].setDirectoryEntry( true );
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.LdapDN

    protected void moveEntries( final IEntry[] entries )
    {
        MoveEntriesDialog moveDialog = new MoveEntriesDialog( getShell(), entries );
        if ( moveDialog.open() == Dialog.OK )
        {
            LdapDN newParentDn = moveDialog.getParentDn();
            if ( newParentDn != null /* && !newRdn.equals(entry.getRdn()) */)
            {
                IEntry newParentEntry = entries[0].getBrowserConnection().getEntryFromCache( newParentDn );
                if ( newParentEntry == null )
                {
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.LdapDN

    public boolean performFinish()
    {
        if ( selectedEntry != null )
        {
            String name = mainPage.getBookmarkName();
            LdapDN dn = mainPage.getBookmarkDn();
            IBookmark bookmark = new Bookmark( selectedEntry.getBrowserConnection(), dn, name );
            selectedEntry.getBrowserConnection().getBookmarkManager().addBookmark( bookmark );
        }
        mainPage.saveDialogSettings();
        return true;
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.LdapDN

                }
            }
        }
        else if ( getSelectedSearchResults().length > 0 )
        {
            LdapDN dn = getSelectedSearchResults()[0].getDn();
            switch ( mode )
            {
                case UTF8:
                case DISPLAY:
                    text.append( dn.getUpName() );
                    break;
                case BASE64:
                    text.append( LdifUtils.base64encode( LdifUtils.utf8encode( dn.getUpName() ) ) );
                    break;
                case HEX:
                    text.append( LdifUtils.hexEncode( LdifUtils.utf8encode( dn.getUpName() ) ) );
                    break;
                case LDIF:
                    text.append( ModelConverter.dnToLdifDnLine( dn )
                        .toFormattedString( Utils.getLdifFormatParameters() ) );
                    break;
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.LdapDN

        }

        EntryEditorInput input = getEntryEditorInput( element );
        try
        {
            LdapDN newDN = new LdapDN( records[0].getDnLine().getValueAsString() );
            if ( !newDN.equals( input.getResolvedEntry().getDn() ) )
            {
                throw new CoreException( new Status( IStatus.ERROR, BrowserUIConstants.PLUGIN_ID, NLS.bind( Messages
                    .getString( "LdifEntryEditorDocumentProvider.ModDnNotSupported" ), records[0].getInvalidString() ) ) ); //$NON-NLS-1$
            }
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.LdapDN

            {
                if ( values[v].isString() )
                {
                    try
                    {
                        LdapDN dn = new LdapDN( values[v].getStringValue() );
                        internalDnSet.add( dn );
                    }
                    catch ( InvalidNameException e )
                    {
                    }
                }
            }

            for ( int a = 0; a < attributes.length; a++ )
            {
                IValue[] vals = attributes[a].getValues();
                for ( int v = 0; v < vals.length; v++ )
                {
                    if ( vals[v].isString() )
                    {
                        try
                        {
                            LdapDN dn = new LdapDN( vals[v].getStringValue() );
                            internalDnSet.add( dn );
                        }
                        catch ( InvalidNameException e )
                        {
                        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.LdapDN

            try
            {
                IValue value = getSelectedAttributeHierarchies()[0].getAttribute().getValues()[0];
                if ( value.isString() && LdapDN.isValid( value.getStringValue() ) )
                {
                    return new ConnectionAndDn( value.getAttribute().getEntry().getBrowserConnection(), new LdapDN(
                        value.getStringValue() ) );
                }
            }
            catch ( InvalidNameException e )
            {
                // no valid DN
            }
        }

        if ( getSelectedValues().length == 1 && getSelectedAttributes().length == 0 )
        {
            try
            {
                IValue value = getSelectedValues()[0];
                if ( value.isString() && LdapDN.isValid( value.getStringValue() ) )
                {
                    return new ConnectionAndDn( value.getAttribute().getEntry().getBrowserConnection(), new LdapDN(
                        value.getStringValue() ) );
                }
            }
            catch ( InvalidNameException e )
            {
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.LdapDN

    {
        if ( getInput() instanceof IBrowserConnection )
        {
            IBrowserConnection conn = ( IBrowserConnection ) getInput();

            LdapDN dn = Utils.getLdapDn( getStringFromClipboard() );

            DnDialog dialog = new DnDialog(
                getShell(),
                Messages.getString( "GotoDnAction.GotoDNAction" ), Messages.getString( "GotoDnAction.EnterDNAction" ), conn, dn ); //$NON-NLS-1$ //$NON-NLS-2$
            if ( dialog.open() == TextDialog.OK && dialog.getDn() != null )
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.LdapDN

            EntryEditorExtension entryEditorExtension = entryEditorManager.getEntryEditorExtension( extensionId );
            if ( "IEntry".equals( type ) ) //$NON-NLS-1$
            {
                IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager()
                    .getBrowserConnectionById( memento.getString( "CONNECTION" ) ); //$NON-NLS-1$
                LdapDN dn = new LdapDN( memento.getString( "DN" ) ); //$NON-NLS-1$
                IEntry entry = connection.getEntryFromCache( dn );
                super.setInput( new EntryEditorInput( entry, entryEditorExtension ) );
            }
            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() ) )
                    {
                        super.setInput( new EntryEditorInput( searchResults[i], entryEditorExtension ) );
                        break;
                    }
                }
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.