directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r657108 - in /directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152: Interceptor.java ServerConfigurationV152.java ServerXmlIOV152.java
Date Fri, 16 May 2008 15:41:17 GMT
Author: pamarcelot
Date: Fri May 16 08:41:17 2008
New Revision: 657108

URL: http://svn.apache.org/viewvc?rev=657108&view=rev
Log:
o Removed old Interceptor class.
o Added support for the ApacheDS bean in the parser.

Removed:
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/Interceptor.java
Modified:
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerConfigurationV152.java
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java

Modified: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerConfigurationV152.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerConfigurationV152.java?rev=657108&r1=657107&r2=657108&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerConfigurationV152.java
(original)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerConfigurationV152.java
Fri May 16 08:41:17 2008
@@ -700,7 +700,7 @@
      * @return
      *      true if this list contained the specified element.
      */
-    public boolean removeInterceptor( Interceptor interceptor )
+    public boolean removeInterceptor( InterceptorEnum interceptor )
     {
         return interceptors.remove( interceptor );
     }

Modified: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java?rev=657108&r1=657107&r2=657108&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
(original)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
Fri May 16 08:41:17 2008
@@ -938,10 +938,37 @@
     }
 
 
-    private void readApacheDSBean( Element element, ServerConfiguration serverConfiguration
)
+    /**
+     * Reads the ApacheDS Bean.
+     *
+     * @param element
+     *      the element
+     * @param serverConfiguration
+     *      the server configuration
+     * @throws ServerXmlIOException
+     * @throws NumberFormatException
+     */
+    private void readApacheDSBean( Element element, ServerConfigurationV152 serverConfiguration
)
+        throws ServerXmlIOException, NumberFormatException
     {
-        // TODO Auto-generated method stub
-
+        // Getting the 'apacheDS' element
+        Element apacheDsElement = element.element( "apacheDS" );
+        if ( apacheDsElement != null )
+        {
+            // SynchPeriodMillis
+            org.dom4j.Attribute synchPeriodMillisAttribute = apacheDsElement.attribute( "synchPeriodMillis"
);
+            if ( synchPeriodMillisAttribute == null )
+            {
+                // If the 'synchPeriodMillis' attribute does not exists,
+                // we throw an exception
+                throw new ServerXmlIOException( "Unable to find the 'synchPeriodMillis' attribute
for a partition." );
+            }
+            else
+            {
+                serverConfiguration
+                    .setSynchronizationPeriod( Integer.parseInt( synchPeriodMillisAttribute.getValue()
) );
+            }
+        }
     }
 
 



Mime
View raw message