Examples of BaseDNEntry


Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry

                try
                {
                    if ( enumeration != null && enumeration.hasMore() )
                    {
                        // create base DN entry
                        entry = new BaseDNEntry( aDN, browserConnection );
                        browserConnection.getRootDSE().addChild( entry );
                        browserConnection.cacheEntry( entry );
                        enumeration.close();
                    }
                }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry

            // only add the specified base DN
            LdapDN dn = browserConnection.getBaseDN();
            IEntry entry = browserConnection.getEntryFromCache( dn );
            if ( entry == null )
            {
                entry = new BaseDNEntry( ( LdapDN ) dn.clone(), browserConnection );
                browserConnection.cacheEntry( entry );
            }
            rootDseEntries.put( dn, entry );
        }
        else
        {
            // get base DNs from namingContexts attribute
            Set<String> namingContextSet = new HashSet<String>();
            IAttribute attribute = browserConnection.getRootDSE().getAttribute( SchemaConstants.NAMING_CONTEXTS_AT );
            if ( attribute != null )
            {
                String[] values = attribute.getStringValues();
                for ( int i = 0; i < values.length; i++ )
                {
                    namingContextSet.add( values[i] );
                }
            }

            if ( !namingContextSet.isEmpty() )
            {
                for ( String namingContext : namingContextSet )
                {
                    if ( namingContext.length() > 0 && namingContext.charAt( namingContext.length() - 1 ) == '\u0000' )
                    {
                        namingContext = namingContext.substring( 0, namingContext.length() - 1 );
                    }

                    if ( !"".equals( namingContext ) ) //$NON-NLS-1$
                    {
                        try
                        {
                            LdapDN dn = new LdapDN( namingContext );
                            IEntry entry = browserConnection.getEntryFromCache( dn );
                            if ( entry == null )
                            {
                                entry = new BaseDNEntry( dn, browserConnection );
                                browserConnection.cacheEntry( entry );
                            }
                            rootDseEntries.put( dn, entry );
                        }
                        catch ( InvalidNameException e )
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry

                try
                {
                    if ( enumeration != null && enumeration.hasMore() )
                    {
                        // create base DN entry
                        entry = new BaseDNEntry( aDN, browserConnection );
                        browserConnection.getRootDSE().addChild( entry );
                        browserConnection.cacheEntry( entry );
                        enumeration.close();
                    }
                }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry

            {
                LdapDN dn = browserConnection.getBaseDN();
                IEntry entry = browserConnection.getEntryFromCache( dn );
                if ( entry == null )
                {
                    entry = new BaseDNEntry( new LdapDN( dn ), browserConnection );
                    browserConnection.cacheEntry( entry );
                }
                rootDseEntries.put( dn, entry );
            }
            catch ( InvalidNameException e )
            {
                monitor.reportError( BrowserCoreMessages.model__error_setting_base_dn, e );
            }
        }
        else
        {
            // get base DNs from namingContexts attribute
            Set<String> namingContextSet = new HashSet<String>();
            IAttribute attribute = browserConnection.getRootDSE().getAttribute(
                IRootDSE.ROOTDSE_ATTRIBUTE_NAMINGCONTEXTS );
            if ( attribute != null )
            {
                String[] values = attribute.getStringValues();
                for ( int i = 0; i < values.length; i++ )
                {
                    namingContextSet.add( values[i] );
                }
            }
            for ( String namingContext : namingContextSet )
            {
                if ( !"".equals( namingContext ) ) { //$NON-NLS-1$
                    try
                    {
                        LdapDN dn = new LdapDN( namingContext );
                        IEntry entry = browserConnection.getEntryFromCache( dn );
                        if ( entry == null )
                        {
                            entry = new BaseDNEntry( new LdapDN( dn ), browserConnection );
                            browserConnection.cacheEntry( entry );
                        }
                        rootDseEntries.put( dn, entry );
                    }
                    catch ( InvalidNameException e )
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry

        for ( LdapDN aDN : parentDnList )
        {
            parentDN = DnUtils.getParent( aDN );
            if ( parentDN == null )
            {
                entry = new BaseDNEntry( aDN, browserConnection );
                browserConnection.cacheEntry( entry );
            }
            else if ( browserConnection.getEntryFromCache( parentDN ) != null )
            {
                IEntry parentEntry = browserConnection.getEntryFromCache( parentDN );
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry

            // only add the specified base DN
            LdapDN dn = browserConnection.getBaseDN();
            IEntry entry = browserConnection.getEntryFromCache( dn );
            if ( entry == null )
            {
                entry = new BaseDNEntry( ( LdapDN ) dn.clone(), browserConnection );
                browserConnection.cacheEntry( entry );
            }
            rootDseEntries.put( dn, entry );
        }
        else
        {
            // get base DNs from namingContexts attribute
            Set<String> namingContextSet = new HashSet<String>();
            IAttribute attribute = browserConnection.getRootDSE().getAttribute(
                IRootDSE.ROOTDSE_ATTRIBUTE_NAMINGCONTEXTS );
            if ( attribute != null )
            {
                String[] values = attribute.getStringValues();
                for ( int i = 0; i < values.length; i++ )
                {
                    namingContextSet.add( values[i] );
                }
            }
           
            if ( !namingContextSet.isEmpty() )
            {
                for ( String namingContext : namingContextSet )
                {
                    if ( !"".equals( namingContext ) ) { //$NON-NLS-1$
                        try
                        {
                            LdapDN dn = new LdapDN( namingContext );
                            IEntry entry = browserConnection.getEntryFromCache( dn );
                            if ( entry == null )
                            {
                                entry = new BaseDNEntry( dn, browserConnection );
                                browserConnection.cacheEntry( entry );
                            }
                            rootDseEntries.put( dn, entry );
                        }
                        catch ( InvalidNameException e )
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry

        for ( LdapDN aDN : parentDnList )
        {
            parentDN = DnUtils.getParent( aDN );
            if ( parentDN == null )
            {
                entry = new BaseDNEntry( aDN, browserConnection );
                browserConnection.cacheEntry( entry );
            }
            else if ( browserConnection.getEntryFromCache( parentDN ) != null )
            {
                IEntry parentEntry = browserConnection.getEntryFromCache( parentDN );
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry

            {
                LdapDN dn = browserConnection.getBaseDN();
                IEntry entry = browserConnection.getEntryFromCache( dn );
                if ( entry == null )
                {
                    entry = new BaseDNEntry( new LdapDN( dn ), browserConnection );
                    browserConnection.cacheEntry( entry );
                }
                rootDseEntries.put( dn, entry );
            }
            catch ( InvalidNameException e )
            {
                monitor.reportError( BrowserCoreMessages.model__error_setting_base_dn, e );
            }
        }
        else
        {
            // get base DNs from namingContexts attribute
            Set<String> namingContextSet = new HashSet<String>();
            IAttribute attribute = browserConnection.getRootDSE().getAttribute(
                IRootDSE.ROOTDSE_ATTRIBUTE_NAMINGCONTEXTS );
            if ( attribute != null )
            {
                String[] values = attribute.getStringValues();
                for ( int i = 0; i < values.length; i++ )
                {
                    namingContextSet.add( values[i] );
                }
            }
            for ( String namingContext : namingContextSet )
            {
                if ( !"".equals( namingContext ) ) { //$NON-NLS-1$
                    try
                    {
                        LdapDN dn = new LdapDN( namingContext );
                        IEntry entry = browserConnection.getEntryFromCache( dn );
                        if ( entry == null )
                        {
                            entry = new BaseDNEntry( new LdapDN( dn ), browserConnection );
                            browserConnection.cacheEntry( entry );
                        }
                        rootDseEntries.put( dn, entry );
                    }
                    catch ( InvalidNameException e )
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry

                try
                {
                    if ( enumeration != null && enumeration.hasMore() )
                    {
                        // create base Dn entry
                        entry = new BaseDNEntry( aDn, browserConnection );
                        browserConnection.getRootDSE().addChild( entry );
                        browserConnection.cacheEntry( entry );
                        enumeration.close();
                    }
                }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry

            // only add the specified base Dn
            Dn dn = browserConnection.getBaseDN();
            IEntry entry = browserConnection.getEntryFromCache( dn );
            if ( entry == null )
            {
                entry = new BaseDNEntry( dn, browserConnection );
                browserConnection.cacheEntry( entry );
            }
            rootDseEntries.put( dn, entry );
        }
        else
        {
            // get base DNs from namingContexts attribute
            Set<String> namingContextSet = new HashSet<String>();
            IAttribute attribute = browserConnection.getRootDSE().getAttribute( SchemaConstants.NAMING_CONTEXTS_AT );
            if ( attribute != null )
            {
                String[] values = attribute.getStringValues();
                for ( int i = 0; i < values.length; i++ )
                {
                    namingContextSet.add( values[i] );
                }
            }

            if ( !namingContextSet.isEmpty() )
            {
                for ( String namingContext : namingContextSet )
                {
                    if ( namingContext.length() > 0 && namingContext.charAt( namingContext.length() - 1 ) == '\u0000' )
                    {
                        namingContext = namingContext.substring( 0, namingContext.length() - 1 );
                    }

                    if ( !"".equals( namingContext ) ) //$NON-NLS-1$
                    {
                        try
                        {
                            Dn dn = new Dn( namingContext );
                            IEntry entry = browserConnection.getEntryFromCache( dn );
                            if ( entry == null )
                            {
                                entry = new BaseDNEntry( dn, browserConnection );
                                browserConnection.cacheEntry( entry );
                            }
                            rootDseEntries.put( dn, entry );
                        }
                        catch ( LdapInvalidDnException e )
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.