Package org.apache.directory.studio.apacheds.configuration.model.v153

Examples of org.apache.directory.studio.apacheds.configuration.model.v153.IndexedAttribute


     * @throws IOException
     * @throws ServerXmlIOException
     */
    private int getTestingPort( LdapServer server ) throws ServerXmlIOException, IOException
    {
        ServerConfigurationV153 configuration = getServerConfiguration( server );

        // LDAP
        if ( configuration.isEnableLdap() )
        {
            return configuration.getLdapPort();
        }
        // LDAPS
        else if ( configuration.isEnableLdaps() )
        {
            return configuration.getLdapsPort();
        }
        // Kerberos
        else if ( configuration.isEnableKerberos() )
        {
            return configuration.getKerberosPort();
        }
        // DNS
        else if ( configuration.isEnableDns() )
        {
            return configuration.getDnsPort();
        }
        // NTP
        else if ( configuration.isEnableNtp() )
        {
            return configuration.getNtpPort();
        }
        // ChangePassword
        else if ( configuration.isEnableChangePassword() )
        {
            return configuration.getChangePasswordPort();
        }
        else
        {
            return 0;
        }
View Full Code Here


     */
    public String[] checkPortsBeforeServerStart( LdapServer server ) throws Exception
    {
        List<String> alreadyInUseProtocolPortsList = new ArrayList<String>();

        ServerConfigurationV153 configuration = getServerConfiguration( server );

        // LDAP
        if ( configuration.isEnableLdap() )
        {
            if ( !AvailablePortFinder.available( configuration.getLdapPort() ) )
            {
                alreadyInUseProtocolPortsList
                    .add( NLS.bind(
                        Messages.getString( "ApacheDS153LdapServerAdapter.LDAPPort" ), new Object[] { configuration.getLdapPort() } ) ); //$NON-NLS-1$
            }
        }

        // LDAPS
        if ( configuration.isEnableLdaps() )
        {
            if ( !AvailablePortFinder.available( configuration.getLdapsPort() ) )
            {
                alreadyInUseProtocolPortsList
                    .add( NLS.bind(
                        Messages.getString( "ApacheDS153LdapServerAdapter.LDAPSPort" ), new Object[] { configuration.getLdapsPort() } ) ); //$NON-NLS-1$
            }
        }

        // Kerberos
        if ( configuration.isEnableKerberos() )
        {
            if ( !AvailablePortFinder.available( configuration.getKerberosPort() ) )
            {
                alreadyInUseProtocolPortsList
                    .add( NLS
                        .bind(
                            Messages.getString( "ApacheDS153LdapServerAdapter.KerberosPort" ), new Object[] { configuration.getKerberosPort() } ) ); //$NON-NLS-1$
            }
        }

        // DNS
        if ( configuration.isEnableDns() )
        {
            if ( !AvailablePortFinder.available( configuration.getDnsPort() ) )
            {
                alreadyInUseProtocolPortsList
                    .add( NLS.bind(
                        Messages.getString( "ApacheDS153LdapServerAdapter.DNSPort" ), new Object[] { configuration.getDnsPort() } ) ); //$NON-NLS-1$
            }
        }

        // NTP
        if ( configuration.isEnableNtp() )
        {
            if ( !AvailablePortFinder.available( configuration.getNtpPort() ) )
            {
                alreadyInUseProtocolPortsList.add( NLS.bind(
                    Messages.getString( "ApacheDS153LdapServerAdapter.NTPPort" ), new Object[] //$NON-NLS-1$
                    { configuration.getNtpPort() } ) );
            }
        }

        // Change Password
        if ( configuration.isEnableChangePassword() )
        {
            if ( !AvailablePortFinder.available( configuration.getChangePasswordPort() ) )
            {
                alreadyInUseProtocolPortsList
                    .add( NLS
                        .bind(
                            Messages.getString( "ApacheDS153LdapServerAdapter.ChangePasswordPort" ), new Object[] { configuration.getChangePasswordPort() } ) ); //$NON-NLS-1$
            }
        }

        return alreadyInUseProtocolPortsList.toArray( new String[0] );
    }
View Full Code Here

            ServerConfigurationV154 serverConfiguration154 = ( ServerConfigurationV154 ) serverConfiguration;
            return ( serverConfiguration154.isEnableLdap() ) || ( serverConfiguration154.isEnableLdaps() );
        }
        else if ( serverConfiguration instanceof ServerConfigurationV153 )
        {
            ServerConfigurationV153 serverConfiguration153 = ( ServerConfigurationV153 ) serverConfiguration;
            return ( serverConfiguration153.isEnableLdap() ) || ( serverConfiguration153.isEnableLdaps() );
        }

        return false;
    }
View Full Code Here

                connectionParameter.setPort( serverConfiguration154.getLdapsPort() );
            }
        }
        else if ( serverConfiguration instanceof ServerConfigurationV153 )
        {
            ServerConfigurationV153 serverConfiguration153 = ( ServerConfigurationV153 ) serverConfiguration;
            if ( serverConfiguration153.isEnableLdap() )
            {
                connectionParameter.setEncryptionMethod( EncryptionMethod.NONE );
                connectionParameter.setPort( serverConfiguration153.getLdapPort() );
            }
            else if ( serverConfiguration153.isEnableLdaps() )
            {
                connectionParameter.setEncryptionMethod( EncryptionMethod.LDAPS );
                connectionParameter.setPort( serverConfiguration153.getLdapsPort() );
            }
        }

        // Bind password
        connectionParameter.setBindPassword( "secret" ); //$NON-NLS-1$
View Full Code Here

                    reportErrorReadingServerConfiguration( view, message );
                    return;
                }

                // Parsing the 'server.xml' file
                ServerConfigurationV153 serverConfiguration = null;
                try
                {
                    serverConfiguration = ApacheDS153LdapServerAdapter.getServerConfiguration( server );
                }
                catch ( Exception e )
                {
                    String message = Messages.getString( "CreateConnectionAction.UnableReadServerConfiguration" ) //$NON-NLS-1$
                        + "\n\n" //$NON-NLS-1$
                        + Messages.getString( "CreateConnectionAction.FollowingErrorOccurred" ) + e.getMessage(); //$NON-NLS-1$

                    reportErrorReadingServerConfiguration( view, message );
                    return;
                }

                // Checking if we could read the 'server.xml' file
                if ( serverConfiguration == null )
                {
                    reportErrorReadingServerConfiguration( view,
                        Messages.getString( "CreateConnectionAction.UnableReadServerConfiguration" ) ); //$NON-NLS-1$
                    return;
                }

                // Checking is LDAP and/or LDAPS is/are enabled
                if ( ( serverConfiguration.isEnableLdap() ) || ( serverConfiguration.isEnableLdaps() ) )
                {
                    // Creating the connection using the helper class
                    createConnection( server, serverConfiguration );
                }
                else
View Full Code Here

     * @throws IOException
     * @throws ServerXmlIOException
     */
    private int getTestingPort( LdapServer server ) throws ServerXmlIOException, IOException
    {
        ServerConfigurationV153 configuration = getServerConfiguration( server );

        // LDAP
        if ( configuration.isEnableLdap() )
        {
            return configuration.getLdapPort();
        }
        // LDAPS
        else if ( configuration.isEnableLdaps() )
        {
            return configuration.getLdapsPort();
        }
        // Kerberos
        else if ( configuration.isEnableKerberos() )
        {
            return configuration.getKerberosPort();
        }
        // DNS
        else if ( configuration.isEnableDns() )
        {
            return configuration.getDnsPort();
        }
        // NTP
        else if ( configuration.isEnableNtp() )
        {
            return configuration.getNtpPort();
        }
        // ChangePassword
        else if ( configuration.isEnableChangePassword() )
        {
            return configuration.getChangePasswordPort();
        }
        else
        {
            return 0;
        }
View Full Code Here

     */
    public String[] checkPortsBeforeServerStart( LdapServer server ) throws Exception
    {
        List<String> alreadyInUseProtocolPortsList = new ArrayList<String>();

        ServerConfigurationV153 configuration = getServerConfiguration( server );

        // LDAP
        if ( configuration.isEnableLdap() )
        {
            if ( !AvailablePortFinder.available( configuration.getLdapPort() ) )
            {
                alreadyInUseProtocolPortsList
                    .add( NLS.bind(
                        Messages.getString( "ApacheDS153LdapServerAdapter.LDAPPort" ), new Object[] { configuration.getLdapPort() } ) ); //$NON-NLS-1$
            }
        }

        // LDAPS
        if ( configuration.isEnableLdaps() )
        {
            if ( !AvailablePortFinder.available( configuration.getLdapsPort() ) )
            {
                alreadyInUseProtocolPortsList
                    .add( NLS.bind(
                        Messages.getString( "ApacheDS153LdapServerAdapter.LDAPSPort" ), new Object[] { configuration.getLdapsPort() } ) ); //$NON-NLS-1$
            }
        }

        // Kerberos
        if ( configuration.isEnableKerberos() )
        {
            if ( !AvailablePortFinder.available( configuration.getKerberosPort() ) )
            {
                alreadyInUseProtocolPortsList
                    .add( NLS
                        .bind(
                            Messages.getString( "ApacheDS153LdapServerAdapter.KerberosPort" ), new Object[] { configuration.getKerberosPort() } ) ); //$NON-NLS-1$
            }
        }

        // DNS
        if ( configuration.isEnableDns() )
        {
            if ( !AvailablePortFinder.available( configuration.getDnsPort() ) )
            {
                alreadyInUseProtocolPortsList
                    .add( NLS.bind(
                        Messages.getString( "ApacheDS153LdapServerAdapter.DNSPort" ), new Object[] { configuration.getDnsPort() } ) ); //$NON-NLS-1$
            }
        }

        // NTP
        if ( configuration.isEnableNtp() )
        {
            if ( !AvailablePortFinder.available( configuration.getNtpPort() ) )
            {
                alreadyInUseProtocolPortsList.add( NLS.bind(
                    Messages.getString( "ApacheDS153LdapServerAdapter.NTPPort" ), new Object[] //$NON-NLS-1$
                    { configuration.getNtpPort() } ) );
            }
        }

        // Change Password
        if ( configuration.isEnableChangePassword() )
        {
            if ( !AvailablePortFinder.available( configuration.getChangePasswordPort() ) )
            {
                alreadyInUseProtocolPortsList
                    .add( NLS
                        .bind(
                            Messages.getString( "ApacheDS153LdapServerAdapter.ChangePasswordPort" ), new Object[] { configuration.getChangePasswordPort() } ) ); //$NON-NLS-1$
            }
        }

        return alreadyInUseProtocolPortsList.toArray( new String[0] );
    }
View Full Code Here

                connectionParameter.setPort( serverConfiguration154.getLdapsPort() );
            }
        }
        else if ( serverConfiguration instanceof ServerConfigurationV153 )
        {
            ServerConfigurationV153 serverConfiguration153 = ( ServerConfigurationV153 ) serverConfiguration;
            if ( serverConfiguration153.isEnableLdap() )
            {
                connectionParameter.setEncryptionMethod( EncryptionMethod.NONE );
                connectionParameter.setPort( serverConfiguration153.getLdapPort() );
            }
            else if ( serverConfiguration153.isEnableLdaps() )
            {
                connectionParameter.setEncryptionMethod( EncryptionMethod.LDAPS );
                connectionParameter.setPort( serverConfiguration153.getLdapsPort() );
            }
        }

        // Bind password
        connectionParameter.setBindPassword( "secret" );
View Full Code Here

            ServerConfigurationV154 serverConfiguration154 = ( ServerConfigurationV154 ) serverConfiguration;
            return ( serverConfiguration154.isEnableLdap() ) || ( serverConfiguration154.isEnableLdaps() );
        }
        else if ( serverConfiguration instanceof ServerConfigurationV153 )
        {
            ServerConfigurationV153 serverConfiguration153 = ( ServerConfigurationV153 ) serverConfiguration;
            return ( serverConfiguration153.isEnableLdap() ) || ( serverConfiguration153.isEnableLdaps() );
        }

        return false;
    }
View Full Code Here

    /**
     * Initializes the page with the Editor input.
     */
    private void initFromInput()
    {
        ServerConfigurationV153 configuration = ( ServerConfigurationV153 ) ( ( ServerConfigurationEditor ) getEditor() )
            .getServerConfiguration();

        // Supported Authentication Mechanisms
        supportedMechanismsTableViewer.setCheckedElements( configuration.getSupportedMechanisms().toArray() );

        // SASL Host
        saslHostText.setText( configuration.getSaslHost() );

        // SASL Principal
        saslPrincipalText.setText( configuration.getSaslPrincipal() );

        // Search Base DN
        searchBaseDnText.setText( configuration.getSearchBaseDn() );

        // SASL Quality Of Protection
        saslQualityOfProtectionTableViewer.setCheckedElements( configuration.getSaslQops().toArray() );

        // SASL Realms
        saslRealms.addAll( configuration.getSaslRealms() );
        saslRealmsTableViewer.setInput( saslRealms );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.apacheds.configuration.model.v153.IndexedAttribute

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.