Package org.apache.directory.studio.connection.core

Examples of org.apache.directory.studio.connection.core.DetectedConnectionProperties


        browserConnection.getRootDSE().setChildrenInitialized( true );
        browserConnection.getRootDSE().setHasChildrenHint( true );
        browserConnection.getRootDSE().setDirectoryEntry( true );

        // Set detected connection properties
        DetectedConnectionProperties detectedConnectionProperties = browserConnection.getConnection()
            .getDetectedConnectionProperties();
        IAttribute vendorNameAttribute = browserConnection.getRootDSE().getAttribute( "vendorName" ); //$NON-NLS-1$
        if ( ( vendorNameAttribute != null ) && ( vendorNameAttribute.getValueSize() > 0 ) )
        {
            detectedConnectionProperties.setVendorName( vendorNameAttribute.getStringValue() );
        }
        IAttribute vendorVersionAttribute = browserConnection.getRootDSE().getAttribute( "vendorVersion" ); //$NON-NLS-1$
        if ( ( vendorVersionAttribute != null ) && ( vendorVersionAttribute.getValueSize() > 0 ) )
        {
            detectedConnectionProperties.setVendorVersion( vendorVersionAttribute.getStringValue() );
        }
        IAttribute supportedControlAttribute = browserConnection.getRootDSE().getAttribute( "supportedControl" ); //$NON-NLS-1$
        if ( ( supportedControlAttribute != null ) && ( supportedControlAttribute.getValueSize() > 0 ) )
        {
            detectedConnectionProperties.setSupportedControls( Arrays.asList( supportedControlAttribute
                .getStringValues() ) );
        }
        IAttribute supportedExtensionAttribute = browserConnection.getRootDSE().getAttribute( "supportedExtension" ); //$NON-NLS-1$
        if ( ( supportedExtensionAttribute != null ) && ( supportedExtensionAttribute.getValueSize() > 0 ) )
        {
            detectedConnectionProperties.setSupportedExtensions( Arrays.asList( supportedExtensionAttribute
                .getStringValues() ) );
        }
        IAttribute supportedFeaturesAttribute = browserConnection.getRootDSE().getAttribute( "supportedFeatures" ); //$NON-NLS-1$
        if ( ( supportedFeaturesAttribute != null ) && ( supportedFeaturesAttribute.getValueSize() > 0 ) )
        {
            detectedConnectionProperties.setSupportedFeatures( Arrays.asList( supportedFeaturesAttribute
                .getStringValues() ) );
        }
        detectedConnectionProperties
            .setServerType( ServerTypeDetector.detectServerType( browserConnection.getRootDSE() ) );

        ConnectionCorePlugin.getDefault().getConnectionManager()
            .connectionUpdated( browserConnection.getConnection() );
    }
View Full Code Here


        browserConnection.getRootDSE().setChildrenInitialized( true );
        browserConnection.getRootDSE().setHasChildrenHint( true );
        browserConnection.getRootDSE().setDirectoryEntry( true );

        // Set detected connection properties
        DetectedConnectionProperties detectedConnectionProperties = browserConnection.getConnection()
            .getDetectedConnectionProperties();
        IAttribute vendorNameAttribute = browserConnection.getRootDSE().getAttribute( "vendorName" ); //$NON-NLS-1$
        if ( ( vendorNameAttribute != null ) && ( vendorNameAttribute.getValueSize() > 0 ) )
        {
            detectedConnectionProperties.setVendorName( vendorNameAttribute.getStringValue() );
        }
        IAttribute vendorVersionAttribute = browserConnection.getRootDSE().getAttribute( "vendorVersion" ); //$NON-NLS-1$
        if ( ( vendorVersionAttribute != null ) && ( vendorVersionAttribute.getValueSize() > 0 ) )
        {
            detectedConnectionProperties.setVendorVersion( vendorVersionAttribute.getStringValue() );
        }
        IAttribute supportedControlAttribute = browserConnection.getRootDSE().getAttribute( "supportedControl" ); //$NON-NLS-1$
        if ( ( supportedControlAttribute != null ) && ( supportedControlAttribute.getValueSize() > 0 ) )
        {
            detectedConnectionProperties.setSupportedControls( Arrays.asList( supportedControlAttribute
                .getStringValues() ) );
        }
        IAttribute supportedExtensionAttribute = browserConnection.getRootDSE().getAttribute( "supportedExtension" ); //$NON-NLS-1$
        if ( ( supportedExtensionAttribute != null ) && ( supportedExtensionAttribute.getValueSize() > 0 ) )
        {
            detectedConnectionProperties.setSupportedExtensions( Arrays.asList( supportedExtensionAttribute
                .getStringValues() ) );
        }
        IAttribute supportedFeaturesAttribute = browserConnection.getRootDSE().getAttribute( "supportedFeatures" ); //$NON-NLS-1$
        if ( ( supportedFeaturesAttribute != null ) && ( supportedFeaturesAttribute.getValueSize() > 0 ) )
        {
            detectedConnectionProperties.setSupportedFeatures( Arrays.asList( supportedFeaturesAttribute
                .getStringValues() ) );
        }
        detectedConnectionProperties
            .setServerType( ServerTypeDetector.detectServerType( browserConnection.getRootDSE() ) );

        ConnectionCorePlugin.getDefault().getConnectionManager()
            .connectionUpdated( browserConnection.getConnection() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.connection.core.DetectedConnectionProperties

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.