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

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


     * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
     */
    public void run( IAction action )
    {
        ServerConfigurationParser parser = new ServerConfigurationParser();
        ServerConfiguration serverConfiguration = null;
       
        try
        {
            serverConfiguration = parser.parse( Activator.class.getResourceAsStream( "default-server.xml" ) );
        }
View Full Code Here


        {
            return;
        }

        ServerConfigurationParser parser = new ServerConfigurationParser();
        ServerConfiguration serverConfiguration = null;

        try
        {
            serverConfiguration = parser.parse( selectedFile );
        }
View Full Code Here

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

        binaryAttributes = configuration.getBinaryAttributes();
        binaryAttributesTableViewer.setInput( binaryAttributes );

        // Port
        portText.setText( "" + configuration.getPort() );

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

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

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

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

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

        // Enable NTP
        enableNTPCheckbox.setSelection( configuration.isEnableNTP() );

        // Enable Kerberos
        enableKerberosCheckbox.setSelection( configuration.isEnableKerberos() );

        // Enable Change Password
        enableChangePasswordCheckbox.setSelection( configuration.isEnableChangePassword() );

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

    /**
     * Saves the necessary elements to the input model.
     */
    public void save()
    {
        ServerConfiguration serverConfiguration = ( ( ServerConfigurationEditorInput ) getEditorInput() )
            .getServerConfiguration();

        serverConfiguration.setPort( Integer.parseInt( portText.getText() ) );
        serverConfiguration.setPrincipal( principalText.getText() );
        serverConfiguration.setPassword( passwordText.getText() );
        serverConfiguration.setAllowAnonymousAccess( allowAnonymousAccessCheckbox.getSelection() );
        serverConfiguration.setMaxTimeLimit( Integer.parseInt( maxTimeLimitText.getText() ) );
        serverConfiguration.setMaxSizeLimit( Integer.parseInt( maxSizeLimitText.getText() ) );
        serverConfiguration.setSynchronizationPeriod( Long.parseLong( synchPeriodText.getText() ) );
        serverConfiguration.setMaxThreads( Integer.parseInt( maxThreadsText.getText() ) );
        serverConfiguration.setEnableAccessControl( enableAccesControlCheckbox.getSelection() );
        serverConfiguration.setEnableNTP( enableNTPCheckbox.getSelection() );
        serverConfiguration.setEnableKerberos( enableKerberosCheckbox.getSelection() );
        serverConfiguration.setEnableChangePassword( enableChangePasswordCheckbox.getSelection() );
        serverConfiguration.setDenormalizeOpAttr( denormalizeOpAttrCheckbox.getSelection() );
    }
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_6:
                    serverXmlIO = new ServerXmlIOV156();
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

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

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

        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

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

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.