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

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


            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

    /* (non-Javadoc)
     * @see org.apache.directory.studio.apacheds.configuration.editor.SavableWizardPage#save()
     */
    public void save()
    {
        ServerConfigurationV153 configuration = ( ServerConfigurationV153 ) ( ( ServerConfigurationEditor ) getEditor() )
            .getServerConfiguration();

        // Supported Authentication Mechanisms
        if ( ( supportedMechanismsTableViewer != null ) && ( supportedMechanismsTableViewer.getTable() != null )
            && ( !supportedMechanismsTableViewer.getTable().isDisposed() ) )
        {
            List<SupportedMechanismEnum> supportedMechanismsList = new ArrayList<SupportedMechanismEnum>();
            for ( Object supportedMechanism : supportedMechanismsTableViewer.getCheckedElements() )
            {
                supportedMechanismsList.add( ( SupportedMechanismEnum ) supportedMechanism );
            }
            configuration.setSupportedMechanisms( supportedMechanismsList );
        }

        // SASL Host
        if ( ( saslHostText != null ) && ( !saslHostText.isDisposed() ) )
        {
            configuration.setSaslHost( saslHostText.getText() );
        }

        // SASL Principal
        if ( ( saslPrincipalText != null ) && ( !saslPrincipalText.isDisposed() ) )
        {
            configuration.setSaslPrincipal( saslPrincipalText.getText() );
        }

        // Search Base DN
        if ( ( searchBaseDnText != null ) && ( !searchBaseDnText.isDisposed() ) )
        {
            configuration.setSearchBaseDn( searchBaseDnText.getText() );
        }

        // SASL Quality Of Protection
        if ( ( saslQualityOfProtectionTableViewer != null ) && ( saslQualityOfProtectionTableViewer.getTable() != null )
            && ( !saslQualityOfProtectionTableViewer.getTable().isDisposed() ) )
        {
            List<SaslQualityOfProtectionEnum> saslQoPList = new ArrayList<SaslQualityOfProtectionEnum>();
            for ( Object qop : saslQualityOfProtectionTableViewer.getCheckedElements() )
            {
                saslQoPList.add( ( SaslQualityOfProtectionEnum ) qop );
            }
            configuration.setSaslQops( saslQoPList );
        }

        // SASL Realms
        if ( ( saslRealmsTableViewer != null ) && ( saslRealmsTableViewer.getTable() != null )
            && ( !saslRealmsTableViewer.getTable().isDisposed() ) )
        {
            configuration.setSaslRealms( saslRealms );
        }
    }
View Full Code Here

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

        // LDAP Protocol
        enableLdapCheckbox.setSelection( configuration.isEnableLdap() );
        ldapPortText.setEnabled( enableLdapCheckbox.getSelection() );
        ldapPortText.setText( "" + configuration.getLdapPort() );

        // LDAPS Protocol
        enableLdapsCheckbox.setSelection( configuration.isEnableLdaps() );
        ldapsPortText.setEnabled( enableLdapsCheckbox.getSelection() );
        ldapsPortText.setText( "" + configuration.getLdapsPort() );

        // Kerberos Protocol
        enableKerberosCheckbox.setSelection( configuration.isEnableKerberos() );
        kerberosPortText.setEnabled( enableKerberosCheckbox.getSelection() );
        kerberosPortText.setText( "" + configuration.getKerberosPort() );

        // NTP Protocol
        enableNtpCheckbox.setSelection( configuration.isEnableNtp() );
        ntpPortText.setEnabled( enableNtpCheckbox.getSelection() );
        ntpPortText.setText( "" + configuration.getNtpPort() );

        // DNS Protocol
        enableDnsCheckbox.setSelection( configuration.isEnableDns() );
        dnsPortText.setEnabled( enableDnsCheckbox.getSelection() );
        dnsPortText.setText( "" + configuration.getDnsPort() );

        // Change Password Protocol
        enableChangePasswordCheckbox.setSelection( configuration.isEnableChangePassword() );
        changePasswordPortText.setEnabled( enableChangePasswordCheckbox.getSelection() );
        changePasswordPortText.setText( "" + configuration.getChangePasswordPort() );

        // Max Time Limit
        maxTimeLimitText.setText( "" + configuration.getMaxTimeLimit() );

        // Max Size Limit
        maxSizeLimitText.setText( "" + configuration.getMaxSizeLimit() );

        // Synchronization Period
        synchPeriodText.setText( "" + configuration.getSynchronizationPeriod() );

        // Max Threads
        maxThreadsText.setText( "" + configuration.getMaxThreads() );

        // Allow Anonymous Access
        allowAnonymousAccessCheckbox.setSelection( configuration.isAllowAnonymousAccess() );

        // Enable Access Control
        enableAccesControlCheckbox.setSelection( configuration.isEnableAccessControl() );

        // Denormalize Op Attr
        denormalizeOpAttrCheckbox.setSelection( configuration.isDenormalizeOpAttr() );
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.directory.studio.apacheds.configuration.editor.SavableWizardPage#save()
     */
    public void save()
    {
        ServerConfigurationV153 configuration = ( ServerConfigurationV153 ) ( ( ServerConfigurationEditor ) getEditor() )
            .getServerConfiguration();

        configuration.setEnableLdap( enableLdapCheckbox.getSelection() );
        configuration.setLdapPort( Integer.parseInt( ldapPortText.getText() ) );
        configuration.setEnableLdaps( enableLdapsCheckbox.getSelection() );
        configuration.setLdapsPort( Integer.parseInt( ldapsPortText.getText() ) );
        configuration.setEnableKerberos( enableKerberosCheckbox.getSelection() );
        configuration.setKerberosPort( Integer.parseInt( kerberosPortText.getText() ) );
        configuration.setEnableNtp( enableNtpCheckbox.getSelection() );
        configuration.setNtpPort( Integer.parseInt( ntpPortText.getText() ) );
        configuration.setEnableDns( enableDnsCheckbox.getSelection() );
        configuration.setDnsPort( Integer.parseInt( dnsPortText.getText() ) );
        configuration.setEnableChangePassword( enableChangePasswordCheckbox.getSelection() );
        configuration.setChangePasswordPort( Integer.parseInt( changePasswordPortText.getText() ) );

        configuration.setMaxTimeLimit( Integer.parseInt( maxTimeLimitText.getText() ) );
        configuration.setMaxSizeLimit( Integer.parseInt( maxSizeLimitText.getText() ) );
        configuration.setSynchronizationPeriod( Long.parseLong( synchPeriodText.getText() ) );
        configuration.setMaxThreads( Integer.parseInt( maxThreadsText.getText() ) );

        configuration.setAllowAnonymousAccess( allowAnonymousAccessCheckbox.getSelection() );
        configuration.setEnableAccessControl( enableAccesControlCheckbox.getSelection() );
        configuration.setDenormalizeOpAttr( denormalizeOpAttrCheckbox.getSelection() );
    }
View Full Code Here

                    break;
                case VERSION_1_5_4:
                    serverXmlIO = new ServerXmlIOV154();
                    break;
                case VERSION_1_5_3:
                    serverXmlIO = new ServerXmlIOV153();
                    break;
                case VERSION_1_5_2:
                    serverXmlIO = new ServerXmlIOV152();
                    break;
                case VERSION_1_5_1:
View Full Code Here

                    serverXmlIO = new ServerXmlIOV154();
                    serverConfiguration = serverXmlIO.parse( ApacheDSConfigurationPlugin.class
                        .getResourceAsStream( "default-server-1.5.4.xml" ) ); //$NON-NLS-1$
                    break;
                case VERSION_1_5_3:
                    serverXmlIO = new ServerXmlIOV153();
                    serverConfiguration = serverXmlIO.parse( ApacheDSConfigurationPlugin.class
                        .getResourceAsStream( "default-server-1.5.3.xml" ) ); //$NON-NLS-1$
                    break;
                case VERSION_1_5_2:
                    serverXmlIO = new ServerXmlIOV152();
View Full Code Here

                return serverXmlIOV155.parse( fis );
            case VERSION_1_5_4:
                ServerXmlIOV154 serverXmlIOV154 = new ServerXmlIOV154();
                return serverXmlIOV154.parse( fis );
            case VERSION_1_5_3:
                ServerXmlIOV153 serverXmlIOV153 = new ServerXmlIOV153();
                return serverXmlIOV153.parse( fis );
        }

        // No corresponding reader has been found, we return null
        return null;
    }
View Full Code Here

        {
            case VERSION_1_5_4:
                ServerXmlIOV154 serverXmlIOV154 = new ServerXmlIOV154();
                return serverXmlIOV154.parse( fis );
            case VERSION_1_5_3:
                ServerXmlIOV153 serverXmlIOV153 = new ServerXmlIOV153();
                return serverXmlIOV153.parse( fis );
        }

        // No corresponding reader has been found, we return null
        return null;
    }
View Full Code Here

            {
                // Getting the server
                Server server = ( Server ) selection.getFirstElement();

                // Parsing the 'server.xml' file
                ServerXmlIOV153 serverXmlIOV153 = new ServerXmlIOV153();
                ServerConfigurationV153 serverConfiguration = null;
                try
                {
                    serverConfiguration = ( ServerConfigurationV153 ) serverXmlIOV153.parse( new FileInputStream(
                        new File( ApacheDsPluginUtils.getApacheDsServersFolder().append( server.getId() ).append(
                            "conf" ).append( "server.xml" ).toOSString() ) ) );
                }
                catch ( FileNotFoundException e )
                {
View Full Code Here

TOP

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

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.