directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1043047 [1/2] - in /directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config: ./ beans/
Date Tue, 07 Dec 2010 13:55:01 GMT
Author: pamarcelot
Date: Tue Dec  7 13:55:00 2010
New Revision: 1043047

URL: http://svn.apache.org/viewvc?rev=1043047&view=rev
Log:
Moved to another unique annotation.
Updated the writer accordingly.

Removed:
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/AttributeType.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/Container.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/RDN.java
Modified:
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ChangeLogBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ChangePasswordServerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DSBasedServerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DhcpServerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DnsServerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ExtendedOpHandlerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/HttpServerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/HttpWebAppBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/InterceptorBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmIndexBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmPartitionBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JournalBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/KdcServerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/NtpServerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/PartitionBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/PasswordPolicyBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ReplConsumerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ReplProviderBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/SaslMechHandlerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ServerBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/TcpTransportBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/TransportBean.java
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/UdpTransportBean.java

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java Tue Dec  7 13:55:00 2010
@@ -20,21 +20,21 @@
 package org.apache.directory.server.config;
 
 
-import java.lang.annotation.Annotation;
 import java.lang.reflect.Field;
-import java.lang.reflect.Member;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
 import org.apache.directory.server.config.beans.AdsBaseBean;
 import org.apache.directory.server.config.beans.ConfigBean;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 
 
@@ -48,150 +48,210 @@ public class ConfigWriter
     public static void writeConfiguration( SchemaManager schemaManager, ConfigBean configBean, String file )
         throws Exception
     {
-        // The default configuration location is 'ou=config'
-        DN dn = new DN( "ou=config" );
-
+        // Creating a list to store the created entries
         List<LdifEntry> entries = new ArrayList<LdifEntry>();
 
+        // Building the default config root entry 'ou=config'
+        LdifEntry configRootEntry = new LdifEntry();
+        configRootEntry.setDn( new DN( SchemaConstants.OU_AT + "=" + "config" ) );
+        addObjectClassAttribute( schemaManager, configRootEntry, "organizationalUnit" );
+        addAttributeTypeValues( SchemaConstants.OU_AT, "config", configRootEntry );
+        entries.add( configRootEntry );
+
+        // Building entries from the directory service beans
         List<AdsBaseBean> directoryServiceBeans = configBean.getDirectoryServiceBeans();
         for ( AdsBaseBean adsBaseBean : directoryServiceBeans )
         {
-            addBean( dn, schemaManager, adsBaseBean, entries );
+            addBean( configRootEntry.getDn(), schemaManager, adsBaseBean, entries );
         }
 
         System.out.println( entries );
+        System.out.println( entries.size() );
     }
 
 
-    private static void addBean( DN rootDn, SchemaManager schemaManager, AdsBaseBean bean, List<LdifEntry> entries )
-        throws Exception
+    private static void addObjectClassAttribute( SchemaManager schemaManager, LdifEntry entry, String objectClass )
+        throws LdapException
     {
-        // Creating the entry to hold the bean and adding it to the list
-        LdifEntry entry = new LdifEntry();
-        entries.add( entry );
-        entry.setDn( getDn( rootDn, bean ) );
+        ObjectClass objectClassObject = schemaManager.getObjectClassRegistry().lookup( objectClass );
+        if ( objectClassObject != null )
+        {
+            // Building the list of 'objectClass' attribute values
+            List<String> objectClassAttributeValues = new ArrayList<String>();
+            computeObjectClassAttributeValues( schemaManager, objectClassAttributeValues, objectClassObject );
 
-        // Getting the class of the bean
-        Class<?> beanClass = bean.getClass();
+            // Adding values to the entry
+            addAttributeTypeValues( SchemaConstants.OBJECT_CLASS_AT, objectClassAttributeValues, entry );
+        }
+        else
+        {
+            // TODO: throw an exception 
+        }
+    }
 
-        // A flag to know when we reached the 'AdsBaseBean' class when 
-        // looping on the class hierarchy of the bean
-        boolean adsBaseBeanClassFound = false;
 
-        // Looping until the 'AdsBaseBean' class has been found
-        while ( !adsBaseBeanClassFound )
+    private static void computeObjectClassAttributeValues( SchemaManager schemaManager,
+        List<String> objectClassAttributeValues,
+        ObjectClass objectClass ) throws LdapException
+    {
+        ObjectClass topObjectClass = schemaManager.getObjectClassRegistry().lookup( SchemaConstants.TOP_OC );
+        if ( topObjectClass != null )
         {
-            // Checking if we reached the 'AdsBaseBean' class
-            if ( beanClass == AdsBaseBean.class )
+            // TODO throw new exception (there should be a top object class 
+        }
+
+        if ( topObjectClass.equals( objectClass ) )
+        {
+            objectClassAttributeValues.add( objectClass.getName() );
+        }
+        else
+        {
+            objectClassAttributeValues.add( objectClass.getName() );
+
+            List<ObjectClass> superiors = objectClass.getSuperiors();
+            if ( ( superiors != null ) && ( superiors.size() > 0 ) )
             {
-                adsBaseBeanClassFound = true;
+                for ( ObjectClass superior : superiors )
+                {
+                    computeObjectClassAttributeValues( schemaManager, objectClassAttributeValues, superior );
+                }
             }
-
-            // Looping on all fields of the bean
-            Field[] fields = beanClass.getDeclaredFields();
-            for ( Field field : fields )
+            else
             {
-                // Making the field accessible (we get an exception if we don't do that)
-                field.setAccessible( true );
+                objectClassAttributeValues.add( topObjectClass.getName() );
+            }
+        }
+    }
 
-                // Getting the class of the field
-                Class<?> fieldClass = field.getType();
 
-                // Looking for the @AttributeType annotation
-                AttributeType attributeTypeAnnotation = field.getAnnotation( AttributeType.class );
-                if ( attributeTypeAnnotation != null )
+    private static void addBean( DN rootDn, SchemaManager schemaManager, AdsBaseBean bean, List<LdifEntry> entries )
+        throws Exception
+    {
+        if ( bean != null )
+        {
+            // Getting the class of the bean
+            Class<?> beanClass = bean.getClass();
+
+            // Creating the entry to hold the bean and adding it to the list
+            LdifEntry entry = new LdifEntry();
+            entry.setDn( getDn( rootDn, bean ) );
+            addObjectClassAttribute( schemaManager, entry, getObjectClassNameForBean( beanClass ) );
+            entries.add( entry );
+
+            // A flag to know when we reached the 'AdsBaseBean' class when 
+            // looping on the class hierarchy of the bean
+            boolean adsBaseBeanClassFound = false;
+
+            // Looping until the 'AdsBaseBean' class has been found
+            while ( !adsBaseBeanClassFound )
+            {
+                // Checking if we reached the 'AdsBaseBean' class
+                if ( beanClass == AdsBaseBean.class )
                 {
-                    System.out.println( fieldClass.getName() + " " + attributeTypeAnnotation.value() + " "
-                        + field.get( bean ) );
-                    addPrimaryTypeFieldValue( attributeTypeAnnotation.value(), field.get( bean ), entry );
-                    continue;
+                    adsBaseBeanClassFound = true;
                 }
 
-                // Looking for the @Container annotation
-                Container containerAnnotation = field.getAnnotation( Container.class );
-                if ( containerAnnotation != null )
+                // Looping on all fields of the bean
+                Field[] fields = beanClass.getDeclaredFields();
+                for ( Field field : fields )
                 {
-                    DN containerDN = entry.getDn().add(
-                        new org.apache.directory.shared.ldap.name.RDN( containerAnnotation.value() ) );
+                    // Making the field accessible (we get an exception if we don't do that)
+                    field.setAccessible( true );
 
-                    if ( Collection.class.isAssignableFrom( fieldClass ) )
+                    // Getting the class of the field
+                    Class<?> fieldClass = field.getType();
+                    Object fieldValue = field.get( bean );
+
+                    // Looking for the @ConfigurationElement annotation
+                    ConfigurationElement configurationElement = field.getAnnotation( ConfigurationElement.class );
+                    if ( configurationElement != null )
                     {
-                        // Looping on the Collection's objects
-                        Collection<Object> collection = ( Collection<Object> ) field.get( bean );
-                        for ( Object object : collection )
+                        // Checking if we're dealing with an attribute type
+                        String attributeType = configurationElement.attributeType();
+                        if ( ( attributeType != null ) && ( !"".equals( attributeType ) ) )
                         {
-                            if ( object instanceof AdsBaseBean )
+                            addAttributeTypeValues( configurationElement.attributeType(), fieldValue, entry );
+                            continue;
+                        }
+
+                        // Checking if we're dealing with a container
+                        String container = configurationElement.container();
+                        if ( ( container != null ) && ( !"".equals( container ) ) )
+                        {
+                            DN containerDN = entry.getDn().add( container );
+
+                            if ( Collection.class.isAssignableFrom( fieldClass ) )
                             {
-                                addBean( containerDN, schemaManager, ( AdsBaseBean ) object, entries );
+                                // Looping on the Collection's objects
+                                Collection<Object> collection = ( Collection<Object> ) fieldValue;
+                                for ( Object object : collection )
+                                {
+                                    if ( object instanceof AdsBaseBean )
+                                    {
+                                        addBean( containerDN, schemaManager, ( AdsBaseBean ) object, entries );
+                                        continue;
+                                    }
+                                    else
+                                    {
+                                        // TODO throw an error, if we have a container, the type must be a subtype of AdsBaseBean
+                                    }
+                                }
                             }
                             else
                             {
-                                AttributeType attributeType = field.getAnnotation( AttributeType.class );
-                                if ( attributeType != null )
-                                {
-                                    System.out.println( fieldClass.getName() + " " + attributeType.value() + " "
-                                                            + field.get( bean ) );
-                                    addPrimaryTypeFieldValue( attributeType.value(), object, entry );
-                                }
+                                // TODO throw an error, if we have a container, the type must be a subtype of Collection
                             }
                         }
-                    }
-                    else
-                    {
-                        // TODO throw an error, if we have a container, the type must be a subtype of Collection
-                    }
 
+                        // Checking if we're dealing with a AdsBaseBean subclass type
+                        if ( AdsBaseBean.class.isAssignableFrom( fieldClass ) )
+                        {
+                            addBean( entry.getDn(), schemaManager, ( AdsBaseBean ) fieldValue, entries );
+                            continue;
+                        }
+                    }
                 }
 
-                //                // Is the field a Collection object
-                //                if ( Collection.class.isAssignableFrom( fieldClass ) )
-                //                {
-                //                    // Looping on the Collection's objects
-                //                    Collection<Object> collection = ( Collection<Object> ) field.get( bean );
-                //                    for ( Object object : collection )
-                //                    {
-                //                        if ( object instanceof AdsBaseBean )
-                //                        {
-                //                            addBean( entry.getDn(), schemaManager, ( AdsBaseBean ) object, entries );
-                //                        }
-                //                        else
-                //                        {
-                //                            AttributeType attributeType = field.getAnnotation( AttributeType.class );
-                //                            if ( attributeType != null )
-                //                            {
-                //                                System.out.println( fieldClass.getName() + " " + attributeType.value() + " "
-                //                                    + field.get( bean ) );
-                //                                addPrimaryTypeFieldValue( attributeType.value(), object, entry );
-                //                            }
-                //                        }
-                //                    }
-                //                }
-                //                else if ( AdsBaseBean.class.isAssignableFrom( fieldClass ) )
-                //                {
-                //                    AdsBaseBean newBean = ( AdsBaseBean ) field.get( bean );
-                //                    if ( newBean != null )
-                //                    {
-                //                        addBean( entry.getDn(), schemaManager, newBean, entries );
-                //                    }
-                //                }
-                //                else
-                //                {
-                //                    AttributeType attributeType = field.getAnnotation( AttributeType.class );
-                //                    if ( attributeType != null )
-                //                    {
-                //                        System.out.println( fieldClass.getName() + " " + attributeType.value() + " "
-                //                            + field.get( bean ) );
-                //                        String attributeTypeId = attributeType.value();
-                //
-                //                        addPrimaryTypeFieldValue( attributeTypeId, field.get( bean ), entry );
-                //
-                //                    }
-                //                }
+                // Moving to the upper class in the class hierarchy
+                beanClass = beanClass.getSuperclass();
             }
+        }
+    }
 
-            // Moving to the upper class in the class hierarchy
-            beanClass = beanClass.getSuperclass();
+
+    private static String getObjectClassNameForBean( Class<?> c )
+    {
+        String classNameWithPackage = getClassNameWithoutPackage( c );
+        return "ads-" + classNameWithPackage.substring( 0, classNameWithPackage.length() - 4 );
+    }
+
+
+    private static String getClassNameWithoutPackage( Class<?> c )
+    {
+        String className = c.getName();
+
+        int firstChar = className.lastIndexOf( '.' ) + 1;
+        if ( firstChar > 0 )
+        {
+            return className.substring( firstChar );
         }
+
+        return className;
+    }
+
+
+    /**
+     * Indicates the given type is multiple.
+     *
+     * @param clazz
+     *      the class
+     * @return
+     *      <code>true</code> if the given is multiple,
+     *      <code>false</code> if not.
+     */
+    private static boolean isMultiple( Class<?> clazz )
+    {
+        return Collection.class.isAssignableFrom( clazz );
     }
 
 
@@ -234,20 +294,13 @@ public class ConfigWriter
                 // Making the field accessible (we get an exception if we don't do that)
                 field.setAccessible( true );
 
-                // Looking for the AttributeType annotation 
-                AttributeType attributeTypeAnnotation = field.getAnnotation( AttributeType.class );
-                if ( attributeTypeAnnotation != null )
+                // Looking for the @ConfigurationElement annotation and
+                // if the field is the RDN
+                ConfigurationElement configurationElement = field.getAnnotation( ConfigurationElement.class );
+                if ( ( configurationElement != null ) && ( configurationElement.isRDN() ) )
                 {
-                    String attributeTypeId = attributeTypeAnnotation.value();
-
-                    // Looking for the RDN annotation         
-                    RDN rdnAnnotation = field.getAnnotation( RDN.class );
-                    if ( rdnAnnotation != null )
-                    {
-                        // Getting the value from the entry
-                        return baseDN.add( new org.apache.directory.shared.ldap.name.RDN(
-                            attributeTypeId, field.get( bean ).toString() ) );
-                    }
+                    return baseDN.add( new org.apache.directory.shared.ldap.name.RDN(
+                        configurationElement.attributeType(), field.get( bean ).toString() ) );
                 }
             }
 
@@ -260,7 +313,7 @@ public class ConfigWriter
 
 
     /**
-     * Adds a primary type (String, int, long, boolean, byte[] ) field value to the given entry.
+     * Adds values for an attribute type to the given entry.
      *
      * @param attributeType
      *      the attribute type
@@ -270,11 +323,11 @@ public class ConfigWriter
      *      the entry
      * @throws LdapException
      */
-    private static void addPrimaryTypeFieldValue( String attributeType, Object value, LdifEntry entry )
+    private static void addAttributeTypeValues( String attributeType, Object o, LdifEntry entry )
         throws LdapException
     {
         // We don't store a 'null' value
-        if ( value != null )
+        if ( o != null )
         {
             // Getting the attribute from the entry
             EntryAttribute attribute = entry.get( attributeType );
@@ -286,6 +339,42 @@ public class ConfigWriter
                 entry.addAttribute( attribute );
             }
 
+            // Is the value multiple?
+            if ( isMultiple( o.getClass() ) )
+            {
+                // Adding each single value separately
+                Collection<?> values = ( Collection<?> ) o;
+                if ( values != null )
+                {
+                    for ( Object value : values )
+                    {
+                        addAttributeTypeValue( attribute, value );
+                    }
+                }
+            }
+            else
+            {
+                // Adding the single value
+                addAttributeTypeValue( attribute, o );
+            }
+        }
+    }
+
+
+    /**
+     * Adds a value, either byte[] or another type (converted into a String 
+     * via the Object.toString() method), to the attribute.
+     *
+     * @param attribute
+     *      the attribute
+     * @param value
+     *      the value
+     */
+    private static void addAttributeTypeValue( EntryAttribute attribute, Object value )
+    {
+        // We don't store a 'null' value
+        if ( value != null )
+        {
             // Storing the value to the attribute
             if ( value instanceof byte[] )
             {

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java Tue Dec  7 13:55:00 2010
@@ -20,7 +20,6 @@
 package org.apache.directory.server.config.beans;
 
 
-import org.apache.directory.server.config.AttributeType;
 import org.apache.directory.server.config.ConfigurationElement;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -34,11 +33,11 @@ import org.apache.directory.shared.ldap.
 public abstract class AdsBaseBean
 {
     /** The enabled flag */
-    @AttributeType("ads-enabled")
+    @ConfigurationElement(attributeType = "ads-enabled")
     private boolean enabled = false;
 
     /** The description */
-    @AttributeType("description")
+    @ConfigurationElement(attributeType = "description")
     private String description;
 
 

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ChangeLogBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ChangeLogBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ChangeLogBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ChangeLogBean.java Tue Dec  7 13:55:00 2010
@@ -19,8 +19,8 @@
  */
 package org.apache.directory.server.config.beans;
 
-import org.apache.directory.server.config.AttributeType;
-import org.apache.directory.server.config.RDN;
+
+import org.apache.directory.server.config.ConfigurationElement;
 
 
 /**
@@ -31,14 +31,14 @@ import org.apache.directory.server.confi
 public class ChangeLogBean extends AdsBaseBean
 {
     /** The ChangeLog unique ID */
-    @AttributeType("ads-changeLogId")
-    @RDN
+    @ConfigurationElement(attributeType = "ads-changeLogId", isRDN = true)
     private String changeLogId;
 
     /** Tells if the ChangeLog is exposed to the users */
-    @AttributeType("ads-changeLogExposed")
+    @ConfigurationElement(attributeType = "ads-changeLogExposed")
     private boolean changeLogExposed;
 
+
     /**
      * Create a new ChangeLogBean instance
      */
@@ -46,7 +46,7 @@ public class ChangeLogBean extends AdsBa
     {
         // Not exposed by default
         changeLogExposed = false;
-        
+
         // Not enabled by default
         setEnabled( false );
     }
@@ -68,41 +68,41 @@ public class ChangeLogBean extends AdsBa
     {
         this.changeLogId = changeLogId;
     }
-    
-    
+
+
     /**
      * @return <code>true</code> if the ChangeLog is exposed
      */
-    public boolean isChangeLogExposed() 
+    public boolean isChangeLogExposed()
     {
         return changeLogExposed;
     }
 
-    
+
     /**
      * @param exposed Set the exposed flag
      */
-    public void setChangeLogExposed( boolean changeLogExposed ) 
+    public void setChangeLogExposed( boolean changeLogExposed )
     {
         this.changeLogExposed = changeLogExposed;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "ChangeLog :\n" );
         sb.append( tabs ).append( "  changeLog id : " ).append( changeLogId ).append( '\n' );
         sb.append( toString( tabs, "  changeLog exposed", changeLogExposed ) );
-        
+
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ChangePasswordServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ChangePasswordServerBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ChangePasswordServerBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ChangePasswordServerBean.java Tue Dec  7 13:55:00 2010
@@ -19,10 +19,11 @@
  */
 package org.apache.directory.server.config.beans;
 
+
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.server.config.AttributeType;
+import org.apache.directory.server.config.ConfigurationElement;
 
 
 /**
@@ -33,37 +34,38 @@ import org.apache.directory.server.confi
 public class ChangePasswordServerBean extends DSBasedServerBean
 {
     /** The allowable clock skew. */
-    @AttributeType("ads-krbAllowableClockSkew")
+    @ConfigurationElement(attributeType = "ads-krbAllowableClockSkew")
     private long krbAllowableClockSkew;
-    
+
     /** Whether empty addresses are allowed. */
-    @AttributeType("ads-krbEmptyAddressesAllowed")
+    @ConfigurationElement(attributeType = "ads-krbEmptyAddressesAllowed")
     private boolean krbEmptyAddressesAllowed;
-    
+
     /** The encryption types. */
-    @AttributeType("ads-krbEncryptionTypes")
+    @ConfigurationElement(attributeType = "ads-krbEncryptionTypes")
     private List<String> krbEncryptionTypes = new ArrayList<String>();
-    
+
     /** The primary realm. */
-    @AttributeType("ads-krbPrimaryRealm")
+    @ConfigurationElement(attributeType = "ads-krbPrimaryRealm")
     private String krbPrimaryRealm;
-    
+
     /** The policy for category count. */
-    @AttributeType("ads-chgPwdPolicyCategoryCount")
+    @ConfigurationElement(attributeType = "ads-chgPwdPolicyCategoryCount")
     private int chgPwdPolicyCategoryCount;
-    
+
     /** The policy for password length. */
-    @AttributeType("ads-chgPwdPolicyPasswordLength")
+    @ConfigurationElement(attributeType = "ads-chgPwdPolicyPasswordLength")
     private int chgPwdPolicyPasswordLength;
-    
+
     /** The policy for token size. */
-    @AttributeType("ads-chgPwdPolicyTokenSize")
+    @ConfigurationElement(attributeType = "ads-chgPwdPolicyTokenSize")
     private int chgPwdPolicyTokenSize;
-    
+
     /** The service principal name. */
-    @AttributeType("ads-chgPwdServicePrincipal")
+    @ConfigurationElement(attributeType = "ads-chgPwdServicePrincipal")
     private String chgPwdServicePrincipal;
 
+
     /**
      * Create a new ChangePasswordServer instance
      */
@@ -72,6 +74,7 @@ public class ChangePasswordServerBean ex
         super();
     }
 
+
     /**
      * @return the krbAllowableClockSkew
      */
@@ -80,7 +83,7 @@ public class ChangePasswordServerBean ex
         return krbAllowableClockSkew;
     }
 
-    
+
     /**
      * @param krbAllowableClockSkew the krbAllowableClockSkew to set
      */
@@ -89,7 +92,7 @@ public class ChangePasswordServerBean ex
         this.krbAllowableClockSkew = krbAllowableClockSkew;
     }
 
-    
+
     /**
      * @return the krbEmptyAddressesAllowed
      */
@@ -98,7 +101,7 @@ public class ChangePasswordServerBean ex
         return krbEmptyAddressesAllowed;
     }
 
-    
+
     /**
      * @param krbEmptyAddressesAllowed the krbEmptyAddressesAllowed to set
      */
@@ -107,7 +110,7 @@ public class ChangePasswordServerBean ex
         this.krbEmptyAddressesAllowed = krbEmptyAddressesAllowed;
     }
 
-    
+
     /**
      * @return the krbEncryptionTypes
      */
@@ -116,7 +119,7 @@ public class ChangePasswordServerBean ex
         return krbEncryptionTypes;
     }
 
-    
+
     /**
      * @param krbEncryptionTypes the krbEncryptionTypes to set
      */
@@ -125,7 +128,7 @@ public class ChangePasswordServerBean ex
         this.krbEncryptionTypes = krbEncryptionTypes;
     }
 
-    
+
     /**
      * Initialize the encryptionTypes set
      * 
@@ -133,7 +136,7 @@ public class ChangePasswordServerBean ex
      */
     public void addKrbEncryptionTypes( String... krbEncryptionTypes )
     {
-        for ( String encryptionType:krbEncryptionTypes )
+        for ( String encryptionType : krbEncryptionTypes )
         {
             this.krbEncryptionTypes.add( encryptionType );
         }
@@ -148,7 +151,7 @@ public class ChangePasswordServerBean ex
         return krbPrimaryRealm;
     }
 
-    
+
     /**
      * @param krbPrimaryRealm the krbPrimaryRealm to set
      */
@@ -157,7 +160,7 @@ public class ChangePasswordServerBean ex
         this.krbPrimaryRealm = krbPrimaryRealm;
     }
 
-    
+
     /**
      * @return the chgPwdPolicyCategoryCount
      */
@@ -166,7 +169,7 @@ public class ChangePasswordServerBean ex
         return chgPwdPolicyCategoryCount;
     }
 
-    
+
     /**
      * @param chgPwdPolicyCategoryCount the chgPwdPolicyCategoryCount to set
      */
@@ -175,7 +178,7 @@ public class ChangePasswordServerBean ex
         this.chgPwdPolicyCategoryCount = chgPwdPolicyCategoryCount;
     }
 
-    
+
     /**
      * @return the chgPwdPolicyPasswordLength
      */
@@ -184,7 +187,7 @@ public class ChangePasswordServerBean ex
         return chgPwdPolicyPasswordLength;
     }
 
-    
+
     /**
      * @param chgPwdPolicyPasswordLength the chgPwdPolicyPasswordLength to set
      */
@@ -193,7 +196,7 @@ public class ChangePasswordServerBean ex
         this.chgPwdPolicyPasswordLength = chgPwdPolicyPasswordLength;
     }
 
-    
+
     /**
      * @return the chgPwdPolicyTokenSize
      */
@@ -202,7 +205,7 @@ public class ChangePasswordServerBean ex
         return chgPwdPolicyTokenSize;
     }
 
-    
+
     /**
      * @param chgPwdPolicyTokenSize the chgPwdPolicyTokenSize to set
      */
@@ -211,7 +214,7 @@ public class ChangePasswordServerBean ex
         this.chgPwdPolicyTokenSize = chgPwdPolicyTokenSize;
     }
 
-    
+
     /**
      * @return the chgPwdServicePrincipal
      */
@@ -220,7 +223,7 @@ public class ChangePasswordServerBean ex
         return chgPwdServicePrincipal;
     }
 
-    
+
     /**
      * @param chgPwdServicePrincipal the chgPwdServicePrincipal to set
      */
@@ -228,20 +231,20 @@ public class ChangePasswordServerBean ex
     {
         this.chgPwdServicePrincipal = chgPwdServicePrincipal;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "ChangePasswordServer :\n" );
         sb.append( super.toString( tabs + "  " ) );
         sb.append( toString( tabs, "  change password service principal", chgPwdServicePrincipal ) );
         sb.append( toString( tabs, "  KRB primary realm", krbPrimaryRealm ) );
-        
+
         if ( ( krbEncryptionTypes != null ) && ( krbEncryptionTypes.size() != 0 ) )
         {
             sb.append( tabs ).append( "  encryption types : \n" );
@@ -251,7 +254,7 @@ public class ChangePasswordServerBean ex
                 sb.append( tabs ).append( "    encryptionType : " ).append( encryptionType ).append( '\n' );
             }
         }
-        
+
         sb.append( toString( tabs, "  change password policy category count", chgPwdPolicyCategoryCount ) );
         sb.append( toString( tabs, "  change password policy password length", chgPwdPolicyPasswordLength ) );
         sb.append( toString( tabs, "  change password policy token size", chgPwdPolicyTokenSize ) );
@@ -260,8 +263,8 @@ public class ChangePasswordServerBean ex
 
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DSBasedServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DSBasedServerBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DSBasedServerBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DSBasedServerBean.java Tue Dec  7 13:55:00 2010
@@ -19,7 +19,8 @@
  */
 package org.apache.directory.server.config.beans;
 
-import org.apache.directory.server.config.AttributeType;
+
+import org.apache.directory.server.config.ConfigurationElement;
 import org.apache.directory.shared.ldap.name.DN;
 
 
@@ -36,16 +37,16 @@ public class DSBasedServerBean extends S
      * configuration for catalog entries.  Otherwise it will use this
      * search base as a single point of searching the DIT.
      */
-    @AttributeType("ads-searchBaseDN")
+    @ConfigurationElement(attributeType = "ads-searchBaseDN")
     private DN searchBaseDN;
 
+
     /**
      * Create a new JournalBean instance
      */
     public DSBasedServerBean()
     {
     }
-    
 
 
     /**
@@ -66,22 +67,22 @@ public class DSBasedServerBean extends S
     {
         this.searchBaseDN = searchBaseDn;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( super.toString( tabs ) );
         sb.append( toString( tabs, "searchBaseDN", searchBaseDN ) );
-        
+
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DhcpServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DhcpServerBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DhcpServerBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DhcpServerBean.java Tue Dec  7 13:55:00 2010
@@ -33,26 +33,26 @@ public class DhcpServerBean extends DSBa
     public DhcpServerBean()
     {
         super();
-        
+
         // Enabled by default
         setEnabled( true );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "DhcpServer :\n" );
         sb.append( super.toString( tabs + "  " ) );
 
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java Tue Dec  7 13:55:00 2010
@@ -23,9 +23,7 @@ package org.apache.directory.server.conf
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.server.config.AttributeType;
-import org.apache.directory.server.config.Container;
-import org.apache.directory.server.config.RDN;
+import org.apache.directory.server.config.ConfigurationElement;
 
 
 /**
@@ -36,61 +34,63 @@ import org.apache.directory.server.confi
 public class DirectoryServiceBean extends AdsBaseBean
 {
     /** The DS instance Id */
-    @AttributeType("ads-directoryServiceId")
-    @RDN
+    @ConfigurationElement(attributeType = "ads-directoryServiceId", isRDN = true)
     private String directoryServiceId;
 
     /** The directory instance replication ID */
-    @AttributeType("ads-dsReplicaId")
+    @ConfigurationElement(attributeType = "ads-dsReplicaId")
     private int dsReplicaId;
 
     /** The flag that tells if the AccessControl system is activated */
-    @AttributeType("ads-dsAccessControlEnabled")
+    @ConfigurationElement(attributeType = "ads-dsAccessControlEnabled")
     private boolean dsAccessControlEnabled = true;
 
     /** The flag that tells if Anonymous connections are allowed */
-    @AttributeType("ads-dsAllowAnonymousAccess")
+    @ConfigurationElement(attributeType = "ads-dsAllowAnonymousAccess")
     private boolean dsAllowAnonymousAccess = false;
 
     /** The flag that tells if DN must be denormalized */
-    @AttributeType("dsDenormalizeOpAttrsEnabled")
+    @ConfigurationElement(attributeType = "dsDenormalizeOpAttrsEnabled")
     private boolean dsDenormalizeOpAttrsEnabled = true;
 
     /** The maximum size of an incoming PDU */
-    @AttributeType("ads-dsMaxPDUSize")
+    @ConfigurationElement(attributeType = "ads-dsMaxPDUSize")
     private int dsMaxPDUSize = 2048;
 
     /** The flag that tells if the password should be returned as a normal attribute or not */
-    @AttributeType("ads-dsPasswordHidden")
+    @ConfigurationElement(attributeType = "ads-dsPasswordHidden")
     private boolean dsPasswordHidden = false;
 
     /** The delay between two flushes on disk */
-    @AttributeType("ads-dsSyncPeriodMillis")
+    @ConfigurationElement(attributeType = "ads-dsSyncPeriodMillis")
     private long dsSyncPeriodMillis = 15000L;
 
     /** The ldif entries to inject into the server at startup */
-    @AttributeType("dsTestEntries")
+    @ConfigurationElement(attributeType = "dsTestEntries")
     private String dsTestEntries;
 
     /** The ChangeLog component */
+    @ConfigurationElement
     private ChangeLogBean changeLog;
 
     /** The journal component */
+    @ConfigurationElement
     private JournalBean journal;
 
     /** The servers */
-    @Container( "ou=servers" )
+    @ConfigurationElement(container = "ou=servers")
     private List<ServerBean> servers = new ArrayList<ServerBean>();
 
     /** The list of declared interceptors */
-    @Container( "ou=interceptors" )
+    @ConfigurationElement(container = "ou=interceptors")
     private List<InterceptorBean> interceptors = new ArrayList<InterceptorBean>();
 
     /** The set of associated partitions */
-    @Container( "ou=partitions" )
+    @ConfigurationElement(container = "ou=partitions")
     private List<PartitionBean> partitions = new ArrayList<PartitionBean>();
 
     /** The reference to the Password Policy component */
+    @ConfigurationElement
     private PasswordPolicyBean passwordPolicy;
 
 

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DnsServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DnsServerBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DnsServerBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/DnsServerBean.java Tue Dec  7 13:55:00 2010
@@ -33,26 +33,26 @@ public class DnsServerBean extends DSBas
     public DnsServerBean()
     {
         super();
-        
+
         // Enabled by default
         setEnabled( true );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "DnsServer :\n" );
         sb.append( super.toString( tabs + "  " ) );
 
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ExtendedOpHandlerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ExtendedOpHandlerBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ExtendedOpHandlerBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/ExtendedOpHandlerBean.java Tue Dec  7 13:55:00 2010
@@ -19,8 +19,8 @@
  */
 package org.apache.directory.server.config.beans;
 
-import org.apache.directory.server.config.AttributeType;
-import org.apache.directory.server.config.RDN;
+
+import org.apache.directory.server.config.ConfigurationElement;
 
 
 /**
@@ -31,14 +31,14 @@ import org.apache.directory.server.confi
 public class ExtendedOpHandlerBean extends AdsBaseBean
 {
     /** The Extended Operation ID */
-    @AttributeType("ads-extendedOpId")
-    @RDN
+    @ConfigurationElement(attributeType = "ads-extendedOpId", isRDN = true)
     private String extendedOpId;
-    
+
     /** The Extended Operation FQCN */
-    @AttributeType("extendedOpHandlerClass")
+    @ConfigurationElement(attributeType = "extendedOpHandlerClass")
     private String extendedOpHandlerClass;
 
+
     /**
      * Create a new LdapServerExtendedOpHandlerBean instance
      */
@@ -47,7 +47,7 @@ public class ExtendedOpHandlerBean exten
         super();
     }
 
-    
+
     /**
      * @return the extendedOpId
      */
@@ -56,7 +56,7 @@ public class ExtendedOpHandlerBean exten
         return extendedOpId;
     }
 
-    
+
     /**
      * @param extendedOpId the extendedOpId to set
      */
@@ -65,7 +65,7 @@ public class ExtendedOpHandlerBean exten
         this.extendedOpId = extendedOpId;
     }
 
-    
+
     /**
      * @return the ldapServerExtendedOpHandlerClass
      */
@@ -74,7 +74,7 @@ public class ExtendedOpHandlerBean exten
         return extendedOpHandlerClass;
     }
 
-    
+
     /**
      * @param extendedOpHandlerClass the ExtendedOpHandlerClass to set
      */
@@ -82,23 +82,24 @@ public class ExtendedOpHandlerBean exten
     {
         this.extendedOpHandlerClass = extendedOpHandlerClass;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "Extended operation handler :\n" );
         sb.append( tabs ).append( "  extended operation ID : " ).append( extendedOpId ).append( '\n' );
-        sb.append( tabs ).append( "  extended operation handler class : " ).append( extendedOpHandlerClass ).append( '\n' );
-        
+        sb.append( tabs ).append( "  extended operation handler class : " ).append( extendedOpHandlerClass )
+            .append( '\n' );
+
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/HttpServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/HttpServerBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/HttpServerBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/HttpServerBean.java Tue Dec  7 13:55:00 2010
@@ -19,12 +19,11 @@
  */
 package org.apache.directory.server.config.beans;
 
+
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.server.config.AttributeType;
-
-
+import org.apache.directory.server.config.ConfigurationElement;
 
 
 /**
@@ -35,25 +34,26 @@ import org.apache.directory.server.confi
 public class HttpServerBean extends ServerBean
 {
     /** The configuration file */
-    @AttributeType("ads-httpConfFile")
+    @ConfigurationElement(attributeType = "ads-httpConfFile")
     private String httpConfFile;
-    
+
     /** The list of supported web apps */
-    @AttributeType("httpWebApps")
+    @ConfigurationElement(container = "ou=httpWebApps")
     private List<HttpWebAppBean> httpWebApps = new ArrayList<HttpWebAppBean>();
 
+
     /**
      * Create a new HttpServerBean instance
      */
     public HttpServerBean()
     {
         super();
-        
+
         // Enabled by default
         setEnabled( true );
     }
 
-    
+
     /**
      * @return the httpConfFile
      */
@@ -62,7 +62,7 @@ public class HttpServerBean extends Serv
         return httpConfFile;
     }
 
-    
+
     /**
      * @param httpConfFile the httpConfFile to set
      */
@@ -71,7 +71,7 @@ public class HttpServerBean extends Serv
         this.httpConfFile = httpConfFile;
     }
 
-    
+
     /**
      * @return the httpWebApps
      */
@@ -80,7 +80,7 @@ public class HttpServerBean extends Serv
         return httpWebApps;
     }
 
-    
+
     /**
      * @param httpWebApps the httpWebApps to set
      */
@@ -89,34 +89,34 @@ public class HttpServerBean extends Serv
         this.httpWebApps = httpWebApps;
     }
 
-    
+
     /**
      * @param httpWebApps the httpWebApps to add
      */
     public void addHttpWebApps( HttpWebAppBean... httpWebApps )
     {
         for ( HttpWebAppBean httpWebApp : httpWebApps )
-        {   
+        {
             this.httpWebApps.add( httpWebApp );
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "HttpServer :\n" );
         sb.append( super.toString( tabs + "  " ) );
-        sb.append(  toString( tabs, "  http configuration file", httpConfFile ) );
-        
+        sb.append( toString( tabs, "  http configuration file", httpConfFile ) );
+
         if ( ( httpWebApps != null ) && ( httpWebApps.size() > 0 ) )
         {
             sb.append( tabs ).append( "  web applications :\n" );
-            
+
             for ( HttpWebAppBean httpWebApp : httpWebApps )
             {
                 sb.append( httpWebApp.toString( tabs + "    " ) );
@@ -125,8 +125,8 @@ public class HttpServerBean extends Serv
 
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/HttpWebAppBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/HttpWebAppBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/HttpWebAppBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/HttpWebAppBean.java Tue Dec  7 13:55:00 2010
@@ -19,8 +19,8 @@
  */
 package org.apache.directory.server.config.beans;
 
-import org.apache.directory.server.config.AttributeType;
-import org.apache.directory.server.config.RDN;
+
+import org.apache.directory.server.config.ConfigurationElement;
 
 
 /**
@@ -31,30 +31,30 @@ import org.apache.directory.server.confi
 public class HttpWebAppBean extends AdsBaseBean
 {
     /** The server identifier */
-    @AttributeType("ads-id")
-    @RDN
+    @ConfigurationElement(attributeType = "ads-id", isRDN = true)
     private String id;
-    
+
     /** The context path */
-    @AttributeType("ads-httpAppCtxPath")
+    @ConfigurationElement(attributeType = "ads-httpAppCtxPath")
     private String httpAppCtxPath;
-    
+
     /** The war file */
-    @AttributeType("ads-httpWarFile")
+    @ConfigurationElement(attributeType = "ads-httpWarFile")
     private String httpWarFile;
 
+
     /**
      * Create a new HttpWebAppBean instance
      */
     public HttpWebAppBean()
     {
         super();
-        
+
         // Enabled by default
         setEnabled( true );
     }
 
-    
+
     /**
      * @return the id
      */
@@ -63,7 +63,7 @@ public class HttpWebAppBean extends AdsB
         return id;
     }
 
-    
+
     /**
      * @param id the id to set
      */
@@ -72,7 +72,7 @@ public class HttpWebAppBean extends AdsB
         this.id = id;
     }
 
-    
+
     /**
      * @return the httpAppCtxPath
      */
@@ -81,7 +81,7 @@ public class HttpWebAppBean extends AdsB
         return httpAppCtxPath;
     }
 
-    
+
     /**
      * @param httpAppCtxPath the httpAppCtxPath to set
      */
@@ -90,7 +90,7 @@ public class HttpWebAppBean extends AdsB
         this.httpAppCtxPath = httpAppCtxPath;
     }
 
-    
+
     /**
      * @return the httpWarFile
      */
@@ -99,7 +99,7 @@ public class HttpWebAppBean extends AdsB
         return httpWarFile;
     }
 
-    
+
     /**
      * @param httpWarFile the httpWarFile to set
      */
@@ -108,24 +108,24 @@ public class HttpWebAppBean extends AdsB
         this.httpWarFile = httpWarFile;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "HttpWebApp :\n" );
         sb.append( super.toString( tabs + "  " ) );
         sb.append( tabs ).append( "  id : " ).append( id ).append( '\n' );
         sb.append( tabs ).append( "  war file : " ).append( httpWarFile ).append( '\n' );
-        sb.append(  toString( tabs, "  application context path", httpAppCtxPath ) );
+        sb.append( toString( tabs, "  application context path", httpAppCtxPath ) );
 
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java Tue Dec  7 13:55:00 2010
@@ -19,8 +19,9 @@
  */
 package org.apache.directory.server.config.beans;
 
-import org.apache.directory.server.config.AttributeType;
-import org.apache.directory.server.config.RDN;
+
+import org.apache.directory.server.config.ConfigurationElement;
+
 
 /**
  * A class used to store the IndexBean configuration. It can't be instanciated
@@ -30,10 +31,10 @@ import org.apache.directory.server.confi
 public abstract class IndexBean extends AdsBaseBean
 {
     /** The index unique identifier */
-    @AttributeType("ads-indexAttributeId")
-    @RDN
+    @ConfigurationElement(attributeType = "ads-indexAttributeId", isRDN = true)
     private String indexAttributeId;
-    
+
+
     /**
      * Create a new IndexBean instance
      */
@@ -41,6 +42,7 @@ public abstract class IndexBean extends 
     {
     }
 
+
     /**
      * @return the indexAttributeId
      */
@@ -49,7 +51,7 @@ public abstract class IndexBean extends 
         return indexAttributeId;
     }
 
-    
+
     /**
      * @param indexAttributeId the indexAttributeId to set
      */
@@ -57,22 +59,22 @@ public abstract class IndexBean extends 
     {
         this.indexAttributeId = indexAttributeId;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( super.toString( tabs + "  " ) );
         sb.append( tabs ).append( "  indexed attribute ID : " ).append( indexAttributeId ).append( '\n' );
 
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/InterceptorBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/InterceptorBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/InterceptorBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/InterceptorBean.java Tue Dec  7 13:55:00 2010
@@ -19,9 +19,8 @@
  */
 package org.apache.directory.server.config.beans;
 
-import org.apache.directory.server.config.AttributeType;
-import org.apache.directory.server.config.RDN;
 
+import org.apache.directory.server.config.ConfigurationElement;
 
 
 /**
@@ -32,16 +31,15 @@ import org.apache.directory.server.confi
 public class InterceptorBean extends AdsBaseBean implements Comparable<InterceptorBean>
 {
     /** The Interceptor ID */
-    @AttributeType("ads-interceptorId")
-    @RDN
+    @ConfigurationElement(attributeType = "ads-interceptorId", isRDN = true)
     private String interceptorId;
-    
+
     /** The interceptor FQCN */
-    @AttributeType("ads-interceptorClassName")
+    @ConfigurationElement(attributeType = "ads-interceptorClassName")
     private String interceptorClassName;
-    
+
     /** The interceptor position in the chain */
-    @AttributeType("ads-interceptorOrder")
+    @ConfigurationElement(attributeType = "ads-interceptorOrder")
     private int interceptorOrder;
 
 
@@ -77,7 +75,7 @@ public class InterceptorBean extends Ads
     /**
      * @return the id
      */
-    public String getInterceptorId() 
+    public String getInterceptorId()
     {
         return interceptorId;
     }
@@ -86,7 +84,7 @@ public class InterceptorBean extends Ads
     /**
      * @param id the id to set
      */
-    public void setInterceptorId( String id ) 
+    public void setInterceptorId( String id )
     {
         this.interceptorId = id;
     }
@@ -95,7 +93,7 @@ public class InterceptorBean extends Ads
     /**
      * @return the interceptor Order
      */
-    public int getInterceptorOrder() 
+    public int getInterceptorOrder()
     {
         return interceptorOrder;
     }
@@ -104,7 +102,7 @@ public class InterceptorBean extends Ads
     /**
      * @param interceptorOrder the interceptor Order to set
      */
-    public void setInterceptorOrder( int interceptorOrder ) 
+    public void setInterceptorOrder( int interceptorOrder )
     {
         this.interceptorOrder = interceptorOrder;
     }
@@ -126,23 +124,23 @@ public class InterceptorBean extends Ads
     {
         this.interceptorClassName = interceptorClassName;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "interceptor[" ).append( interceptorOrder ).append( "] : " ).append( '\n' );
         sb.append( tabs ).append( "  interceptor id : " ).append( interceptorId ).append( '\n' );
-        sb.append( tabs ).append( "  class name : " ).append(  interceptorClassName ).append( '\n' );
-        
+        sb.append( tabs ).append( "  class name : " ).append( interceptorClassName ).append( '\n' );
+
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmIndexBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmIndexBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmIndexBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmIndexBean.java Tue Dec  7 13:55:00 2010
@@ -19,7 +19,8 @@
  */
 package org.apache.directory.server.config.beans;
 
-import org.apache.directory.server.config.AttributeType;
+
+import org.apache.directory.server.config.ConfigurationElement;
 
 
 /**
@@ -31,7 +32,7 @@ public class JdbmIndexBean<K, E> extends
 {
     /** The default cache size */
     private static final int DEFAULT_INDEX_CACHE_SIZE = 100;
-    
+
     /** default duplicate limit before duplicate keys switch to using a btree for values */
     private static final int DEFAULT_DUPLICATE_LIMIT = 512;
 
@@ -40,15 +41,16 @@ public class JdbmIndexBean<K, E> extends
 
     /** duplicate limit before duplicate keys switch to using a btree for values */
     private int indexNumDupLimit = DEFAULT_DUPLICATE_LIMIT;
-    
+
     /** The index file name */
-    @AttributeType("ads-indexFileName")
+    @ConfigurationElement(attributeType = "ads-indexFileName")
     private String indexFileName;
-    
+
     /** The index working directory */
-    @AttributeType("ads-indexWorkingDir")
+    @ConfigurationElement(attributeType = "ads-indexWorkingDir")
     private String indexWorkingDir;
 
+
     /**
      * Create a new JdbmIndexBean instance
      */
@@ -137,26 +139,26 @@ public class JdbmIndexBean<K, E> extends
     {
         this.indexWorkingDir = indexWorkingDir;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "JdbmIndexBean :\n" );
         sb.append( super.toString( tabs ) );
         sb.append( toString( tabs, "  index file name", indexFileName ) );
         sb.append( toString( tabs, "  index working directory", indexWorkingDir ) );
         sb.append( toString( tabs, "  index cache size", indexCacheSize ) );
         sb.append( toString( tabs, "  index num dup limit", indexNumDupLimit ) );
-        
+
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmPartitionBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmPartitionBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmPartitionBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmPartitionBean.java Tue Dec  7 13:55:00 2010
@@ -19,7 +19,8 @@
  */
 package org.apache.directory.server.config.beans;
 
-import org.apache.directory.server.config.AttributeType;
+
+import org.apache.directory.server.config.ConfigurationElement;
 
 
 /**
@@ -30,11 +31,11 @@ import org.apache.directory.server.confi
 public class JdbmPartitionBean extends PartitionBean
 {
     /** The Entry cache size for this partition */
-    @AttributeType("ads-partitionCacheSize")
+    @ConfigurationElement(attributeType = "ads-partitionCacheSize")
     private int partitionCacheSize = -1;
 
     /** Tells if the optimizer is enabled or not */
-    @AttributeType("ads-jdbmPartitionOptimizerEnabled")
+    @ConfigurationElement(attributeType = "ads-jdbmPartitionOptimizerEnabled")
     private boolean jdbmPartitionOptimizerEnabled = true;
 
 

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JournalBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JournalBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JournalBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/JournalBean.java Tue Dec  7 13:55:00 2010
@@ -19,8 +19,9 @@
  */
 package org.apache.directory.server.config.beans;
 
-import org.apache.directory.server.config.AttributeType;
-import org.apache.directory.server.config.RDN;
+
+import org.apache.directory.server.config.ConfigurationElement;
+
 
 /**
  * A class used to store the Journal configuration.
@@ -30,22 +31,22 @@ import org.apache.directory.server.confi
 public class JournalBean extends AdsBaseBean
 {
     /** The journal unique Id */
-    @AttributeType("ads-journalId")
-    @RDN
+    @ConfigurationElement(attributeType = "ads-journalId", isRDN = true)
     private String journalId;
-    
+
     /** The journal file name */
-    @AttributeType("ads-journalFileName")
+    @ConfigurationElement(attributeType = "ads-journalFileName")
     private String journalFileName;
-    
+
     /** The journal working directory */
-    @AttributeType("ads-journalWorkingDir")
+    @ConfigurationElement(attributeType = "ads-journalWorkingDir")
     private String journalWorkingDir;
-    
+
     /** The journal rotation */
-    @AttributeType("ads-journalRotation")
+    @ConfigurationElement(attributeType = "ads-journalRotation")
     private int journalRotation;
 
+
     /**
      * Create a new JournalBean instance
      */
@@ -53,7 +54,7 @@ public class JournalBean extends AdsBase
     {
         // Default to infinite
         journalRotation = 0;
-        
+
         // Not enabled by default
         setEnabled( false );
     }
@@ -75,79 +76,79 @@ public class JournalBean extends AdsBase
     {
         this.journalId = journalId;
     }
-    
-    
+
+
     /**
      * @return the fileName
      */
-    public String getJournalFileName() 
+    public String getJournalFileName()
     {
         return journalFileName;
     }
 
-    
+
     /**
      * @param journalFileName the journalFileName to set
      */
-    public void setJournalFileName( String journalFileName ) 
+    public void setJournalFileName( String journalFileName )
     {
         this.journalFileName = journalFileName;
     }
 
-    
+
     /**
      * @return the journal WorkingDir
      */
-    public String getJournalWorkingDir() 
+    public String getJournalWorkingDir()
     {
         return journalWorkingDir;
     }
 
-    
+
     /**
      * @param journalWorkingDir the journal WorkingDir to set
      */
-    public void setJournalWorkingDir( String journalWorkingDir ) 
+    public void setJournalWorkingDir( String journalWorkingDir )
     {
         this.journalWorkingDir = journalWorkingDir;
     }
 
-    
+
     /**
      * @return the journal Rotation
      */
-    public int getJournalRotation() 
+    public int getJournalRotation()
     {
         return journalRotation;
     }
 
-    
+
     /**
      * @param journalRotation the journal Rotation to set
      */
-    public void setJournalRotation( int journalRotation ) 
+    public void setJournalRotation( int journalRotation )
     {
         this.journalRotation = journalRotation;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "Journal :\n" );
         sb.append( tabs ).append( "  journal id : " ).append( journalId ).append( '\n' );
         sb.append( tabs ).append( "  journal file name : " ).append( journalFileName ).append( '\n' );
         sb.append( toString( tabs, "  journal working dir", journalWorkingDir ) );
         sb.append( toString( tabs, "  journal rotation", journalRotation ) );
-        
+
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/KdcServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/KdcServerBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/KdcServerBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/KdcServerBean.java Tue Dec  7 13:55:00 2010
@@ -19,12 +19,14 @@
  */
 package org.apache.directory.server.config.beans;
 
+
 import java.util.ArrayList;
 import java.util.List;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
-import org.apache.directory.server.config.AttributeType;
+import org.apache.directory.server.config.ConfigurationElement;
+
 
 /**
  * A class used to store the KdcServer configuration.
@@ -70,69 +72,70 @@ public class KdcServerBean extends DSBas
     private static final String DEFAULT_PRINCIPAL = "krbtgt/EXAMPLE.COM@EXAMPLE.COM";
 
     /** The allowable clock skew. */
-    @AttributeType("ads-krbAllowableClockSkew")
+    @ConfigurationElement(attributeType = "ads-krbAllowableClockSkew")
     private long krbAllowableClockSkew = DEFAULT_ALLOWABLE_CLOCKSKEW;
 
     /** Whether empty addresses are allowed. */
-    @AttributeType("ads-krbEmptyAddressesAllowed")
+    @ConfigurationElement(attributeType = "ads-krbEmptyAddressesAllowed")
     private boolean krbEmptyAddressesAllowed = DEFAULT_EMPTY_ADDRESSES_ALLOWED;
 
     /** Whether forwardable addresses are allowed. */
-    @AttributeType("ads-krbForwardableAllowed")
+    @ConfigurationElement(attributeType = "ads-krbForwardableAllowed")
     private boolean krbForwardableAllowed = DEFAULT_TGS_FORWARDABLE_ALLOWED;
 
     /** Whether pre-authentication by encrypted timestamp is required. */
-    @AttributeType("ads-krbPAEncTimestampRequired")
+    @ConfigurationElement(attributeType = "ads-krbPAEncTimestampRequired")
     private boolean krbPAEncTimestampRequired = DEFAULT_PA_ENC_TIMESTAMP_REQUIRED;
 
     /** Whether postdated tickets are allowed. */
-    @AttributeType("ads-krbPostdatedAllowed")
+    @ConfigurationElement(attributeType = "ads-krbPostdatedAllowed")
     private boolean krbPostdatedAllowed = DEFAULT_TGS_POSTDATED_ALLOWED;
 
     /** Whether proxiable addresses are allowed. */
-    @AttributeType("ads-krbProxiableAllowed")
+    @ConfigurationElement(attributeType = "ads-krbProxiableAllowed")
     private boolean krbProxiableAllowed = DEFAULT_TGS_PROXIABLE_ALLOWED;
 
     /** Whether renewable tickets are allowed. */
-    @AttributeType("ads-krbRenewableAllowed")
+    @ConfigurationElement(attributeType = "ads-krbRenewableAllowed")
     private boolean krbRenewableAllowed = DEFAULT_TGS_RENEWABLE_ALLOWED;
 
     /** The maximum renewable lifetime. */
-    @AttributeType("ads-krbMaximumRenewableLifetime")
+    @ConfigurationElement(attributeType = "ads-krbMaximumRenewableLifetime")
     private long krbMaximumRenewableLifetime = DEFAULT_TGS_MAXIMUM_RENEWABLE_LIFETIME;
 
     /** The maximum ticket lifetime. */
-    @AttributeType("ads-krbMaximumTicketLifetime")
+    @ConfigurationElement(attributeType = "ads-krbMaximumTicketLifetime")
     private long krbMaximumTicketLifetime = DEFAULT_TGS_MAXIMUM_TICKET_LIFETIME;
 
     /** The primary realm */
-    @AttributeType("ads-krbPrimaryRealm")
+    @ConfigurationElement(attributeType = "ads-krbPrimaryRealm")
     private String krbPrimaryRealm = DEFAULT_REALM;
 
     /** Whether to verify the body checksum. */
-    @AttributeType("ads-krbBodyChecksumVerified")
+    @ConfigurationElement(attributeType = "ads-krbBodyChecksumVerified")
     private boolean krbBodyChecksumVerified = DEFAULT_VERIFY_BODY_CHECKSUM;
 
     /** The encryption types. */
-    @AttributeType("ads-krbEncryptionTypes")
+    @ConfigurationElement(attributeType = "ads-krbEncryptionTypes")
     private List<String> krbEncryptionTypes = new ArrayList<String>();
 
     /** The service principal name. */
-    @AttributeType("ads-krbKdcPrincipal")
+    @ConfigurationElement(attributeType = "ads-krbKdcPrincipal")
     private String krbKdcPrincipal = DEFAULT_PRINCIPAL;
 
+
     /**
      * Create a new KdcServerBean instance
      */
     public KdcServerBean()
     {
         super();
-        
+
         // Enabled by default
         setEnabled( true );
     }
-    
-    
+
+
     /**
      * Returns the allowable clock skew.
      *
@@ -171,7 +174,7 @@ public class KdcServerBean extends DSBas
      */
     public void addKrbEncryptionTypes( String... krbEncryptionTypes )
     {
-        for ( String encryptionType:krbEncryptionTypes )
+        for ( String encryptionType : krbEncryptionTypes )
         {
             this.krbEncryptionTypes.add( encryptionType );
         }
@@ -381,14 +384,14 @@ public class KdcServerBean extends DSBas
         this.krbKdcPrincipal = krbKdcPrincipal;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "KDCServer :\n" );
         sb.append( super.toString( tabs + "  " ) );
         sb.append( toString( tabs, "  body checksum verified", krbBodyChecksumVerified ) );
@@ -407,17 +410,17 @@ public class KdcServerBean extends DSBas
         if ( ( krbEncryptionTypes != null ) && ( krbEncryptionTypes.size() > 0 ) )
         {
             sb.append( tabs ).append( "  encryption types :\n" );
-            
+
             for ( String encryptionType : krbEncryptionTypes )
             {
                 sb.append( toString( tabs, "    encryption type", encryptionType ) );
             }
         }
-        
+
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java?rev=1043047&r1=1043046&r2=1043047&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java (original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java Tue Dec  7 13:55:00 2010
@@ -19,10 +19,11 @@
  */
 package org.apache.directory.server.config.beans;
 
+
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.server.config.AttributeType;
+import org.apache.directory.server.config.ConfigurationElement;
 
 
 /**
@@ -33,65 +34,70 @@ import org.apache.directory.server.confi
 public class LdapServerBean extends DSBasedServerBean
 {
     /** */
-    @AttributeType("ads-confidentialityRequired")
+    @ConfigurationElement(attributeType = "ads-confidentialityRequired")
     private boolean confidentialityRequired;
-    
+
     /** The maximum number of entries returned by the server */
-    @AttributeType("ads-maxSizeLimit")
+    @ConfigurationElement(attributeType = "ads-maxSizeLimit")
     private int maxSizeLimit;
-    
+
     /** The maximum time to execute a request on the server */
-    @AttributeType("ads-maxTimeLimit")
+    @ConfigurationElement(attributeType = "ads-maxTimeLimit")
     private int maxTimeLimit;
-    
+
     /** The SASL host */
-    @AttributeType("ads-saslHost")
+    @ConfigurationElement(attributeType = "ads-saslHost")
     private String saslHost;
-    
+
     /** The SASL  principal */
-    @AttributeType("ads-saslPrincipal")
+    @ConfigurationElement(attributeType = "ads-saslPrincipal")
     private String saslPrincipal;
-    
+
     /** The SASL realms */
-    @AttributeType("ads-saslRealms")
+    @ConfigurationElement(attributeType = "ads-saslRealms")
     private List<String> saslRealms = new ArrayList<String>();
-    
+
     /** The keystore file */
-    @AttributeType("ads-keystoreFile")
+    @ConfigurationElement(attributeType = "ads-keystoreFile")
     private String keystoreFile;
-    
+
     /** The certificate password */
-    @AttributeType("ads-certificatePassword")
+    @ConfigurationElement(attributeType = "ads-certificatePassword")
     private String certificatePassword;
-    
+
     /** tells if the replication is enabled */
-    @AttributeType("ads-enableReplProvider")
-    private boolean enableReplProvider; 
-    
+    @ConfigurationElement(attributeType = "ads-enableReplProvider")
+    private boolean enableReplProvider;
+
     /** The replication consumer Bean */
+    @ConfigurationElement
     private ReplConsumerBean replConsumer;
-    
+
     /** The replication producer Bean */
+    @ConfigurationElement
     private ReplProviderBean replProvider;
-    
+
     /** The list of supported mechanisms */
+    @ConfigurationElement(container="ou=saslMechHandlers")
     private List<SaslMechHandlerBean> saslMechHandlers = new ArrayList<SaslMechHandlerBean>();
-    
+
     /** The list of supported extended operation handlers */
+    @ConfigurationElement(container="ou=extendedOpHandlers")
     private List<ExtendedOpHandlerBean> extendedOpHandlers = new ArrayList<ExtendedOpHandlerBean>();
 
+
     /**
      * Create a new LdapServerBean instance
      */
     public LdapServerBean()
     {
         super();
-        
+
         // Enabled by default
         setEnabled( true );
     }
 
-    
+
     /**
      * @return the ldapServerConfidentialityRequired
      */
@@ -100,7 +106,7 @@ public class LdapServerBean extends DSBa
         return confidentialityRequired;
     }
 
-    
+
     /**
      * @param ldapServerConfidentialityRequired the ldapServerConfidentialityRequired to set
      */
@@ -109,7 +115,7 @@ public class LdapServerBean extends DSBa
         this.confidentialityRequired = ldapServerConfidentialityRequired;
     }
 
-    
+
     /**
      * @return the ldapServerMaxSizeLimit
      */
@@ -118,7 +124,7 @@ public class LdapServerBean extends DSBa
         return maxSizeLimit;
     }
 
-    
+
     /**
      * @param ldapServerMaxSizeLimit the ldapServerMaxSizeLimit to set
      */
@@ -127,7 +133,7 @@ public class LdapServerBean extends DSBa
         this.maxSizeLimit = ldapServerMaxSizeLimit;
     }
 
-    
+
     /**
      * @return the ldapServerMaxTimeLimit
      */
@@ -136,7 +142,7 @@ public class LdapServerBean extends DSBa
         return maxTimeLimit;
     }
 
-    
+
     /**
      * @param ldapServerMaxTimeLimit the ldapServerMaxTimeLimit to set
      */
@@ -145,7 +151,7 @@ public class LdapServerBean extends DSBa
         this.maxTimeLimit = ldapServerMaxTimeLimit;
     }
 
-    
+
     /**
      * @return the ldapServerSaslHost
      */
@@ -154,7 +160,7 @@ public class LdapServerBean extends DSBa
         return saslHost;
     }
 
-    
+
     /**
      * @param ldapServerSaslHost the ldapServerSaslHost to set
      */
@@ -163,7 +169,7 @@ public class LdapServerBean extends DSBa
         this.saslHost = ldapServerSaslHost;
     }
 
-    
+
     /**
      * @return the ldapServerSaslPrincipal
      */
@@ -172,7 +178,7 @@ public class LdapServerBean extends DSBa
         return saslPrincipal;
     }
 
-    
+
     /**
      * @param ldapServerSaslPrincipal the ldapServerSaslPrincipal to set
      */
@@ -181,7 +187,7 @@ public class LdapServerBean extends DSBa
         this.saslPrincipal = ldapServerSaslPrincipal;
     }
 
-    
+
     /**
      * @return the ldapServerSaslRealms
      */
@@ -190,7 +196,7 @@ public class LdapServerBean extends DSBa
         return saslRealms;
     }
 
-    
+
     /**
      * @param ldapServerSaslRealms the ldapServerSaslRealms to set
      */
@@ -199,7 +205,7 @@ public class LdapServerBean extends DSBa
         this.saslRealms = ldapServerSaslRealms;
     }
 
-    
+
     /**
      * @param ldapServerSaslRealms the ldapServerSaslRealms to add
      */
@@ -211,7 +217,7 @@ public class LdapServerBean extends DSBa
         }
     }
 
-    
+
     /**
      * @return the ldapServerKeystoreFile
      */
@@ -220,7 +226,7 @@ public class LdapServerBean extends DSBa
         return keystoreFile;
     }
 
-    
+
     /**
      * @param ldapServerKeystoreFile the ldapServerKeystoreFile to set
      */
@@ -229,7 +235,7 @@ public class LdapServerBean extends DSBa
         this.keystoreFile = ldapServerKeystoreFile;
     }
 
-    
+
     /**
      * @return the ldapServerCertificatePassword
      */
@@ -238,7 +244,7 @@ public class LdapServerBean extends DSBa
         return certificatePassword;
     }
 
-    
+
     /**
      * @param ldapServerCertificatePassword the ldapServerCertificatePassword to set
      */
@@ -247,7 +253,7 @@ public class LdapServerBean extends DSBa
         this.certificatePassword = ldapServerCertificatePassword;
     }
 
-    
+
     /**
      * @return the replProviderImpl
      *
@@ -274,7 +280,7 @@ public class LdapServerBean extends DSBa
         return enableReplProvider;
     }
 
-    
+
     /**
      * @param enableReplProvider the enableReplProvider to set
      */
@@ -283,7 +289,7 @@ public class LdapServerBean extends DSBa
         this.enableReplProvider = enableReplProvider;
     }
 
-    
+
     /**
      * @return the saslMechHandlers
      */
@@ -292,7 +298,7 @@ public class LdapServerBean extends DSBa
         return saslMechHandlers;
     }
 
-    
+
     /**
      * @param saslMechHandlers the saslMechHandlers to set
      */
@@ -301,7 +307,7 @@ public class LdapServerBean extends DSBa
         this.saslMechHandlers = saslMechHandlers;
     }
 
-    
+
     /**
      * @param saslMechHandlers the saslMechHandlers to add
      */
@@ -313,7 +319,7 @@ public class LdapServerBean extends DSBa
         }
     }
 
-    
+
     /**
      * @return the extendedOps
      */
@@ -322,7 +328,7 @@ public class LdapServerBean extends DSBa
         return extendedOpHandlers;
     }
 
-    
+
     /**
      * @param extendedOps the extendedOps to set
      */
@@ -331,14 +337,14 @@ public class LdapServerBean extends DSBa
         this.extendedOpHandlers = extendedOps;
     }
 
-    
+
     /**
      * @param extendedOps the extendedOps to add
      */
     public void addExtendedOps( ExtendedOpHandlerBean... extendedOps )
     {
         for ( ExtendedOpHandlerBean extendedOp : extendedOps )
-        {   
+        {
             this.extendedOpHandlers.add( extendedOp );
         }
     }
@@ -379,14 +385,14 @@ public class LdapServerBean extends DSBa
         this.replProvider = replProvider;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "LdapServer :\n" );
         sb.append( super.toString( tabs + "  " ) );
         sb.append( tabs ).append( "  max size limit : " ).append( maxSizeLimit ).append( '\n' );
@@ -397,51 +403,51 @@ public class LdapServerBean extends DSBa
         sb.append( tabs ).append( "  sasl host : " ).append( saslHost ).append( '\n' );
         sb.append( toString( tabs, "  confidentiality required", confidentialityRequired ) );
         sb.append( toString( tabs, "  enable replication provider", enableReplProvider ) );
-        
+
         if ( ( extendedOpHandlers != null ) && ( extendedOpHandlers.size() > 0 ) )
         {
             sb.append( tabs ).append( "  extended operation handlers :\n" );
-            
+
             for ( ExtendedOpHandlerBean extendedOpHandler : extendedOpHandlers )
             {
                 sb.append( extendedOpHandler.toString( tabs + "    " ) );
             }
         }
-        
+
         if ( saslMechHandlers != null )
         {
             sb.append( tabs ).append( "  SASL mechanism handlers :\n" );
-            
+
             for ( SaslMechHandlerBean saslMechHandler : saslMechHandlers )
             {
                 sb.append( saslMechHandler.toString( tabs + "    " ) );
             }
         }
-        
+
         if ( ( saslRealms != null ) && ( saslRealms.size() > 0 ) )
         {
             sb.append( tabs ).append( "  SASL realms :\n" );
-            
+
             for ( String saslRealm : saslRealms )
             {
                 sb.append( tabs ).append( "    " ).append( saslRealm ).append( "\n" );
             }
         }
-        
+
         if ( replConsumer != null )
         {
             sb.append( tabs ).append( replConsumer.toString( tabs + "  " ) );
         }
-        
+
         if ( replProvider != null )
         {
             sb.append( tabs ).append( replProvider.toString( tabs + "  " ) );
         }
-        
+
         return sb.toString();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */



Mime
View raw message