You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2008/05/14 19:21:48 UTC

svn commit: r656336 [8/11] - in /directory/studio/trunk/apacheds-configuration: ./ resources/icons/ src/main/java/ src/main/java/org/apache/directory/studio/apacheds/configuration/ src/main/java/org/apache/directory/studio/apacheds/configuration/dialog...

Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v150/ServerXmlIOV150.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v150/ServerXmlIOV150.java?rev=656336&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v150/ServerXmlIOV150.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v150/ServerXmlIOV150.java Wed May 14 10:21:46 2008
@@ -0,0 +1,1083 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.configuration.model.v150;
+
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
+import javax.xml.transform.TransformerException;
+
+import org.apache.directory.studio.apacheds.configuration.model.AbstractServerXmlIO;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIO;
+import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIOException;
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+
+
+/**
+ * This class implements a parser and a writer for the 'server.xml' file of 
+ * Apache Directory Server version 1.5.0.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerXmlIOV150 extends AbstractServerXmlIO implements ServerXmlIO
+{
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.apacheds.configuration.model.ServerXmlIO#isValid(java.io.InputStream)
+     */
+    public boolean isValid( InputStream is )
+    {
+        try
+        {
+            SAXReader saxReader = new SAXReader();
+
+            return isValid( saxReader.read( is ) );
+        }
+        catch ( Exception e )
+        {
+            return false;
+        }
+    }
+
+
+    /**
+     * Checks if the InputStream is valid.
+     *
+     * @param inputStream
+     *      the InputStream
+     * @return
+     *      true if the InputStream is valid, false if not
+     */
+    public boolean isValid( Reader reader )
+    {
+        try
+        {
+            SAXReader saxReader = new SAXReader();
+
+            return isValid( saxReader.read( reader ) );
+        }
+        catch ( Exception e )
+        {
+            return false;
+        }
+    }
+
+
+    /**
+     * Checks if the Document is valid.
+     *
+     * @param document
+     *      the Document
+     * @return
+     *      true if the Document is valid, false if not
+     */
+    private boolean isValid( Document document )
+    {
+        for ( Iterator<?> i = document.getRootElement().elementIterator( "bean" ); i.hasNext(); )
+        {
+            Element element = ( Element ) i.next();
+            org.dom4j.Attribute classAttribute = element.attribute( "class" );
+            if ( classAttribute != null
+                && ( classAttribute.getValue()
+                    .equals( "org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration" ) ) )
+            {
+                String partitionName = readBeanProperty( "name", element );
+
+                if ( partitionName != null )
+                {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.apacheds.configuration.model.ServerXmlIO#parse(java.io.InputStream)
+     */
+    public ServerConfiguration parse( InputStream is ) throws ServerXmlIOException
+    {
+        try
+        {
+            SAXReader reader = new SAXReader();
+            Document document = reader.read( is );
+
+            ServerConfigurationV150 serverConfiguration = new ServerConfigurationV150();
+
+            parse( document, serverConfiguration );
+
+            return serverConfiguration;
+        }
+        catch ( Exception e )
+        {
+            if ( e instanceof ServerXmlIOException )
+            {
+                throw ( ServerXmlIOException ) e;
+            }
+            else
+            {
+                ServerXmlIOException exception = new ServerXmlIOException( e.getMessage(), e.getCause() );
+                exception.setStackTrace( e.getStackTrace() );
+                throw exception;
+            }
+        }
+    }
+
+
+    /**
+     * Parses the Document.
+     *
+     * @param document
+     *      the Document
+     * @param serverConfiguration
+     *      the Server Configuration
+     * @throws NumberFormatException
+     * @throws BooleanFormatException
+     * @throws ServerXmlIOException 
+     */
+    private void parse( Document document, ServerConfigurationV150 serverConfiguration ) throws NumberFormatException,
+        BooleanFormatException, ServerXmlIOException
+    {
+        // Reading the 'Environment' Bean
+        readEnvironmentBean( document, serverConfiguration );
+
+        // Reading the 'Configuration' Bean
+        readConfigurationBean( document, serverConfiguration );
+    }
+
+
+    /**
+     * Reads the "Environment" Bean and store its values in the given ServerConfiguration.
+     *
+     * @param document
+     *      the document to use
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void readEnvironmentBean( Document document, ServerConfigurationV150 serverConfiguration )
+    {
+        Element environmentBean = getBeanElementById( document, "environment" );
+
+        // Principal
+        String principal = readEnvironmentBeanProperty( "java.naming.security.principal", environmentBean );
+        if ( principal != null )
+        {
+            serverConfiguration.setPrincipal( principal );
+        }
+
+        // Password
+        String password = readEnvironmentBeanProperty( "java.naming.security.credentials", environmentBean );
+        if ( password != null )
+        {
+            serverConfiguration.setPassword( password );
+        }
+
+        // Binary Attributes
+        String binaryAttributes = readEnvironmentBeanProperty( "java.naming.ldap.attributes.binary", environmentBean );
+        if ( binaryAttributes != null )
+        {
+            String[] attributes = binaryAttributes.split( " " );
+
+            for ( String attribute : attributes )
+            {
+                serverConfiguration.addBinaryAttribute( attribute );
+            }
+        }
+    }
+
+
+    /**
+     * Reads the given property in the 'Environment' Bean and returns it.
+     *
+     * @param property
+     *      the property
+     * @param element
+     *      the Environment Bean Element
+     * @return
+     *      the value of the property, or null if the property has not been found
+     */
+    private String readEnvironmentBeanProperty( String property, Element element )
+    {
+        Element propertyElement = element.element( "property" );
+        if ( propertyElement != null )
+        {
+            Element propsElement = propertyElement.element( "props" );
+            if ( propsElement != null )
+            {
+                for ( Iterator<?> i = propsElement.elementIterator( "prop" ); i.hasNext(); )
+                {
+                    Element propElement = ( Element ) i.next();
+                    org.dom4j.Attribute keyAttribute = propElement.attribute( "key" );
+                    if ( keyAttribute != null && ( keyAttribute.getValue().equals( property ) ) )
+                    {
+                        return propElement.getText();
+                    }
+                }
+            }
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Reads the "Configuration" Bean and store its values in the given ServerConfiguration.
+     *
+     * @param document
+     *      the document to use
+     * @param serverConfiguration
+     *      the Server Configuration
+     * @throws NumberFormatException
+     * @throws BooleanFormatException 
+     * @throws ServerXmlIOException 
+     */
+    private void readConfigurationBean( Document document, ServerConfigurationV150 serverConfiguration )
+        throws NumberFormatException, BooleanFormatException, ServerXmlIOException
+    {
+        Element configurationBean = getBeanElementById( document, "configuration" );
+
+        // LdapPort
+        String ldapPort = readBeanProperty( "ldapPort", configurationBean );
+        if ( ldapPort != null )
+        {
+            serverConfiguration.setPort( Integer.parseInt( ldapPort ) );
+        }
+
+        // SynchPeriodMillis
+        String synchPeriodMillis = readBeanProperty( "synchPeriodMillis", configurationBean );
+        if ( synchPeriodMillis != null )
+        {
+            serverConfiguration.setSynchronizationPeriod( Long.parseLong( synchPeriodMillis ) );
+        }
+
+        // MaxTimeLimit
+        String maxTimeLimit = readBeanProperty( "maxTimeLimit", configurationBean );
+        if ( maxTimeLimit != null )
+        {
+            serverConfiguration.setMaxTimeLimit( Integer.parseInt( maxTimeLimit ) );
+        }
+
+        // MaxSizeLimit
+        String maxSizeLimit = readBeanProperty( "maxSizeLimit", configurationBean );
+        if ( maxSizeLimit != null )
+        {
+            serverConfiguration.setMaxSizeLimit( Integer.parseInt( maxSizeLimit ) );
+        }
+
+        // MaxThreads
+        String maxThreads = readBeanProperty( "maxThreads", configurationBean );
+        if ( maxThreads != null )
+        {
+            serverConfiguration.setMaxThreads( Integer.parseInt( maxThreads ) );
+        }
+
+        // AllowAnonymousAccess
+        String allowAnonymousAccess = readBeanProperty( "allowAnonymousAccess", configurationBean );
+        if ( allowAnonymousAccess != null )
+        {
+            serverConfiguration.setAllowAnonymousAccess( parseBoolean( allowAnonymousAccess ) );
+        }
+
+        // AccessControlEnabled
+        String accessControlEnabled = readBeanProperty( "accessControlEnabled", configurationBean );
+        if ( accessControlEnabled != null )
+        {
+            serverConfiguration.setEnableAccessControl( parseBoolean( accessControlEnabled ) );
+        }
+
+        // EnableNtp
+        String enableNtp = readBeanProperty( "enableNtp", configurationBean );
+        if ( enableNtp != null )
+        {
+            serverConfiguration.setEnableNTP( parseBoolean( enableNtp ) );
+        }
+
+        // EnableKerberos
+        String enableKerberos = readBeanProperty( "enableKerberos", configurationBean );
+        if ( enableKerberos != null )
+        {
+            serverConfiguration.setEnableKerberos( parseBoolean( enableKerberos ) );
+        }
+
+        // EnableChangePassword
+        String enableChangePassword = readBeanProperty( "enableChangePassword", configurationBean );
+        if ( enableChangePassword != null )
+        {
+            serverConfiguration.setEnableChangePassword( parseBoolean( enableChangePassword ) );
+        }
+
+        // EnableChangePassword
+        String denormalizeOpAttrsEnabled = readBeanProperty( "denormalizeOpAttrsEnabled", configurationBean );
+        if ( denormalizeOpAttrsEnabled != null )
+        {
+            serverConfiguration.setDenormalizeOpAttr( parseBoolean( denormalizeOpAttrsEnabled ) );
+        }
+
+        // SystemPartition
+        String systemPartitionConfiguration = readBeanProperty( "systemPartitionConfiguration", configurationBean );
+        if ( systemPartitionConfiguration != null )
+        {
+            Partition systemPartition = readPartition( document, systemPartitionConfiguration, true );
+            if ( systemPartition != null )
+            {
+                serverConfiguration.addPartition( systemPartition );
+            }
+        }
+        else
+        {
+            throw new ServerXmlIOException(
+                "The Server Configuration does not contain a 'systemPartitionConfiguration' property." );
+        }
+
+        // Other Partitions
+        readOtherPartitions( configurationBean, serverConfiguration );
+
+        // Interceptors
+        readInterceptors( configurationBean, serverConfiguration );
+
+        // ExtendedOperations
+        readExtendedOperations( configurationBean, serverConfiguration );
+    }
+
+
+    /**
+     * Reads and adds Partitions (other than the SystemPartition) to the Server Configuration.
+     *
+     * @param configurationBean
+     *      the Configuration Bean Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     * @throws BooleanFormatException 
+     * @throws NumberFormatException 
+     */
+    private void readOtherPartitions( Element configurationBean, ServerConfigurationV150 serverConfiguration )
+        throws NumberFormatException, BooleanFormatException
+    {
+        Element propertyElement = getBeanPropertyElement( "partitionConfigurations", configurationBean );
+        if ( propertyElement != null )
+        {
+            Element setElement = propertyElement.element( "set" );
+            if ( setElement != null )
+            {
+                for ( Iterator<?> i = setElement.elementIterator( "ref" ); i.hasNext(); )
+                {
+                    Element element = ( Element ) i.next();
+                    org.dom4j.Attribute beanAttribute = element.attribute( "bean" );
+                    if ( beanAttribute != null )
+                    {
+                        Partition partition = readPartition( configurationBean.getDocument(), beanAttribute.getValue(),
+                            false );
+                        if ( partition != null )
+                        {
+                            serverConfiguration.addPartition( partition );
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Reads the partition associated with the given Bean ID and return it.
+     *
+     * @param document
+     *      the document
+     * @param id
+     *      the Bean ID of the partition
+     * @param isSystemPartition
+     *      true if this partition is the System Partition
+     * @return
+     *      the partition associated with the given Bean ID
+     * @throws BooleanFormatException 
+     */
+    private Partition readPartition( Document document, String id, boolean isSystemPartition )
+        throws BooleanFormatException, NumberFormatException
+    {
+        Element partitionBean = getBeanElementById( document, id );
+        if ( partitionBean != null )
+        {
+            Partition partition = new Partition();
+            partition.setSystemPartition( isSystemPartition );
+
+            // Name
+            String name = readBeanProperty( "name", partitionBean );
+            if ( name != null )
+            {
+                partition.setId( name );
+            }
+
+            // CacheSize
+            String cacheSize = readBeanProperty( "cacheSize", partitionBean );
+            if ( cacheSize != null )
+            {
+                partition.setCacheSize( Integer.parseInt( cacheSize ) );
+            }
+
+            // Suffix
+            String suffix = readBeanProperty( "suffix", partitionBean );
+            if ( suffix != null )
+            {
+                partition.setSuffix( suffix );
+            }
+
+            // OptimizerEnabled
+            String optimizerEnabled = readBeanProperty( "optimizerEnabled", partitionBean );
+            if ( optimizerEnabled != null )
+            {
+                partition.setEnableOptimizer( parseBoolean( optimizerEnabled ) );
+            }
+
+            // SynchOnWrite
+            String synchOnWrite = readBeanProperty( "synchOnWrite", partitionBean );
+            if ( synchOnWrite != null )
+            {
+                partition.setSynchronizationOnWrite( parseBoolean( synchOnWrite ) );
+            }
+
+            // IndexedAttributes
+            partition.setIndexedAttributes( readPartitionIndexedAttributes( partitionBean ) );
+
+            // ContextEntry
+            partition.setContextEntry( readPartitionContextEntry( partitionBean ) );
+
+            return partition;
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Reads the Indexed Attributes of the given Partition Bean Element
+     *
+     * @param partitionBean
+     *      the Partition Bean Element
+     * @return
+     *      the Indexed Attributes
+     */
+    private List<IndexedAttribute> readPartitionIndexedAttributes( Element partitionBean ) throws NumberFormatException
+    {
+        List<IndexedAttribute> indexedAttributes = new ArrayList<IndexedAttribute>();
+
+        Element propertyElement = getBeanPropertyElement( "indexedAttributes", partitionBean );
+        if ( propertyElement != null )
+        {
+            Element setElement = propertyElement.element( "set" );
+            if ( setElement != null )
+            {
+                for ( Iterator<?> i = setElement.elementIterator( "bean" ); i.hasNext(); )
+                {
+                    Element beanElement = ( Element ) i.next();
+                    IndexedAttribute ia = readIndexedAttribute( beanElement );
+                    if ( ia != null )
+                    {
+                        indexedAttributes.add( ia );
+                    }
+                }
+            }
+        }
+
+        return indexedAttributes;
+    }
+
+
+    /**
+     * Reads an Indexed Attribute.
+     *
+     * @param beanElement
+     *      the Bean Element of the Indexed Attribute
+     * @return
+     *      the corresponding Indexed Attribute or null if it could not be parsed
+     * @throws NumberFormatException
+     */
+    private IndexedAttribute readIndexedAttribute( Element beanElement ) throws NumberFormatException
+    {
+        org.dom4j.Attribute classAttribute = beanElement.attribute( "class" );
+        if ( classAttribute != null
+            && classAttribute.getValue().equals(
+                "org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration" ) )
+        {
+            String attributeId = readBeanProperty( "attributeId", beanElement );
+            String cacheSize = readBeanProperty( "cacheSize", beanElement );
+            if ( ( attributeId != null ) && ( cacheSize != null ) )
+            {
+                return new IndexedAttribute( attributeId, Integer.parseInt( cacheSize ) );
+            }
+
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Reads the Context Entry of the given Partition Bean Element
+     *
+     * @param partitionBean
+     *      the Partition Bean Element
+     * @return
+     *      the Context Entry
+     */
+    private Attributes readPartitionContextEntry( Element partitionBean )
+    {
+        Element propertyElement = getBeanPropertyElement( "contextEntry", partitionBean );
+        if ( propertyElement != null )
+        {
+            Element valueElement = propertyElement.element( "value" );
+            if ( valueElement != null )
+            {
+                return readContextEntry( valueElement.getText() );
+            }
+        }
+
+        return new BasicAttributes( true );
+    }
+
+
+    /**
+     * Reads and adds the Interceptors to the Server Configuration.
+     *
+     * @param configurationBean
+     *      the Configuration Bean Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void readInterceptors( Element configurationBean, ServerConfigurationV150 serverConfiguration )
+    {
+        Element propertyElement = getBeanPropertyElement( "interceptorConfigurations", configurationBean );
+        if ( propertyElement != null )
+        {
+            Element listElement = propertyElement.element( "list" );
+            if ( listElement != null )
+            {
+                for ( Iterator<?> i = listElement.elementIterator( "bean" ); i.hasNext(); )
+                {
+                    Interceptor interceptor = readInterceptor( ( Element ) i.next() );
+                    if ( interceptor != null )
+                    {
+                        serverConfiguration.addInterceptor( interceptor );
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Reads an Interceptor.
+     *
+     * @param element
+     *      the Interceptor Element
+     * @return
+     *      the Interceptor or null if it could not be parsed
+     */
+    private Interceptor readInterceptor( Element element )
+    {
+        org.dom4j.Attribute classAttribute = element.attribute( "class" );
+        if ( classAttribute != null
+            && classAttribute.getValue().equals(
+                "org.apache.directory.server.core.configuration.MutableInterceptorConfiguration" ) )
+        {
+            String name = readBeanProperty( "name", element );
+
+            for ( Iterator<?> i = element.elementIterator( "property" ); i.hasNext(); )
+            {
+                Element propertyElement = ( Element ) i.next();
+                org.dom4j.Attribute nameAttribute = propertyElement.attribute( "name" );
+                if ( nameAttribute != null && ( nameAttribute.getValue().equals( "interceptor" ) ) )
+                {
+                    Element beanElement = propertyElement.element( "bean" );
+                    if ( beanElement != null )
+                    {
+                        org.dom4j.Attribute beanClassAttribute = beanElement.attribute( "class" );
+                        if ( beanClassAttribute != null )
+                        {
+                            Interceptor interceptor = new Interceptor( name );
+                            interceptor.setClassType( beanClassAttribute.getValue() );
+                            return interceptor;
+                        }
+                    }
+                }
+            }
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Reads and adds the ExtendedOperations to the Server Configuration.
+     *
+     * @param configurationBean
+     *      the Configuration Bean Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void readExtendedOperations( Element configurationBean, ServerConfigurationV150 serverConfiguration )
+    {
+        Element propertyElement = getBeanPropertyElement( "extendedOperationHandlers", configurationBean );
+        if ( propertyElement != null )
+        {
+            Element listElement = propertyElement.element( "list" );
+            if ( listElement != null )
+            {
+                for ( Iterator<?> i = listElement.elementIterator( "bean" ); i.hasNext(); )
+                {
+                    ExtendedOperation extendedOperation = readExtendedOperation( ( Element ) i.next() );
+                    if ( extendedOperation != null )
+                    {
+                        serverConfiguration.addExtendedOperation( extendedOperation );
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Reads an Extended Operation.
+     *
+     * @param element
+     *      the Extended Operation Element
+     * @return
+     *      the Extended Operation or null if it could not be parsed
+     */
+    private ExtendedOperation readExtendedOperation( Element element )
+    {
+        org.dom4j.Attribute classAttribute = element.attribute( "class" );
+        if ( classAttribute != null )
+        {
+            return new ExtendedOperation( classAttribute.getValue() );
+        }
+
+        return null;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.apacheds.configuration.model.ServerXmlIO#toXml(org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration)
+     */
+    public String toXml( ServerConfiguration serverConfiguration )
+    {
+        Document document = DocumentHelper.createDocument();
+        Element root = document.addElement( "beans" );
+
+        // Environment Bean
+        createEnvironmentBean( root, ( ServerConfigurationV150 ) serverConfiguration );
+
+        // Configuration Bean
+        createConfigurationBean( root, ( ServerConfigurationV150 ) serverConfiguration );
+
+        // System Partition Configuration Bean
+        createSystemPartitionConfigurationBean( root, ( ServerConfigurationV150 ) serverConfiguration );
+
+        // User Partitions Beans
+        createUserPartitionsConfigurationsBean( root, ( ServerConfigurationV150 ) serverConfiguration );
+
+        // CustomEditors Bean
+        createCustomEditorsBean( root );
+
+        Document stylizedDocument = null;
+        try
+        {
+            stylizedDocument = styleDocument( document );
+        }
+        catch ( TransformerException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+        stylizedDocument.addDocType( "beans", "-//SPRING//DTD BEAN//EN",
+            "http://www.springframework.org/dtd/spring-beans.dtd" );
+
+        return stylizedDocument.asXML();
+    }
+
+
+    /**
+     * Creates the Environment Bean
+     *
+     * @param root
+     *      the root Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void createEnvironmentBean( Element root, ServerConfigurationV150 serverConfiguration )
+    {
+        Element environmentBean = root.addElement( "bean" );
+        environmentBean.addAttribute( "id", "environment" );
+        environmentBean.addAttribute( "class", "org.springframework.beans.factory.config.PropertiesFactoryBean" );
+
+        Element propertyElement = environmentBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "properties" );
+        Element propsElement = propertyElement.addElement( "props" );
+
+        // Key 'java.naming.security.authentication'
+        Element propElement = propsElement.addElement( "prop" );
+        propElement.addAttribute( "key", "java.naming.security.authentication" );
+        propElement.setText( "simple" );
+
+        // Key 'java.naming.security.principal'
+        propElement = propsElement.addElement( "prop" );
+        propElement.addAttribute( "key", "java.naming.security.principal" );
+        propElement.setText( serverConfiguration.getPrincipal() );
+
+        // Key 'java.naming.security.credentials'
+        propElement = propsElement.addElement( "prop" );
+        propElement.addAttribute( "key", "java.naming.security.credentials" );
+        propElement.setText( serverConfiguration.getPassword() );
+
+        // Key 'java.naming.ldap.attributes.binary'
+        if ( !serverConfiguration.getBinaryAttributes().isEmpty() )
+        {
+            propElement = propsElement.addElement( "prop" );
+            propElement.addAttribute( "key", "java.naming.ldap.attributes.binary" );
+            StringBuffer sb = new StringBuffer();
+            for ( String attribute : serverConfiguration.getBinaryAttributes() )
+            {
+                sb.append( attribute );
+                sb.append( " " );
+            }
+            String attributes = sb.toString();
+            propElement.setText( attributes.substring( 0, attributes.length() - 1 ) );
+        }
+
+    }
+
+
+    /**
+     * Creates the Configuration Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void createConfigurationBean( Element root, ServerConfigurationV150 serverConfiguration )
+    {
+        Element configurationBean = root.addElement( "bean" );
+        configurationBean.addAttribute( "id", "configuration" );
+        configurationBean.addAttribute( "class",
+            "org.apache.directory.server.configuration.MutableServerStartupConfiguration" );
+
+        // Working directory
+        Element propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "workingDirectory" );
+        propertyElement.addAttribute( "value", "example.com" ); // Ask Alex about this value.
+
+        // SynchPeriodMillis
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "synchPeriodMillis" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.getSynchronizationPeriod() );
+
+        // MaxTimeLimit
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "maxTimeLimit" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.getMaxTimeLimit() );
+
+        // MaxSizeLimit
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "maxSizeLimit" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.getMaxSizeLimit() );
+
+        // MaxThreads
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "maxThreads" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.getMaxThreads() );
+
+        // AllowAnonymousAccess
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "allowAnonymousAccess" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.isAllowAnonymousAccess() );
+
+        // AccessControlEnabled
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "accessControlEnabled" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableAccessControl() );
+
+        // Enable NTP
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "enableNtp" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableNTP() );
+
+        // EnableKerberos
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "enableKerberos" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableKerberos() );
+
+        // EnableChangePassword
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "enableChangePassword" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableChangePassword() );
+
+        // DenormalizeOpAttrsEnabled
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "denormalizeOpAttrsEnabled" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.isDenormalizeOpAttr() );
+
+        // LdapPort
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "ldapPort" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.getPort() );
+
+        // SystemPartitionConfiguration
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "systemPartitionConfiguration" );
+        propertyElement.addAttribute( "ref", "systemPartitionConfiguration" );
+
+        // PartitionConfigurations
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "partitionConfigurations" );
+        if ( serverConfiguration.getPartitions().size() > 1 )
+        {
+            Element setElement = propertyElement.addElement( "set" );
+            int partitionCounter = 1;
+            for ( Partition partition : serverConfiguration.getPartitions() )
+            {
+                if ( !partition.isSystemPartition() )
+                {
+                    setElement.addElement( "ref" ).addAttribute( "bean", "partition-" + partitionCounter );
+                    partitionCounter++;
+                }
+            }
+        }
+
+        // ExtendedOperationHandlers
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "extendedOperationHandlers" );
+        if ( serverConfiguration.getExtendedOperations().size() > 1 )
+        {
+            Element listElement = propertyElement.addElement( "list" );
+            for ( ExtendedOperation extendedOperation : serverConfiguration.getExtendedOperations() )
+            {
+                listElement.addElement( "bean" ).addAttribute( "class", extendedOperation.getClassType() );
+            }
+        }
+
+        // InterceptorConfigurations
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "interceptorConfigurations" );
+        if ( serverConfiguration.getInterceptors().size() > 1 )
+        {
+            Element listElement = propertyElement.addElement( "list" );
+            for ( Interceptor interceptor : serverConfiguration.getInterceptors() )
+            {
+                Element interceptorBeanElement = listElement.addElement( "bean" );
+                interceptorBeanElement.addAttribute( "class",
+                    "org.apache.directory.server.core.configuration.MutableInterceptorConfiguration" );
+
+                Element interceptorPropertyElement = interceptorBeanElement.addElement( "property" );
+                interceptorPropertyElement.addAttribute( "name", "name" );
+                interceptorPropertyElement.addAttribute( "value", interceptor.getName() );
+
+                interceptorPropertyElement = interceptorBeanElement.addElement( "property" );
+                interceptorPropertyElement.addAttribute( "name", "interceptor" );
+                interceptorPropertyElement.addElement( "bean" ).addAttribute( "class",
+                    ( interceptor.getClassType() == null ? "" : interceptor.getClassType() ) );
+            }
+        }
+
+    }
+
+
+    /**
+     * Creates the SystemPartitionConfiguration Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void createSystemPartitionConfigurationBean( Element root, ServerConfigurationV150 serverConfiguration )
+    {
+        Partition systemPartition = null;
+        for ( Partition partition : serverConfiguration.getPartitions() )
+        {
+            if ( partition.isSystemPartition() )
+            {
+                systemPartition = partition;
+                break;
+            }
+        }
+
+        if ( systemPartition != null )
+        {
+            createPartitionConfigurationBean( root, systemPartition, "systemPartitionConfiguration" );
+        }
+    }
+
+
+    /**
+     * Creates the UserPartitionConfigurations Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void createUserPartitionsConfigurationsBean( Element root, ServerConfigurationV150 serverConfiguration )
+    {
+        int counter = 1;
+        for ( Partition partition : serverConfiguration.getPartitions() )
+        {
+            if ( !partition.isSystemPartition() )
+            {
+                createPartitionConfigurationBean( root, partition, "partition-" + counter );
+                counter++;
+            }
+        }
+    }
+
+
+    /**
+     * Creates a Partition Configuration Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param partition
+     *      the Partition
+     * @param name
+     *      the name to use
+     */
+    private void createPartitionConfigurationBean( Element root, Partition partition, String name )
+    {
+        Element partitionBean = root.addElement( "bean" );
+        partitionBean.addAttribute( "id", name );
+        partitionBean.addAttribute( "class",
+            "org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration" );
+
+        // Name
+        Element propertyElement = partitionBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "name" );
+        propertyElement.addAttribute( "value", partition.getId() );
+
+        // CacheSize
+        propertyElement = partitionBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "cacheSize" );
+        propertyElement.addAttribute( "value", "" + partition.getCacheSize() );
+
+        // Suffix
+        propertyElement = partitionBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "suffix" );
+        propertyElement.addAttribute( "value", partition.getSuffix() );
+
+        // OptimizerEnabled
+        propertyElement = partitionBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "optimizerEnabled" );
+        propertyElement.addAttribute( "value", "" + partition.isEnableOptimizer() );
+
+        // SynchOnWrite
+        propertyElement = partitionBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "synchOnWrite" );
+        propertyElement.addAttribute( "value", "" + partition.isSynchronizationOnWrite() );
+
+        // Indexed Attributes
+        propertyElement = partitionBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "indexedAttributes" );
+        if ( partition.getIndexedAttributes().size() > 1 )
+        {
+            Element setElement = propertyElement.addElement( "set" );
+            for ( IndexedAttribute indexedAttribute : partition.getIndexedAttributes() )
+            {
+                Element beanElement = setElement.addElement( "bean" );
+                beanElement.addAttribute( "class",
+                    "org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration" );
+
+                // AttributeID
+                Element beanPropertyElement = beanElement.addElement( "property" );
+                beanPropertyElement.addAttribute( "name", "attributeId" );
+                beanPropertyElement.addAttribute( "value", indexedAttribute.getAttributeId() );
+
+                // CacheSize
+                beanPropertyElement = beanElement.addElement( "property" );
+                beanPropertyElement.addAttribute( "name", "cacheSize" );
+                beanPropertyElement.addAttribute( "value", "" + indexedAttribute.getCacheSize() );
+            }
+        }
+
+        // ContextEntry
+        propertyElement = partitionBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "contextEntry" );
+        if ( partition.getContextEntry() != null )
+        {
+            Element valueElement = propertyElement.addElement( "value" );
+
+            Attributes contextEntry = partition.getContextEntry();
+            StringBuffer sb = new StringBuffer();
+            NamingEnumeration<? extends Attribute> ne = contextEntry.getAll();
+            while ( ne.hasMoreElements() )
+            {
+                Attribute attribute = ( Attribute ) ne.nextElement();
+                try
+                {
+                    NamingEnumeration<?> values = attribute.getAll();
+                    while ( values.hasMoreElements() )
+                    {
+                        sb.append( attribute.getID() + ": " + values.nextElement() + "\n" );
+                    }
+                }
+                catch ( NamingException e )
+                {
+                }
+            }
+
+            valueElement.setText( sb.toString() );
+        }
+    }
+
+
+    /**
+     * Creates the Custom Editors Bean.
+     *
+     * @param root
+     *      the root Element
+     */
+    private void createCustomEditorsBean( Element root )
+    {
+        Element customEditorsBean = root.addElement( "bean" );
+        customEditorsBean.addAttribute( "class", "org.springframework.beans.factory.config.CustomEditorConfigurer" );
+        Element propertyElement = customEditorsBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "customEditors" );
+        Element mapElement = propertyElement.addElement( "map" );
+        Element entryElement = mapElement.addElement( "entry" );
+        entryElement.addAttribute( "key", "javax.naming.directory.Attributes" );
+        Element entryBeanElement = entryElement.addElement( "bean" );
+        entryBeanElement.addAttribute( "class",
+            "org.apache.directory.server.core.configuration.AttributesPropertyEditor" );
+    }
+
+}

Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ExtendedOperation.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ExtendedOperation.java?rev=656336&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ExtendedOperation.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ExtendedOperation.java Wed May 14 10:21:46 2008
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.configuration.model.v151;
+
+
+/**
+ * This class represents an Extended Operation.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ExtendedOperation
+{
+    /** The class of the partition */
+    private String classType;
+
+
+    /**
+     * Creates a new instance of Partition.
+     *
+     * @param classType
+     *      the classType of the partition
+     */
+    public ExtendedOperation( String classType )
+    {
+        this.classType = classType;
+    }
+
+
+    /**
+     * Gets the class type of the partition.
+     *
+     * @return
+     *      the class type of the partition
+     */
+    public String getClassType()
+    {
+        return this.classType;
+    }
+
+
+    /**
+     * Sets the class type of the partition.
+     *
+     * @param classType
+     *      the new class type to set
+     */
+    public void setClassType( String classType )
+    {
+        this.classType = classType;
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        return classType;
+    }
+}

Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/IndexedAttribute.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/IndexedAttribute.java?rev=656336&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/IndexedAttribute.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/IndexedAttribute.java Wed May 14 10:21:46 2008
@@ -0,0 +1,108 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.configuration.model.v151;
+
+
+/**
+ * This class represents an Indexed Attribute.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class IndexedAttribute
+{
+    /** The attribute id */
+    private String attributeId;
+
+    /** The cache size */
+    private int cacheSize;
+
+
+    /**
+     * Creates a new instance of IndexedAttribute.
+     *
+     * @param attributeId
+     *      the attribute id
+     * @param cacheSize
+     *      the cache size
+     */
+    public IndexedAttribute( String attributeId, int cacheSize )
+    {
+        this.attributeId = attributeId;
+        this.cacheSize = cacheSize;
+    }
+
+
+    /**
+     * Gets the attribute id.
+     *
+     * @return
+     *      the attribute id
+     */
+    public String getAttributeId()
+    {
+        return attributeId;
+    }
+
+
+    /**
+     * Sets the attribute id.
+     *
+     * @param attributeId
+     *      the new attribute id
+     */
+    public void setAttributeId( String attributeId )
+    {
+        this.attributeId = attributeId;
+    }
+
+
+    /**
+     * Gets the cache size.
+     *
+     * @return
+     *      the cache size
+     */
+    public int getCacheSize()
+    {
+        return cacheSize;
+    }
+
+
+    /**
+     * Gets the cache size.
+     *
+     * @param cacheSize
+     *      the new cache size
+     */
+    public void setCacheSize( int cacheSize )
+    {
+        this.cacheSize = cacheSize;
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        return attributeId + " [" + cacheSize + "]";
+    }
+}

Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/Interceptor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/Interceptor.java?rev=656336&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/Interceptor.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/Interceptor.java Wed May 14 10:21:46 2008
@@ -0,0 +1,105 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.configuration.model.v151;
+
+
+/**
+ * This class represents an Interceptor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Interceptor
+{
+    /** The name of the interceptor */
+    private String name;
+
+    /** The class of the class of the interceptor */
+    private String classType;
+
+
+    /**
+     * Creates a new instance of Interceptor.
+     *
+     * @param name
+     *      the name of the interceptor
+     */
+    public Interceptor( String name )
+    {
+        this.name = name;
+    }
+
+
+    /**
+     * Gets the name of the interceptor.
+     *
+     * @return
+     *      the name of the interceptor
+     */
+    public String getName()
+    {
+        return this.name;
+    }
+
+
+    /**
+     * Sets the name of the interceptor.
+     *
+     * @param name
+     *      the new name to set
+     */
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+
+    /**
+     * Gets the class type of the interceptor.
+     *
+     * @return
+     *      the class type of the interceptor
+     */
+    public String getClassType()
+    {
+        return classType;
+    }
+
+
+    /**
+     * Sets the class type of the interceptor.
+     *
+     * @param classType
+     *      the new class type to set
+     */
+    public void setClassType( String classType )
+    {
+        this.classType = classType;
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        return name;
+    }
+}

Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/Partition.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/Partition.java?rev=656336&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/Partition.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/Partition.java Wed May 14 10:21:46 2008
@@ -0,0 +1,314 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.configuration.model.v151;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
+
+
+/**
+ * This class represents a Partition.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Partition
+{
+    /** The ID of the partition */
+    private String id;
+
+    /** The cache size of the partition */
+    private int cacheSize;
+
+    /** The suffix of the partition */
+    private String suffix;
+
+    /** The Enable Optimizer flag */
+    private boolean enableOptimizer;
+
+    /** The Synchronization On Write flag */
+    private boolean synchronizationOnWrite;
+
+    /** The Context Entry */
+    private Attributes contextEntry;
+
+    /** The indexed attributes */
+    private List<IndexedAttribute> indexedAttributes;
+
+    /** The System Partition flag */
+    private boolean systemPartition = false;
+
+
+    /**
+     * Creates a new instance of Partition.
+     */
+    public Partition()
+    {
+        indexedAttributes = new ArrayList<IndexedAttribute>();
+        contextEntry = new BasicAttributes( true );
+    }
+
+
+    /**
+     * Creates a new instance of Partition.
+     *
+     * @param id
+     *      the id of the partition
+     */
+    public Partition( String id )
+    {
+        indexedAttributes = new ArrayList<IndexedAttribute>();
+        contextEntry = new BasicAttributes( true );
+        this.id = id;
+    }
+
+
+    /**
+     * Gets the ID of the partition.
+     *
+     * @return
+     *      the ID of the partition
+     */
+    public String getId()
+    {
+        return this.id;
+    }
+
+
+    /**
+     * Sets the ID of the partition.
+     *
+     * @param id
+     *      the new ID to set
+     */
+    public void setId( String id )
+    {
+        this.id = id;
+    }
+
+
+    /**
+     * Gets the cache size.
+     *
+     * @return
+     *      the cache size
+     */
+    public int getCacheSize()
+    {
+        return cacheSize;
+    }
+
+
+    /**
+     * Sets the cache size.
+     *
+     * @param cacheSize
+     *      the new cache size
+     */
+    public void setCacheSize( int cacheSize )
+    {
+        this.cacheSize = cacheSize;
+    }
+
+
+    /**
+     * Gets the Context Entry.
+     *
+     * @return
+     *      the Content Entry
+     */
+    public Attributes getContextEntry()
+    {
+        return contextEntry;
+    }
+
+
+    /**
+     * Sets the Context Entry
+     *
+     * @param contextEntry
+     *      the new Context Entry
+     */
+    public void setContextEntry( Attributes contextEntry )
+    {
+        this.contextEntry = contextEntry;
+    }
+
+
+    /**
+     * Gets the Enable Optimizer flag.
+     *
+     * @return
+     *      the Enable Optimizer flag
+     */
+    public boolean isEnableOptimizer()
+    {
+        return enableOptimizer;
+    }
+
+
+    /**
+     * Sets the Enable Optimizer flag.
+     *
+     * @param enableOptimizer
+     *      the new value for the Enable Optimizer flag
+     */
+    public void setEnableOptimizer( boolean enableOptimizer )
+    {
+        this.enableOptimizer = enableOptimizer;
+    }
+
+
+    /**
+     * Get the Indexed Attributes List.
+     *
+     * @return
+     *      the Indexed Attributes List
+     */
+    public List<IndexedAttribute> getIndexedAttributes()
+    {
+        return indexedAttributes;
+    }
+
+
+    /**
+     * Set the Indexed Attributes List.
+     *
+     * @param indexedAttributes
+     *      the new Indexed Attributes List
+     */
+    public void setIndexedAttributes( List<IndexedAttribute> indexedAttributes )
+    {
+        this.indexedAttributes = indexedAttributes;
+    }
+
+
+    /**
+     * Adds an Indexed Attribute.
+     *
+     * @param indexedAttribute
+     *      the Indexed Attribute to add
+     * @return
+     *      true (as per the general contract of the Collection.add method).
+     */
+    public boolean addIndexedAttribute( IndexedAttribute indexedAttribute )
+    {
+        return indexedAttributes.add( indexedAttribute );
+    }
+
+
+    /**
+     * Removes a Indexed Attribute.
+     *
+     * @param indexedAttribute
+     *      the Indexed Attribute to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeIndexedAttribute( IndexedAttribute indexedAttribute )
+    {
+        return indexedAttributes.remove( indexedAttribute );
+    }
+
+
+    /**
+     * Gets the suffix.
+     *
+     * @return
+     *      the suffix
+     */
+    public String getSuffix()
+    {
+        return suffix;
+    }
+
+
+    /**
+     * Sets the suffix.
+     *
+     * @param suffix
+     *      the new suffix
+     */
+    public void setSuffix( String suffix )
+    {
+        this.suffix = suffix;
+    }
+
+
+    /**
+     * Gets the Synchronization On Write flag.
+     *
+     * @return
+     *      the Synchronization On Write flag
+     */
+    public boolean isSynchronizationOnWrite()
+    {
+        return synchronizationOnWrite;
+    }
+
+
+    /**
+     * Sets the Synchronization On Write flag.
+     *
+     * @param synchronizationOnWrite
+     *      the Synchronization On Write flag
+     */
+    public void setSynchronizationOnWrite( boolean synchronizationOnWrite )
+    {
+        this.synchronizationOnWrite = synchronizationOnWrite;
+    }
+
+
+    /**
+     * Returns the System Partition flag.
+     *
+     * @return
+     *      true if the partition is the System Partition
+     */
+    public boolean isSystemPartition()
+    {
+        return systemPartition;
+    }
+
+
+    /**
+     * Sets the System Partition flag.
+     *
+     * @param systemPartition
+     *      the System Partition flag
+     */
+    public void setSystemPartition( boolean systemPartition )
+    {
+        this.systemPartition = systemPartition;
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        return id;
+    }
+}

Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerConfigurationV151.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerConfigurationV151.java?rev=656336&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerConfigurationV151.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerConfigurationV151.java Wed May 14 10:21:46 2008
@@ -0,0 +1,1108 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.configuration.model.v151;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.studio.apacheds.configuration.model.AbstractServerConfiguration;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationVersionEnum;
+
+
+/**
+ * This class represents a Server Configuration.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerConfigurationV151 extends AbstractServerConfiguration implements ServerConfiguration
+{
+    // LDAP Configuration
+
+    /** The port */
+    private int ldapPort;
+
+    /** The principal */
+    private String principal;
+
+    /** The password */
+    private String password;
+
+    // Limits
+
+    /** The Max Time Limit */
+    private int maxTimeLimit;
+
+    /** the Max Size Limit */
+    private int maxSizeLimit;
+
+    /** The Synchronization Period */
+    private long synchronizationPeriod;
+
+    /** The Maximum number of Threads */
+    private int maxThreads;
+
+    /** The Supported Mechanisms */
+    private List<String> supportedMechanisms;
+
+    // SASL Properties
+
+    /** The SASL Host */
+    private String saslHost;
+
+    /** The SASL Principal */
+    private String saslPrincipal;
+
+    /** The SASL QOP */
+    private List<String> saslQops;
+
+    /** The SASL Realms */
+    private List<String> saslRealms;
+
+    /** The Search Base DN */
+    private String searchBaseDn;
+
+    // Protocols
+
+    /** The flag for Enable Access Control */
+    private boolean enableAccessControl;
+
+    /** The flag for Enable Kerberos */
+    private boolean enableKerberos;
+
+    /** The port for Kerberos */
+    private int kerberosPort;
+
+    /** The flag for Enable NTP */
+    private boolean enableNtp;
+
+    /** The port for NTP */
+    private int ntpPort;
+
+    /** The flag for Enable DNS */
+    private boolean enableDns;
+
+    /** The port for DNS */
+    private int dnsPort;
+
+    /** The flag for Enable LDAPS */
+    private boolean enableLdaps;
+
+    /** The port for LDAPS */
+    private int ldapsPort;
+
+    /** The flag for Enable Change Password */
+    private boolean enableChangePassword;
+
+    /** The port for Change Password */
+    private int changePasswordPort;
+
+    // Options
+
+    /** The flag for Denormalize Operational Attributes */
+    private boolean denormalizeOpAttr;
+
+    /** The flag for Allow Anonymous Access */
+    private boolean allowAnonymousAccess;
+
+    // Other configuration elements
+
+    /** The Binary Attributes */
+    private List<String> binaryAttributes;
+
+    /** The Partitions */
+    private List<Partition> partitions;
+
+    /** The Interceptors */
+    private List<Interceptor> interceptors;
+
+    /** The Extended Operations */
+    private List<ExtendedOperation> extendedOperations;
+
+
+    /**
+     * Creates a new instance of ServerConfiguration.
+     */
+    public ServerConfigurationV151()
+    {
+        super( ServerConfigurationVersionEnum.VERSION_1_5_1 );
+
+        supportedMechanisms = new ArrayList<String>();
+        saslQops = new ArrayList<String>();
+        saslRealms = new ArrayList<String>();
+        partitions = new ArrayList<Partition>();
+        interceptors = new ArrayList<Interceptor>();
+        extendedOperations = new ArrayList<ExtendedOperation>();
+        binaryAttributes = new ArrayList<String>();
+    }
+
+
+    /**
+     * Adds a Binary Attribute.
+     *
+     * @param binaryAttribute
+     *      the Partition to add
+     * @return
+     *      true (as per the general contract of the Collection.add method).
+     */
+    public boolean addBinaryAttribute( String binaryAttribute )
+    {
+        return binaryAttributes.add( binaryAttribute );
+    }
+
+
+    /**
+     * Adds an Extended Operation.
+     *
+     * @param extendedOperation
+     *      the Extended Operation to add
+     * @return
+     *      true (as per the general contract of the Collection.add method).
+     */
+    public boolean addExtendedOperation( ExtendedOperation extendedOperation )
+    {
+        return extendedOperations.add( extendedOperation );
+    }
+
+
+    /**
+     * Adds an Interceptor.
+     *
+     * @param interceptor
+     *      the Interceptor to add
+     * @return
+     *      true (as per the general contract of the Collection.add method).
+     */
+    public boolean addInterceptor( Interceptor interceptor )
+    {
+        return interceptors.add( interceptor );
+    }
+
+
+    /**
+     * Adds a Partition.
+     *
+     * @param partition
+     *      the Partition to add
+     * @return
+     *      true (as per the general contract of the Collection.add method).
+     */
+    public boolean addPartition( Partition partition )
+    {
+        return partitions.add( partition );
+    }
+
+
+    /**
+     * Adds a SASL Quality Of Protection.
+     *
+     * @param saslQop
+     *      the SASL Quality Of Protection to add
+     * @return
+     *      true (as per the general contract of the Collection.add method).
+     */
+    public boolean addSaslQop( String saslQop )
+    {
+        return saslQops.add( saslQop );
+    }
+
+
+    /**
+    * Adds a SASL Realm.
+    *
+    * @param qop
+    *      the SASL Realm to add
+    * @return
+    *      true (as per the general contract of the Collection.add method).
+    */
+    public boolean addSaslRealm( String saslRealm )
+    {
+        return saslRealms.add( saslRealm );
+    }
+
+
+    /**
+     * Adds a Supported Mechanism.
+     *
+     * @param supportedMechanism
+     *      the Supported Mechanism to add
+     * @return
+     *      true (as per the general contract of the Collection.add method).
+     */
+    public boolean addSupportedMechanism( String supportedMechanism )
+    {
+        return supportedMechanisms.add( supportedMechanism );
+    }
+
+
+    /**
+     * Removes all Binary Attributes.
+     */
+    public void clearBinaryAttributes()
+    {
+        binaryAttributes.clear();
+    }
+
+
+    /**
+     * Removes all ExtendedOperations.
+     */
+    public void clearExtendedOperations()
+    {
+        extendedOperations.clear();
+    }
+
+
+    /**
+     * Removes all interceptors.
+     */
+    public void clearInterceptors()
+    {
+        interceptors.clear();
+    }
+
+
+    /**
+     * Removes all partitions.
+     */
+    public void clearPartitions()
+    {
+        partitions.clear();
+    }
+
+
+    /**
+     * Gets the Binary Attributes List.
+     *
+     * @return
+     *      the Binary Attributes  List
+     */
+    public List<String> getBinaryAttributes()
+    {
+        return binaryAttributes;
+    }
+
+
+    /**
+     * Gets the Change Password port.
+     *
+     * @return
+     *      the Change Password port
+     */
+    public int getChangePasswordPort()
+    {
+        return changePasswordPort;
+    }
+
+
+    /**
+     * Gets the DNS port.
+     *
+     * @return
+     *      the DNS port
+     */
+    public int getDnsPort()
+    {
+        return dnsPort;
+    }
+
+
+    /**
+     * Gets the Extended Operations List.
+     *
+     * @return
+     *      the Extended Operations List
+     */
+    public List<ExtendedOperation> getExtendedOperations()
+    {
+        return extendedOperations;
+    }
+
+
+    /**
+     * Gets the Interceptors List.
+     *
+     * @return
+     *      the Interceptors List
+     */
+    public List<Interceptor> getInterceptors()
+    {
+        return interceptors;
+    }
+
+
+    /**
+     * Gets the Kerberos port.
+     *
+     * @return
+     *      the Kerberos port
+     */
+    public int getKerberosPort()
+    {
+        return kerberosPort;
+    }
+
+
+    /**
+     * Gets the LDAPS port.
+     *
+     * @return
+     *      the LDAPS port
+     */
+    public int getLdapsPort()
+    {
+        return ldapsPort;
+    }
+
+
+    /**
+     * Gets the Maximum Size Limit.
+     *
+     * @return
+     *      the Maximum Size Limit
+     */
+    public int getMaxSizeLimit()
+    {
+        return maxSizeLimit;
+    }
+
+
+    /**
+     * Gets the Maximum number of Threads.
+     *
+     * @return
+     *      the Maximum number of Threads
+     */
+    public int getMaxThreads()
+    {
+        return maxThreads;
+    }
+
+
+    /**
+     * Gets the Maximum Time Limit.
+     *
+     * @return
+     *      the Maximum Time Limit
+     */
+    public int getMaxTimeLimit()
+    {
+        return maxTimeLimit;
+    }
+
+
+    /**
+     * Gets the NTP port.
+     *
+     * @return
+     *      the NTP port
+     */
+    public int getNtpPort()
+    {
+        return ntpPort;
+    }
+
+
+    /**
+     * Gets the Partitions List.
+     *
+     * @return
+     *      the Partitions List
+     */
+    public List<Partition> getPartitions()
+    {
+        return partitions;
+    }
+
+
+    /**
+     * Gets the password.
+     *
+     * @return
+     *      the password
+     */
+    public String getPassword()
+    {
+        return password;
+    }
+
+
+    /**
+     * Gets the LDAP Port.
+     *
+     * @return
+     *      the LDAP Port
+     */
+    public int getLdapPort()
+    {
+        return ldapPort;
+    }
+
+
+    /**
+     * Gets the Principal
+     *
+     * @return
+     *      the Principal
+     */
+    public String getPrincipal()
+    {
+        return principal;
+    }
+
+
+    /**
+     * Gets the SASL Host.
+     *
+     * @return
+     *       the SASL Host
+     */
+    public String getSaslHost()
+    {
+        return saslHost;
+    }
+
+
+    /**
+     * Gets the SASL Principal.
+     *
+     * @return
+     *      the SASL Principal
+     */
+    public String getSaslPrincipal()
+    {
+        return saslPrincipal;
+    }
+
+
+    /**
+     * Gets the SASL Quality Of Protection List
+     *
+     * @return
+     *      the SASL Quality Of Protection List
+     */
+    public List<String> getSaslQops()
+    {
+        return saslQops;
+    }
+
+
+    /**
+     * Gets the SASL Realms List.
+     *
+     * @return
+     *      the SASL Realms List
+     */
+    public List<String> getSaslRealms()
+    {
+        return saslRealms;
+    }
+
+
+    /**
+     * Gets the Search Base DN.
+     *
+     * @return
+     *      the Search Base DN
+     */
+    public String getSearchBaseDn()
+    {
+        return searchBaseDn;
+    }
+
+
+    /**
+     * Gets the Supported Mechanisms List.
+     * 
+     * @return
+     *      the Supported Mechanisms List
+     */
+    public List<String> getSupportedMechanisms()
+    {
+        return supportedMechanisms;
+    }
+
+
+    /**
+     * Gets the Synchronization Period.
+     *
+     * @return
+     *      the Synchronization Period
+     */
+    public long getSynchronizationPeriod()
+    {
+        return synchronizationPeriod;
+    }
+
+
+    /**
+     * Gets the Allow Anonymous flag.
+     *
+     * @return
+     *      true if the server configuration allows Anonymous Access
+     */
+    public boolean isAllowAnonymousAccess()
+    {
+        return allowAnonymousAccess;
+    }
+
+
+    /**
+     * Gets the Denormalize Operational Attributes flag.
+     *
+     * @return
+     *      the Denormalize Operational Attributes flag
+     */
+    public boolean isDenormalizeOpAttr()
+    {
+        return denormalizeOpAttr;
+    }
+
+
+    /**
+     * Gets the Enable Access Control flag.
+     *
+     * @return
+     *      true if Access Control is enabled
+     */
+    public boolean isEnableAccessControl()
+    {
+        return enableAccessControl;
+    }
+
+
+    /**
+     * Gets the Enable Change Password flag.
+     *
+     * @return
+     *      true if Change Password is enabled
+     */
+    public boolean isEnableChangePassword()
+    {
+        return enableChangePassword;
+    }
+
+
+    /**
+     * Gets the Enable DNS flag.
+     *
+     * @return
+     *      true if DNS is enabled
+     */
+    public boolean isEnableDns()
+    {
+        return enableDns;
+    }
+
+
+    /**
+     * Gets the Enable Kerberos flag.
+     *
+     * @return
+     *      true if Kerberos is enabled
+     */
+    public boolean isEnableKerberos()
+    {
+        return enableKerberos;
+    }
+
+
+    /**
+     * Gets the Enable LDAPS flag.
+     *
+     * @return
+     *      true if LDAPS is enabled
+     */
+    public boolean isEnableLdaps()
+    {
+        return enableLdaps;
+    }
+
+
+    /**
+     * Gets the Enable NTP flag.
+     *
+     * @return
+     *      true if NTP is enabled
+     */
+    public boolean isEnableNtp()
+    {
+        return enableNtp;
+    }
+
+
+    /**
+     * Removes a Binary Attribute.
+     *
+     * @param binaryAttribute
+     *      the Binary Attribute to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeBinaryAttribute( String binaryAttribute )
+    {
+        return binaryAttributes.remove( binaryAttribute );
+    }
+
+
+    /**
+     * Removes an Extended Operation.
+     *
+     * @param extendedOperation
+     *      the Extended Operation to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeExtendedOperation( ExtendedOperation extendedOperation )
+    {
+        return extendedOperations.remove( extendedOperation );
+    }
+
+
+    /**
+     * Removes an Supported Mechanism.
+     *
+     * @param supportedMechanism
+     *      the Supported Mechanism to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeExtendedOperation( String supportedMechanism )
+    {
+        return supportedMechanisms.remove( supportedMechanism );
+    }
+
+
+    /**
+     * Removes an Interceptor.
+     *
+     * @param interceptor
+     *      the Interceptor to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeInterceptor( Interceptor interceptor )
+    {
+        return interceptors.remove( interceptor );
+    }
+
+
+    /**
+     * Removes a Partition.
+     *
+     * @param partition
+     *      the partition to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removePartition( Partition partition )
+    {
+        return partitions.remove( partition );
+    }
+
+
+    /**
+     * Removes a SASL Quality Of Protection.
+     *
+     * @param saslQop
+     *      the SASL Quality Of Protection to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeSaslQop( String saslQop )
+    {
+        return saslQops.remove( saslQop );
+    }
+
+
+    /**
+     * Removes a SASL Realm.
+     *
+     * @param saslRealm
+     *      the SASL Realm to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeSaslRealm( String saslRealm )
+    {
+        return saslRealms.remove( saslRealm );
+    }
+
+
+    /**
+     * Sets the Allow Anonymous flag.
+     *
+     * @param allowAnonymousAccess
+     *      the new value
+     */
+    public void setAllowAnonymousAccess( boolean allowAnonymousAccess )
+    {
+        this.allowAnonymousAccess = allowAnonymousAccess;
+    }
+
+
+    /**
+     * Sets the Binary Attributes  List.
+     *
+     * @param binaryAttributes
+     *      the new value
+     */
+    public void setBinaryAttributes( List<String> binaryAttributes )
+    {
+        this.binaryAttributes = binaryAttributes;
+    }
+
+
+    /**
+     * Sets the Change Password port.
+     *
+     * @param changePasswordPort
+     *      the Change Password port
+     */
+    public void setChangePasswordPort( int changePasswordPort )
+    {
+        this.changePasswordPort = changePasswordPort;
+    }
+
+
+    /**
+     * Sets the Denormalize Operational Attributes flag.
+     *
+     * @param denormalizeOpAttr
+     *      the new Denormalize Operational Attributes flag
+     */
+    public void setDenormalizeOpAttr( boolean denormalizeOpAttr )
+    {
+        this.denormalizeOpAttr = denormalizeOpAttr;
+    }
+
+
+    /**
+     * Sets the DNS port.
+     *
+     * @param dnsPort
+     *      the DNS port
+     */
+    public void setDnsPort( int dnsPort )
+    {
+        this.dnsPort = dnsPort;
+    }
+
+
+    /**
+     * Sets the Enable Access Control flag.
+     *
+     * @param enableAccessControl
+     *      the new value
+     */
+    public void setEnableAccessControl( boolean enableAccessControl )
+    {
+        this.enableAccessControl = enableAccessControl;
+    }
+
+
+    /**
+     * Sets the Enable Change Password flag.
+     *
+     * @param enableChangePassword
+     *      the new value
+     */
+    public void setEnableChangePassword( boolean enableChangePassword )
+    {
+        this.enableChangePassword = enableChangePassword;
+    }
+
+
+    /**
+     * Sets Enable DNS flag.
+     *
+     * @param enableDns
+     *      the new value
+     */
+    public void setEnableDns( boolean enableDns )
+    {
+        this.enableDns = enableDns;
+    }
+
+
+    /**
+     * Sets the Enable Kerberos flag.
+     *
+     * @param enableKerberos
+     *      the new value
+     */
+    public void setEnableKerberos( boolean enableKerberos )
+    {
+        this.enableKerberos = enableKerberos;
+    }
+
+
+    /**
+     * Sets the Enable LDAPS flag.
+     *
+     * @param enableLdaps
+     *      the new value
+     */
+    public void setEnableLdaps( boolean enableLdaps )
+    {
+        this.enableLdaps = enableLdaps;
+    }
+
+
+    /**
+     * Sets the Enable NTP flag.
+     *
+     * @param enableNtp
+     *      the new value
+     */
+    public void setEnableNtp( boolean enableNtp )
+    {
+        this.enableNtp = enableNtp;
+    }
+
+
+    /**
+     * Sets the Extended Operations List.
+     *
+     * @param extendedOperations
+     *      the new value
+     */
+    public void setExtendedOperations( List<ExtendedOperation> extendedOperations )
+    {
+        this.extendedOperations = extendedOperations;
+    }
+
+
+    /**
+     * Sets the Interceptors List.
+     *
+     * @param interceptors
+     *      the new value
+     */
+    public void setInterceptors( List<Interceptor> interceptors )
+    {
+        this.interceptors = interceptors;
+    }
+
+
+    /**
+     * Sets the Kerberos port.
+     *
+     * @param kerberosPort
+     *      the new value
+     */
+    public void setKerberosPort( int kerberosPort )
+    {
+        this.kerberosPort = kerberosPort;
+    }
+
+
+    /**
+     * Sets The LDAPS port.
+     *
+     * @param ldapsPort
+     */
+    public void setLdapsPort( int ldapsPort )
+    {
+        this.ldapsPort = ldapsPort;
+    }
+
+
+    /**
+     * Sets the Maximum Size Limit.
+     *
+     * @param maxSizeLimit
+     *      the new value
+     */
+    public void setMaxSizeLimit( int maxSizeLimit )
+    {
+        this.maxSizeLimit = maxSizeLimit;
+    }
+
+
+    /**
+     * Sets the Maximum number of Threads
+     *
+     * @param maxThreads
+     *      the new value
+     */
+    public void setMaxThreads( int maxThreads )
+    {
+        this.maxThreads = maxThreads;
+    }
+
+
+    /**
+     * Sets the Maximum Time Limit.
+     *
+     * @param maxTimeLimit
+     *      the new value
+     */
+    public void setMaxTimeLimit( int maxTimeLimit )
+    {
+        this.maxTimeLimit = maxTimeLimit;
+    }
+
+
+    /**
+     * Sets the NTP port.
+     *
+     * @param ntpPort
+     *      the new value
+     */
+    public void setNtpPort( int ntpPort )
+    {
+        this.ntpPort = ntpPort;
+    }
+
+
+    /**
+     * Sets the Partitions List.
+     *
+     * @param partitions
+     *      the new value
+     */
+    public void setPartitions( List<Partition> partitions )
+    {
+        this.partitions = partitions;
+    }
+
+
+    /**
+     * Sets the password.
+     *
+     * @param password
+     *      the new password
+     */
+    public void setPassword( String password )
+    {
+        this.password = password;
+    }
+
+
+    /**
+     * Sets the LDAP Port
+     *
+     * @param ldapPort
+     *      the new value
+     */
+    public void setLdapPort( int ldapPort )
+    {
+        this.ldapPort = ldapPort;
+    }
+
+
+    /**
+     * Sets the Principal
+     *
+     * @param principal
+     *      the new value
+     */
+    public void setPrincipal( String principal )
+    {
+        this.principal = principal;
+    }
+
+
+    /**
+     * Sets the SASL Host.
+     *
+     * @param saslHost
+     *      the new value
+     */
+    public void setSaslHost( String saslHost )
+    {
+        this.saslHost = saslHost;
+    }
+
+
+    /**
+     * Sets the SASL Principal.
+     *
+     * @param saslPrincipal
+     *      the new value
+     */
+    public void setSaslPrincipal( String saslPrincipal )
+    {
+        this.saslPrincipal = saslPrincipal;
+    }
+
+
+    /**
+     * Sets the SASL Quality Of Protection List.
+     *
+     * @param saslQops
+     *      the new value
+     */
+    public void setSaslQops( List<String> saslQops )
+    {
+        this.saslQops = saslQops;
+    }
+
+
+    /**
+     * Sets the SASL Realms List.
+     * 
+     * @param saslRealms
+     *      the new value
+     */
+    public void setSaslRealms( List<String> saslRealms )
+    {
+        this.saslRealms = saslRealms;
+    }
+
+
+    /**
+     * Sets the Search Base DN
+     *
+     * @param searchBaseDn
+     *      the new value
+     */
+    public void setSearchBaseDn( String searchBaseDn )
+    {
+        this.searchBaseDn = searchBaseDn;
+    }
+
+
+    /**
+     * Sets the Supported Mechanisms List.
+     *
+     * @param supportedMechanisms
+     *      the new value
+     */
+    public void setSupportedMechanisms( List<String> supportedMechanisms )
+    {
+        this.supportedMechanisms = supportedMechanisms;
+    }
+
+
+    /**
+     * Sets the Synchonization Period.
+     *
+     * @param synchronizationPeriod
+     *      the new value
+     */
+    public void setSynchronizationPeriod( long synchronizationPeriod )
+    {
+        this.synchronizationPeriod = synchronizationPeriod;
+    }
+}