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

Examples of org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration


        if ( obj instanceof NonExistingServerConfigurationInput )
        {
            NonExistingServerConfigurationInput input = ( NonExistingServerConfigurationInput ) obj;
            if ( input.exists() && exists() )
            {
                ServerConfiguration inputServerConfiguration = input.getServerConfiguration();

                if ( ( inputServerConfiguration != null ) && ( serverConfiguration != null ) )
                {
                    return inputServerConfiguration.equals( serverConfiguration );
                }
            }
        }

        return false;
View Full Code Here


    public boolean performFinish()
    {
        try
        {
            // Getting the default server configuration for the target version
            ServerConfiguration serverConfiguration = null;
            ServerXmlIO serverXmlIO = null;
            switch ( page.getTargetVersion() )
            {
                case VERSION_1_5_5:
                    serverXmlIO = new ServerXmlIOV155();
View Full Code Here

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

                // Parsing the 'server.xml' file
                ServerConfiguration serverConfiguration = null;
                try
                {
                    serverConfiguration = ApacheDsPluginUtils.getServerConfiguration( server );
                }
                catch ( IOException e )
View Full Code Here

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

                // Parsing the 'server.xml' file
                ServerConfiguration serverConfiguration = null;
                try
                {
                    serverConfiguration = ApacheDsPluginUtils.getServerConfiguration( server );
                }
                catch ( IOException e )
View Full Code Here

    public boolean performFinish()
    {
        try
        {
            ServerConfigurationParser parser = new ServerConfigurationParser();
            ServerConfiguration serverConfiguration = parser.parse( Activator.class
                .getResourceAsStream( "default-server.xml" ) );

            IWorkbenchPage page = window.getActivePage();
            page.openEditor( new NonExistingServerConfigurationInput( serverConfiguration ), ServerConfigurationEditor.ID );
        }
View Full Code Here

        if ( obj instanceof NonExistingServerConfigurationInput )
        {
            NonExistingServerConfigurationInput input = ( NonExistingServerConfigurationInput ) obj;
            if ( input.exists() && exists() )
            {
                ServerConfiguration inputServerConfiguration = input.getServerConfiguration();

                if ( ( inputServerConfiguration != null ) && ( serverConfiguration != null ) )
                {
                    return inputServerConfiguration.equals( serverConfiguration );
                }
            }
        }

        return false;
View Full Code Here

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

        // Principal
        String principal = configuration.getPrincipal();
        if ( principal != null )
        {
            principalText.setText( principal );
        }

        // Password
        String password = configuration.getPassword();
        if ( password != null )
        {
            passwordText.setText( password );
        }

        // Binary Attributes
        binaryAttributes = configuration.getBinaryAttributes();
        binaryAttributesTableViewer.setInput( binaryAttributes );

        // LDAP Protocol
        enableLdapCheckbox.setSelection( true );
        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() );

        supportedMechanismsTableViewer.setCheckedElements( configuration.getSupportedMechanisms().toArray() );

        // 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

    /**
     * Saves the necessary elements to the input model.
     */
    public void save()
    {
        ServerConfiguration configuration = ( ( ServerConfigurationEditor ) getEditor() ).getServerConfiguration();

        configuration.setPrincipal( principalText.getText() );
        configuration.setPassword( passwordText.getText() );

        configuration.setBinaryAttributes( binaryAttributes );

        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() ) );

        List<String> supportedMechanismsList = new ArrayList<String>();
        for ( Object supportedMechanism : supportedMechanismsTableViewer.getCheckedElements() )
        {
            supportedMechanismsList.add( ( String ) supportedMechanism );
        }
        configuration.setSupportedMechanisms( supportedMechanismsList );

        configuration.setAllowAnonymousAccess( allowAnonymousAccessCheckbox.getSelection() );
        configuration.setEnableAccessControl( enableAccesControlCheckbox.getSelection() );
        configuration.setDenormalizeOpAttr( denormalizeOpAttrCheckbox.getSelection() );

    }
View Full Code Here

        if ( obj instanceof NonExistingServerConfigurationInput )
        {
            NonExistingServerConfigurationInput input = ( NonExistingServerConfigurationInput ) obj;
            if ( input.exists() && exists() )
            {
                ServerConfiguration inputServerConfiguration = input.getServerConfiguration();

                if ( ( inputServerConfiguration != null ) && ( serverConfiguration != null ) )
                {
                    return inputServerConfiguration.equals( serverConfiguration );
                }
            }
        }

        return false;
View Full Code Here

    public boolean performFinish()
    {
        try
        {
            // Getting the default server configuration for the target version
            ServerConfiguration serverConfiguration = null;
            ServerXmlIO serverXmlIO = null;
            switch ( page.getTargetVersion() )
            {
                case VERSION_1_5_3:
                    serverXmlIO = new ServerXmlIOV153();
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration

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.