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

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


        // expand viewer
        viewer.refresh( browserConnection );
        viewer.expandToLevel( 2 );

        // expand root DSE to show base entries
        IRootDSE rootDSE = browserConnection.getRootDSE();
        viewer.expandToLevel( rootDSE, 1 );

        // expand base entries, if requested
        if ( view.getConfiguration().getPreferences().isExpandBaseEntries() )
        {
View Full Code Here


        BaseWidgetUtils.createLabel( infoComposite, Messages.getString( "RootDSEPropertyPage.DirectoryTypw" ), 1 ); //$NON-NLS-1$
        Text typeText = BaseWidgetUtils.createWrappedLabeledText( infoComposite, "-", 1, 150 ); //$NON-NLS-1$
        if ( connection != null && connection.getRootDSE() != null )
        {
            // Try to detect LDAP server from RootDSE
            IRootDSE rootDSE = connection.getRootDSE();
            String type = detectOpenLDAP( rootDSE );
            if ( type == null )
            {
                type = detectSiemensDirX( rootDSE );
                if ( type == null )
View Full Code Here

        // expand viewer
        viewer.refresh( browserConnection );
        viewer.expandToLevel( 2 );

        // expand root DSE to show base entries
        IRootDSE rootDSE = browserConnection.getRootDSE();
        viewer.expandToLevel( rootDSE, 1 );

        // expand base entries, if requested
        if ( view.getConfiguration().getPreferences().isExpandBaseEntries() )
        {
View Full Code Here

     */
    private static void openBrowserConnection( IBrowserConnection browserConnection, StudioProgressMonitor monitor )
    {
        ReloadSchemaRunnable.reloadSchema( false, browserConnection, monitor );

        IRootDSE rootDSE = browserConnection.getRootDSE();
        InitializeAttributesRunnable.initializeAttributes( rootDSE, monitor );
    }
View Full Code Here

                return objects;
            }
        }
        else if ( parent instanceof IRootDSE )
        {
            final IRootDSE rootDSE = ( IRootDSE ) parent;

            if ( !rootDSE.isChildrenInitialized() )
            {
                new StudioBrowserJob( new InitializeChildrenRunnable( false, rootDSE ) ).execute();
                return new String[]
                    { Messages.getString( "BrowserContentProvider.FetchingEntries" ) }; //$NON-NLS-1$
            }

            // get base entries
            List<IEntry> entryList = new ArrayList<IEntry>();
            entryList.addAll( Arrays.asList( rootDSE.getChildren() ) );

            // remove non-visible entries
            for ( Iterator<IEntry> it = entryList.iterator(); it.hasNext(); )
            {
                Object o = it.next();
View Full Code Here

     * @param browserConnection the browser connection
     * @param monitor the progress monitor
     */
    private static void openBrowserConnection( IBrowserConnection browserConnection, StudioProgressMonitor monitor )
    {
        IRootDSE rootDSE = browserConnection.getRootDSE();
        InitializeAttributesJob.initializeAttributes( rootDSE, true, monitor );

        // check schema reload
        if ( rootDSE != null )
        {
            try
            {
                monitor.reportProgress( BrowserCoreMessages.model__loading_schema );

                // check if schema is cached
                Schema schema = browserConnection.getSchema();
                if ( schema == Schema.DEFAULT_SCHEMA )
                {
                    ReloadSchemasJob.reloadSchema( browserConnection, monitor );
                }
                else if ( rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY ) != null )
                {
                    // check if schema is up-to-date
                    SearchParameter sp = new SearchParameter();
                    sp.setSearchBase( new LdapDN( rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY )
                        .getStringValue() ) );
                    sp.setFilter( Schema.SCHEMA_FILTER );
                    sp.setScope( SearchScope.OBJECT );
                    sp.setReturningAttributes( new String[]
                        { IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP,
View Full Code Here

                return objects;
            }
        }
        else if ( parent instanceof IRootDSE )
        {
            final IRootDSE rootDSE = ( IRootDSE ) parent;

            if ( !rootDSE.isChildrenInitialized() && rootDSE.isDirectoryEntry() )
            {
                new StudioBrowserJob( new InitializeChildrenRunnable( new IEntry[]
                    { rootDSE } ) ).execute();
                return new String[]
                    { "Fetching Entries..." };
            }

            // get base entries
            List<IEntry> entryList = new ArrayList<IEntry>();
            entryList.addAll( Arrays.asList( rootDSE.getChildren() ) );

            // remove non-visible entries
            for ( Iterator<IEntry> it = entryList.iterator(); it.hasNext(); )
            {
                Object o = it.next();
View Full Code Here

    {
        monitor.beginTask( BrowserCoreMessages.jobs__fetch_basedns_task, 5 );
        monitor.reportProgress( " " ); //$NON-NLS-1$
        monitor.worked( 1 );

        IRootDSE rootDSE = connection.getRootDSE();
        InitializeAttributesJob.initializeAttributes( rootDSE, true, monitor );
//        IEntry[] baseDNEntries = connection.getRootDSE().getChildren();
//        baseDNs = new String[baseDNEntries.length];
//        for ( int i = 0; i < baseDNs.length; i++ )
//        {
//            baseDNs[i] = baseDNEntries[i].getDn().toString();
//        }
       
        IAttribute attribute = rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_NAMINGCONTEXTS );
        if ( attribute != null )
        {
            baseDNs = attribute.getStringValues();
        }
       
View Full Code Here

        Text typeText = BaseWidgetUtils.createLabeledText( composite, "-", 1 );
        if ( connection != null && connection.getRootDSE() != null )
        {
            // Try to detect LDAP server from RootDSE
            //  
            IRootDSE rootDSE = connection.getRootDSE();
            String type = detectOpenLDAP( rootDSE );
            if ( type == null )
            {
                type = detectSiemensDirX( rootDSE );
                if ( type == null )
View Full Code Here

                return objects;
            }
        }
        else if ( parent instanceof IRootDSE )
        {
            final IRootDSE rootDSE = ( IRootDSE ) parent;

            if ( !rootDSE.isChildrenInitialized() && rootDSE.isDirectoryEntry() )
            {
                new InitializeChildrenJob( new IEntry[]
                    { rootDSE } ).execute();
                return new String[]
                    { "Fetching Entries..." };
            }

            // get base entries
            List<IEntry> entryList = new ArrayList<IEntry>();
            entryList.addAll( Arrays.asList( rootDSE.getChildren() ) );

            // remove non-visible entries
            for ( Iterator<IEntry> it = entryList.iterator(); it.hasNext(); )
            {
                Object o = it.next();
View Full Code Here

TOP

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

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.