directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <elecha...@gmail.com>
Subject Re: svn commit: r581133 - in /directory: apacheds/branches/bigbang/ apacheds/branches/bigbang/apacheds-xbean-spring/ apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/ apacheds/branches/bigbang/core/src/main/java
Date Tue, 02 Oct 2007 08:21:05 GMT
Sorry for the compilation pb in shared ... I just forgot about the
normalizer<T> I modified locally in trunk.

I will have a second look today in big-bang, some more tests are to be added.

On 10/2/07, akarasulu@apache.org <akarasulu@apache.org> wrote:
> Author: akarasulu
> Date: Mon Oct  1 21:38:21 2007
> New Revision: 581133
>
> URL: http://svn.apache.org/viewvc?rev=581133&view=rev
> Log:
> got build working again by fixing compilation erros in shared and fixing server-xml file for new configuration with xbean
>
> Added:
>     directory/apacheds/branches/bigbang/server-xml/src/test/resources/
>     directory/apacheds/branches/bigbang/server-xml/src/test/resources/log4j.properties
> Modified:
>     directory/apacheds/branches/bigbang/apacheds-xbean-spring/pom.xml
>     directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
>     directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
>     directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
>     directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
>     directory/apacheds/branches/bigbang/pom.xml
>     directory/apacheds/branches/bigbang/server-xml/pom.xml
>     directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml
>     directory/daemon/branches/bigbang/pom.xml
>     directory/installers/branches/bigbang/apacheds-noarch/apacheds.bat
>     directory/installers/branches/bigbang/apacheds-noarch/apacheds.sh
>     directory/installers/branches/bigbang/apacheds-noarch/pom.xml
>     directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java
>     directory/installers/branches/bigbang/pom.xml
>     directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/AbstractValue.java
>     directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/BinaryValue.java
>     directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/ServerAttribute.java
>     directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/ServerAttributeImpl.java
>     directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/Value.java
>     directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/common/ServerAttributeImplTest.java
>     directory/shared/branches/bigbang/pom.xml
>
> Modified: directory/apacheds/branches/bigbang/apacheds-xbean-spring/pom.xml
> URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/apacheds-xbean-spring/pom.xml?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/apacheds/branches/bigbang/apacheds-xbean-spring/pom.xml (original)
> +++ directory/apacheds/branches/bigbang/apacheds-xbean-spring/pom.xml Mon Oct  1 21:38:21 2007
> @@ -7,13 +7,20 @@
>    <modelVersion>4.0.0</modelVersion>
>    <groupId>org.apache.directory.server</groupId>
>    <artifactId>apacheds-xbean-spring</artifactId>
> -  <name>apacheds-xbean-spring</name>
> +  <name>ApacheDS Xbean Spring</name>
>
>    <url>http://maven.apache.org</url>
>    <dependencies>
>      <dependency>
>        <groupId>org.apache.directory.server</groupId>
>        <artifactId>apacheds-protocol-changepw</artifactId>
> +      <version>${pom.version}</version>
> +      <classifier>sources</classifier>
> +    </dependency>
> +
> +    <dependency>
> +      <groupId>org.apache.directory.server</groupId>
> +      <artifactId>apacheds-jdbm-store</artifactId>
>        <version>${pom.version}</version>
>        <classifier>sources</classifier>
>      </dependency>
>
> Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
> URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/Partition.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/Partition.java (original)
> +++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/Partition.java Mon Oct  1 21:38:21 2007
> @@ -50,6 +50,7 @@
>   * base suffix.  Each partition contains entries whose name ends with that
>   * base suffix.
>   *
> + * @org.apache.xbean.XBean
>   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
>   * @version $Rev$
>   */
>
> Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
> URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
> +++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Mon Oct  1 21:38:21 2007
> @@ -48,6 +48,7 @@
>  /**
>   * An abstract {@link Partition} that uses general BTree operations.
>   *
> + * @org.apache.xbean.XBean
>   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
>   * @version $Rev$
>   */
>
> Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
> URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
> +++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Mon Oct  1 21:38:21 2007
> @@ -44,6 +44,7 @@
>   * A {@link Partition} that stores entries in
>   * <a href="http://jdbm.sourceforge.net/">JDBM</a> database.
>   *
> + * @org.apache.xbean.XBean
>   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
>   * @version $Rev$
>   */
>
> Modified: directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
> URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java (original)
> +++ directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java Mon Oct  1 21:38:21 2007
> @@ -45,6 +45,8 @@
>  /**
>   * A Jdbm based index implementation.
>   *
> + * @org.apache.xbean.XBean
> + *
>   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
>   * @version $Rev$
>   */
>
> Modified: directory/apacheds/branches/bigbang/pom.xml
> URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/pom.xml?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/apacheds/branches/bigbang/pom.xml (original)
> +++ directory/apacheds/branches/bigbang/pom.xml Mon Oct  1 21:38:21 2007
> @@ -22,7 +22,7 @@
>    <parent>
>      <groupId>org.apache.directory.project</groupId>
>      <artifactId>project</artifactId>
> -    <version>8</version>
> +    <version>9-SNAPSHOT</version>
>    </parent>
>
>    <groupId>org.apache.directory.server</groupId>
>
> Modified: directory/apacheds/branches/bigbang/server-xml/pom.xml
> URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-xml/pom.xml?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/apacheds/branches/bigbang/server-xml/pom.xml (original)
> +++ directory/apacheds/branches/bigbang/server-xml/pom.xml Mon Oct  1 21:38:21 2007
> @@ -37,18 +37,28 @@
>        <version>${version}</version>
>        <scope>test</scope>
>      </dependency>
> +
> +    <dependency>
> +      <groupId>org.apache.directory.server</groupId>
> +      <artifactId>apacheds-bootstrap-partition</artifactId>
> +      <version>${version}</version>
> +      <scope>test</scope>
> +    </dependency>
> +
>      <dependency>
>        <groupId>org.apache.directory.server</groupId>
>        <artifactId>apacheds-server-jndi</artifactId>
>        <version>${version}</version>
>        <scope>test</scope>
>      </dependency>
> +
>      <dependency>
>        <groupId>org.apache.xbean</groupId>
>        <artifactId>xbean-spring</artifactId>
>        <version>3.1</version>
>        <scope>test</scope>
>      </dependency>
> +
>      <dependency>
>        <groupId>org.springframework</groupId>
>        <artifactId>spring-core</artifactId>
>
> Modified: directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml
> URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml (original)
> +++ directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml Mon Oct  1 21:38:21 2007
> @@ -104,45 +104,45 @@
>        </ldapConfiguration>
>      </ldapConfiguration>
>
> -    <systemPartitionConfiguration>
> -      <!-- use the following partitionConfiguration to override defaults for  -->
> -      <!-- the system partition                                               -->
> -      <mutableBTreePartitionConfiguration id="systemPartitionConfiguration"
> -        name="system"
> +    <systemPartition>
> +      <!-- use the following partitionConfiguration to override defaults for -->
> +      <!-- the system partition                                              -->
> +
> +      <jdbmPartition
> +        id="system"
>          cacheSize="100"
>          suffix="ou=system"
>          optimizerEnabled="true"
> -        synchOnWrite="true"
> -        partitionClassName="org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition">
> +        syncOnWrite="true">
>          <indexedAttributes>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.1"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.2"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.3"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.4"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.5"
>                cacheSize="10"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.6"
>                cacheSize="10"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.7"
>                cacheSize="10"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="ou"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="uid"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="objectClass"
>                cacheSize="100"/>
>          </indexedAttributes>
> @@ -154,52 +154,51 @@
>              ou: system
>            </value>
>          </contextEntry>
> -      </mutableBTreePartitionConfiguration>
> -    </systemPartitionConfiguration>
> +      </jdbmPartition>
> +    </systemPartition>
>
> -    <partitionConfigurations>
> -      <mutableBTreePartitionConfiguration id="examplePartitionConfiguration"
> -        name="example"
> +    <partitions>
> +      <jdbmPartition
> +        id="example"
>          cacheSize="100"
>          suffix="dc=example,dc=com"
>          optimizerEnabled="true"
> -        synchOnWrite="true"
> -        partitionClassName="org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition">
> +        syncOnWrite="true">
>          <indexedAttributes>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.1"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.2"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.3"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.4"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.5"
>                cacheSize="10"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.6"
>                cacheSize="10"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="1.3.6.1.4.1.18060.0.4.1.2.7"
>                cacheSize="10"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="dc"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="ou"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="krb5PrincipalName"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="uid"
>                cacheSize="100"/>
> -            <mutableIndexConfiguration
> +            <jdbmIndex
>                attributeId="objectClass"
>                cacheSize="100"/>
>          </indexedAttributes>
> @@ -211,8 +210,8 @@
>              dc: example
>            </value>
>          </contextEntry>
> -      </mutableBTreePartitionConfiguration>
> -    </partitionConfigurations>
> +      </jdbmPartition>
> +    </partitions>
>
>      <interceptors>
>        <normalizationService/>
> @@ -222,30 +221,32 @@
>        <defaultAuthorizationService/>
>        <exceptionService/>
>        <operationalAttributeService/>
> +
>        <!-- Uncomment to enable the password policy service
>        <passwordPolicyService/>
>        <keyDerivationService/>
>        -->
> +
>        <schemaService/>
>        <subentryService/>
>        <collectiveAttributeService/>
>        <eventService/>
>        <triggerService/>
>
> -        <!-- Uncomment to enable replication service -->
> -        <replicationService >
> -          <configuration>
> -            <replicationConfiguration
> -              serverPort="10390"
> -              peerReplicas="instance_b@localhost:10392">
> -              <replicaId>
> -                <replicaId id="instance_a"/>
> -              </replicaId>
> -            </replicationConfiguration>
> -          </configuration>
> -        </replicationService>
> -      <!--
> -        -->
> +      <!-- Uncomment to enable replication service
> +      <replicationService >
> +        <configuration>
> +          <replicationConfiguration
> +            serverPort="10390"
> +            peerReplicas="instance_b@localhost:10392">
> +            <replicaId>
> +              <replicaId id="instance_a"/>
> +            </replicaId>
> +          </replicationConfiguration>
> +        </configuration>
> +      </replicationService>
> +      -->
> +
>      </interceptors>
>    </mutableServerStartupConfiguration>
>
>
> Added: directory/apacheds/branches/bigbang/server-xml/src/test/resources/log4j.properties
> URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-xml/src/test/resources/log4j.properties?rev=581133&view=auto
> ==============================================================================
> --- directory/apacheds/branches/bigbang/server-xml/src/test/resources/log4j.properties (added)
> +++ directory/apacheds/branches/bigbang/server-xml/src/test/resources/log4j.properties Mon Oct  1 21:38:21 2007
> @@ -0,0 +1,22 @@
> +#############################################################################
> +#    Licensed to the Apache Software Foundation (ASF) under one or more
> +#    contributor license agreements.  See the NOTICE file distributed with
> +#    this work for additional information regarding copyright ownership.
> +#    The ASF licenses this file to You under the Apache License, Version 2.0
> +#    (the "License"); you may not use this file except in compliance with
> +#    the License.  You may obtain a copy of the License at
> +#
> +#       http://www.apache.org/licenses/LICENSE-2.0
> +#
> +#    Unless required by applicable law or agreed to in writing, software
> +#    distributed under the License is distributed on an "AS IS" BASIS,
> +#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> +#    See the License for the specific language governing permissions and
> +#    limitations under the License.
> +#############################################################################
> +log4j.rootCategory=ERROR, stdout
> +
> +log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> +log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
> +
>
> Modified: directory/daemon/branches/bigbang/pom.xml
> URL: http://svn.apache.org/viewvc/directory/daemon/branches/bigbang/pom.xml?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/daemon/branches/bigbang/pom.xml (original)
> +++ directory/daemon/branches/bigbang/pom.xml Mon Oct  1 21:38:21 2007
> @@ -21,7 +21,7 @@
>    <parent>
>      <groupId>org.apache.directory.project</groupId>
>      <artifactId>project</artifactId>
> -    <version>8</version>
> +    <version>9-SNAPSHOT</version>
>    </parent>
>    <groupId>org.apache.directory.daemon</groupId>
>    <artifactId>daemon-parent</artifactId>
>
> Modified: directory/installers/branches/bigbang/apacheds-noarch/apacheds.bat
> URL: http://svn.apache.org/viewvc/directory/installers/branches/bigbang/apacheds-noarch/apacheds.bat?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/installers/branches/bigbang/apacheds-noarch/apacheds.bat (original)
> +++ directory/installers/branches/bigbang/apacheds-noarch/apacheds.bat Mon Oct  1 21:38:21 2007
> @@ -3,7 +3,7 @@
>  REM this script starts ApacheDS (as non-windows-service)
>
>
> -IF NOT exist target/apacheds-noarch-installer-1.5.1-app.jar GOTO :MVN
> +IF NOT exist target/apacheds-noarch-installer-1.5.2-SNAPSHOT-app.jar GOTO :MVN
>     echo uber jar exists
>     GOTO :JAVA
>
> @@ -13,4 +13,4 @@
>     GOTO :JAVA
>
>  :JAVA
> -   java -Dlog4j.configuration="file:///%cd%/log4j.properties" -jar target/apacheds-noarch-installer-1.5.1-app.jar server.xml
> +   java -Dlog4j.configuration="file:///%cd%/log4j.properties" -jar target/apacheds-noarch-installer-1.5.2-SNAPSHOT-app.jar server.xml
>
> Modified: directory/installers/branches/bigbang/apacheds-noarch/apacheds.sh
> URL: http://svn.apache.org/viewvc/directory/installers/branches/bigbang/apacheds-noarch/apacheds.sh?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/installers/branches/bigbang/apacheds-noarch/apacheds.sh (original)
> +++ directory/installers/branches/bigbang/apacheds-noarch/apacheds.sh Mon Oct  1 21:38:21 2007
> @@ -1,9 +1,9 @@
>  #!/bin/sh
> -if [ -e target/apacheds-noarch-installer-1.5.1-app.jar ] ; then
> +if [ -e target/apacheds-noarch-installer-1.5.2-SNAPSHOT-app.jar ] ; then
>    echo uber jar exists
>  else
>    echo uber jar not found need to build it
>    mvn clean assembly:assembly
>  fi
>
> -java -Dlog4j.debug -Dlog4j.configuration=file:./log4j.properties -jar target/apacheds-noarch-installer-1.5.1-app.jar server.xml
> +java -Dlog4j.debug -Dlog4j.configuration=file:./log4j.properties -jar target/apacheds-noarch-installer-1.5.2-SNAPSHOT-app.jar server.xml
>
> Modified: directory/installers/branches/bigbang/apacheds-noarch/pom.xml
> URL: http://svn.apache.org/viewvc/directory/installers/branches/bigbang/apacheds-noarch/pom.xml?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/installers/branches/bigbang/apacheds-noarch/pom.xml (original)
> +++ directory/installers/branches/bigbang/apacheds-noarch/pom.xml Mon Oct  1 21:38:21 2007
> @@ -30,6 +30,11 @@
>    <dependencies>
>      <dependency>
>        <groupId>org.apache.directory.server</groupId>
> +      <artifactId>apacheds-xbean-spring</artifactId>
> +    </dependency>
> +
> +    <dependency>
> +      <groupId>org.apache.directory.server</groupId>
>        <artifactId>apacheds-server-jndi</artifactId>
>      </dependency>
>
> @@ -84,6 +89,11 @@
>      <dependency>
>        <groupId>org.springframework</groupId>
>        <artifactId>spring-context</artifactId>
> +    </dependency>
> +
> +    <dependency>
> +      <groupId>org.apache.xbean</groupId>
> +      <artifactId>xbean-spring</artifactId>
>      </dependency>
>    </dependencies>
>
>
> Modified: directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java
> URL: http://svn.apache.org/viewvc/directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java (original)
> +++ directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java Mon Oct  1 21:38:21 2007
> @@ -20,24 +20,21 @@
>  package org.apache.directory.server;
>
>
> -import java.io.File;
> -import java.util.Properties;
> -
> -import javax.naming.Context;
> -import javax.naming.directory.InitialDirContext;
> -
>  import org.apache.directory.daemon.DaemonApplication;
>  import org.apache.directory.daemon.InstallationLayout;
>  import org.apache.directory.server.configuration.MutableServerStartupConfiguration;
>  import org.apache.directory.server.core.configuration.ShutdownConfiguration;
>  import org.apache.directory.server.core.configuration.SyncConfiguration;
>  import org.apache.directory.server.jndi.ServerContextFactory;
> -
> +import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
>  import org.slf4j.Logger;
>  import org.slf4j.LoggerFactory;
> -
>  import org.springframework.context.ApplicationContext;
> -import org.springframework.context.support.FileSystemXmlApplicationContext;
> +
> +import javax.naming.Context;
> +import javax.naming.directory.InitialDirContext;
> +import java.io.File;
> +import java.util.Properties;
>
>
>  /**
> @@ -74,7 +71,7 @@
>          {
>              log.info( "server: loading settings from ", args[0] );
>              ApplicationContext factory = null;
> -            factory = new FileSystemXmlApplicationContext( new File( args[0] ).toURI().toURL().toString() );
> +            factory = new ClassPathXmlApplicationContext( new File( args[0] ).toURI().toURL().toString() );
>              cfg = ( MutableServerStartupConfiguration ) factory.getBean( "configuration" );
>              env = ( Properties ) factory.getBean( "environment" );
>          }
>
> Modified: directory/installers/branches/bigbang/pom.xml
> URL: http://svn.apache.org/viewvc/directory/installers/branches/bigbang/pom.xml?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/installers/branches/bigbang/pom.xml (original)
> +++ directory/installers/branches/bigbang/pom.xml Mon Oct  1 21:38:21 2007
> @@ -22,7 +22,7 @@
>    <parent>
>      <groupId>org.apache.directory.project</groupId>
>      <artifactId>project</artifactId>
> -    <version>8</version>
> +    <version>9-SNAPSHOT</version>
>    </parent>
>
>    <groupId>org.apache.directory.installers</groupId>
> @@ -43,6 +43,12 @@
>
>        <dependency>
>          <groupId>org.apache.directory.server</groupId>
> +        <artifactId>apacheds-xbean-spring</artifactId>
> +        <version>1.5.2-SNAPSHOT</version>
> +      </dependency>
> +
> +      <dependency>
> +        <groupId>org.apache.directory.server</groupId>
>          <artifactId>apacheds-server-xml</artifactId>
>          <version>1.5.2-SNAPSHOT</version>
>        </dependency>
> @@ -279,6 +285,12 @@
>          <groupId>ldapsdk</groupId>
>          <artifactId>ldapsdk</artifactId>
>          <version>4.1</version>
> +      </dependency>
> +
> +      <dependency>
> +        <groupId>org.apache.xbean</groupId>
> +        <artifactId>xbean-spring</artifactId>
> +        <version>3.1</version>
>        </dependency>
>
>        <dependency>
>
> Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/AbstractValue.java
> URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/AbstractValue.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/AbstractValue.java (original)
> +++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/AbstractValue.java Mon Oct  1 21:38:21 2007
> @@ -40,6 +40,7 @@
>
>      /**
>       * Creates a new instance of StringValue with no value
> +     * @param value the value
>       */
>      public AbstractValue( T value )
>      {
> @@ -110,19 +111,20 @@
>      /**
>       * Normalize the value
>       */
> -    public void normalize( Normalizer<T> normalizer ) throws NamingException
> +    public void normalize( Normalizer normalizer ) throws NamingException
>      {
> -        normValue = normalizer.normalize( value );
> +        //noinspection unchecked
> +        normValue = ( T ) normalizer.normalize( value );
>      }
>
>
>      /**
>       * Clone the value.
>       */
> -    public Object clone() throws CloneNotSupportedException
> +    public Value clone() throws CloneNotSupportedException
>      {
>          // Simply clone the object
> -        return (Value)super.clone();
> +        return ( Value ) super.clone();
>      }
>
>
> @@ -131,21 +133,6 @@
>       */
>      public boolean equals( Object obj )
>      {
> -        if ( obj == this )
> -        {
> -            return true;
> -        }
> -
> -        if ( ( obj == null ) || !( obj instanceof Value ) )
> -        {
> -            return false;
> -        }
> -
> -        if ( obj.getClass() != this.getClass() )
> -        {
> -            return false;
> -        }
> -
> -        return true;
> +        return obj == this || !( ( obj == null ) || !( obj instanceof Value ) ) && obj.getClass() == this.getClass();
>      }
>  }
>
> Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/BinaryValue.java
> URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/BinaryValue.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/BinaryValue.java (original)
> +++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/BinaryValue.java Mon Oct  1 21:38:21 2007
> @@ -32,7 +32,7 @@
>  public class BinaryValue extends AbstractValue<byte[]>
>  {
>      /**
> -     * serialVersionUID
> +     * serialVersionUID
>       */
>      static final long serialVersionUID = 2L;
>
> @@ -78,7 +78,7 @@
>       *
>       * @return A non-null copy of the Value.
>       */
> -    public Object clone() throws CloneNotSupportedException
> +    public BinaryValue clone() throws CloneNotSupportedException
>      {
>          // Clone the superclass
>          BinaryValue cloned = (BinaryValue)super.clone();
>
> Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/ServerAttribute.java
> URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/ServerAttribute.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/ServerAttribute.java (original)
> +++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/ServerAttribute.java Mon Oct  1 21:38:21 2007
> @@ -65,13 +65,6 @@
>  public interface ServerAttribute extends Cloneable, Serializable
>  {
>      /**
> -     * This constant is used during deserialization to check the version which
> -     * created the serialized object.
> -     */
> -    static final long serialVersionUID = 2L;
> -
> -
> -    /**
>       * Adds a value to this attribute. If the new value is already present in
>       * the attribute values, the method has no effect.
>       * <p>
> @@ -263,6 +256,7 @@
>       *
>       * @param oid The attribute OID
>       * @param normalizer The normalizer
> +     * @throws NamingException when normalization fails
>       */
> -    void normalize( OID oid, Normalizer<?> normalizer ) throws NamingException;
> +    void normalize( OID oid, Normalizer normalizer ) throws NamingException;
>  }
>
> Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/ServerAttributeImpl.java
> URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/ServerAttributeImpl.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/ServerAttributeImpl.java (original)
> +++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/ServerAttributeImpl.java Mon Oct  1 21:38:21 2007
> @@ -31,7 +31,6 @@
>  import javax.naming.directory.BasicAttribute;
>
>  import org.apache.directory.shared.asn1.primitives.OID;
> -import org.apache.directory.shared.ldap.common.Value;
>  import org.apache.directory.shared.ldap.schema.Normalizer;
>  import org.apache.directory.shared.ldap.util.AttributeUtils;
>  import org.apache.directory.shared.ldap.util.StringTools;
> @@ -47,7 +46,7 @@
>   */
>  public class ServerAttributeImpl implements ServerAttribute, Serializable, Cloneable
>  {
> -    private static final Logger log = LoggerFactory.getLogger( ServerAttributeImpl.class );
> +    private static final Logger LOG = LoggerFactory.getLogger( ServerAttributeImpl.class );
>
>      /** For serialization */
>      private static final long serialVersionUID = 2L;
> @@ -67,20 +66,23 @@
>      /** A size to handle the number of values, as one of them can be null */
>      private int size;
>
> +
>      // ------------------------------------------------------------------------
>      // Constructors
>      // ------------------------------------------------------------------------
>
> +
>      /**
>       * Creates a ServerAttribute with an id
>       *
>       * @param id the id or name of this attribute.
> +     * @throws NamingException if the id is null
>       */
>      public ServerAttributeImpl( String id ) throws NamingException
>      {
>          if ( StringTools.isEmpty( id ) )
>          {
> -            log.error( "Attributes with an empty ID or OID are not allowed" );
> +            LOG.error( "Attributes with an empty ID or OID are not allowed" );
>              throw new NamingException( "Attributes with an empty ID or OID are not allowed" );
>          }
>
> @@ -96,12 +98,13 @@
>       * Creates a ServerAttribute with an oid
>       *
>       * @param oid the oid of this attribute.
> +     * @throws NamingException if the oid is null
>       */
>      public ServerAttributeImpl( OID oid ) throws NamingException
>      {
>          if ( oid == null )
>          {
> -            log.error( "Attributes with an empty ID or OID are not allowed" );
> +            LOG.error( "Attributes with an empty ID or OID are not allowed" );
>              throw new NamingException( "Attributes with an empty ID or OID are not allowed" );
>          }
>
> @@ -118,12 +121,13 @@
>       *
>       * @param id the id or name of this attribute.
>       * @param val the attribute's value
> +     * @throws NamingException if the id is invalid
>       */
>      public ServerAttributeImpl( String id, Value val ) throws NamingException
>      {
>          if ( StringTools.isEmpty( id ) )
>          {
> -            log.error( "Attributes with an empty ID or OID are not allowed" );
> +            LOG.error( "Attributes with an empty ID or OID are not allowed" );
>              throw new NamingException( "Attributes with an empty ID or OID are not allowed" );
>          }
>
> @@ -140,12 +144,13 @@
>       *
>       * @param oid the oid of this attribute.
>       * @param val the attribute's value
> +     * @throws NamingException if the oid is invalid
>       */
>      public ServerAttributeImpl( OID oid, Value val ) throws NamingException
>      {
>          if ( oid == null )
>          {
> -            log.error( "Attributes with an empty ID or OID are not allowed" );
> +            LOG.error( "Attributes with an empty ID or OID are not allowed" );
>              throw new NamingException( "Attributes with an empty ID or OID are not allowed" );
>          }
>
> @@ -162,12 +167,13 @@
>       *
>       * @param id the id or name of this attribute.
>       * @param val a value for the attribute
> +     * @throws NamingException if the id string is invalid
>       */
>      public ServerAttributeImpl( String id, byte[] val ) throws NamingException
>      {
>          if ( StringTools.isEmpty( id ) )
>          {
> -            log.error( "Attributes with an empty ID or OID are not allowed" );
> +            LOG.error( "Attributes with an empty ID or OID are not allowed" );
>              throw new NamingException( "Attributes with an empty ID or OID are not allowed" );
>          }
>
> @@ -184,12 +190,13 @@
>       *
>       * @param oid the oid of this attribute.
>       * @param val a value for the attribute
> +     * @throws NamingException if the oid is invalid
>       */
>      public ServerAttributeImpl( OID oid, byte[] val ) throws NamingException
>      {
>          if ( oid == null )
>          {
> -            log.error( "Attributes with an empty ID or OID are not allowed" );
> +            LOG.error( "Attributes with an empty ID or OID are not allowed" );
>              throw new NamingException( "Attributes with an empty ID or OID are not allowed" );
>          }
>
> @@ -206,12 +213,13 @@
>       *
>       * @param id the id or name of this attribute.
>       * @param val a value for the attribute
> +     * @throws NamingException if the id string is invalid
>       */
>      public ServerAttributeImpl( String id, String val ) throws NamingException
>      {
>          if ( StringTools.isEmpty( id ) )
>          {
> -            log.error( "Attributes with an empty ID or OID are not allowed" );
> +            LOG.error( "Attributes with an empty ID or OID are not allowed" );
>              throw new NamingException( "Attributes with an empty ID or OID are not allowed" );
>          }
>
> @@ -228,12 +236,13 @@
>       *
>       * @param oid the oid of this attribute.
>       * @param val a value for the attribute
> +     * @throws NamingException if there's no OID provided
>       */
>      public ServerAttributeImpl( OID oid, String val ) throws NamingException
>      {
>          if ( oid == null )
>          {
> -            log.error( "Attributes with an empty ID or OID are not allowed" );
> +            LOG.error( "Attributes with an empty ID or OID are not allowed" );
>              throw new NamingException( "Attributes with an empty ID or OID are not allowed" );
>          }
>
> @@ -257,7 +266,7 @@
>      {
>          if ( attribute == null )
>          {
> -            log.error(  "Null attribute is not allowed" );
> +            LOG.error(  "Null attribute is not allowed" );
>              throw new NamingException( "Null attribute is not allowed" );
>          }
>          else if ( attribute instanceof ServerAttributeImpl )
> @@ -326,7 +335,7 @@
>                      }
>                      else
>                      {
> -                        log.error( "The value's type is not String or byte[]" );
> +                        LOG.error( "The value's type is not String or byte[]" );
>                          throw new NamingException( "The value's type is not String or byte[]" );
>                      }
>
> @@ -352,7 +361,7 @@
>                          }
>                          else
>                          {
> -                            log.error( "The value's type is not String or byte[]" );
> +                            LOG.error( "The value's type is not String or byte[]" );
>                              throw new NamingException( "The value's type is not String or byte[]" );
>                          }
>                      }
> @@ -365,16 +374,17 @@
>          }
>          else
>          {
> -            log.error( "Attribute must be an instance of BasicAttribute or AttributeImpl" );
> +            LOG.error( "Attribute must be an instance of BasicAttribute or AttributeImpl" );
>              throw new NamingException( "Attribute must be an instance of BasicAttribute or AttributeImpl" );
>          }
>      }
>
>
>      /**
> -     *
>       * Clone a value. This private message is used to avoid adding try--catch
>       * all over the code.
> +     * @param value the value to clone
> +     * @return the value that was cloned
>       */
>      private Value getClonedValue( Value value )
>      {
> @@ -548,8 +558,6 @@
>       */
>      public boolean add( Value val )
>      {
> -        boolean exists = false;
> -
>          if ( contains( val ) )
>          {
>              // Do not duplicate values
> @@ -574,10 +582,8 @@
>                  {
>                      return false;
>                  }
> -
> -                exists = value.equals( val );
>
> -                if ( exists )
> +                if ( value != null && value.equals( val ) )
>                  {
>                      // Don't add two times the same value
>                      return true;
> @@ -608,18 +614,17 @@
>                      return false;
>                  }
>
> -                exists = values.contains( val );
> -
> -                if ( exists )
> +                if ( values.contains( val ) )
>                  {
>                      // Don't add two times the same value
>                      return true;
>                  }
> -
> -                values.add( val );
> -                size++;
> -
> -                return exists;
> +                else
> +                {
> +                    values.add( val );
> +                    size++;
> +                    return false;
> +                }
>          }
>      }
>
> @@ -737,7 +742,6 @@
>              default :
>                  values = null;
>                  size = 0;
> -                return;
>          }
>      }
>
> @@ -853,7 +857,7 @@
>       * @param normalizer The normalizer
>       */
>      @SuppressWarnings(value="unchecked")
> -    public void normalize( OID oid, Normalizer<?> normalizer ) throws NamingException
> +    public void normalize( OID oid, Normalizer normalizer ) throws NamingException
>      {
>          this.oid = oid;
>
> @@ -907,7 +911,7 @@
>
>                  for ( Value value:values )
>                  {
> -                    if ( isFirst == false )
> +                    if ( !isFirst )
>                      {
>                          sb.append( ", " );
>                      }
>
> Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/Value.java
> URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/Value.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/Value.java (original)
> +++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/common/Value.java Mon Oct  1 21:38:21 2007
> @@ -72,7 +72,7 @@
>       * @param normalizer The normalizer to use
>       * @throws NamingException If the normalization fail
>       */
> -    void normalize( Normalizer<T> normalizer ) throws NamingException;
> +    void normalize( Normalizer normalizer ) throws NamingException;
>
>      /**
>       * Tells if the value has been normalized. It's a speedup.
> @@ -86,6 +86,7 @@
>       * Makes a copy of the Value.
>       *
>       * @return A non-null copy of the Value.
> +     * @throws CloneNotSupportedException if the clone operation is not supported
>       */
>      Object clone() throws CloneNotSupportedException;
>  }
>
> Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/common/ServerAttributeImplTest.java
> URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/common/ServerAttributeImplTest.java?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/common/ServerAttributeImplTest.java (original)
> +++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/common/ServerAttributeImplTest.java Mon Oct  1 21:38:21 2007
> @@ -328,15 +328,15 @@
>
>          ServerAttribute attr = new ServerAttributeImpl( "test", (String)null );
>
> -        attr.normalize( oid, new Normalizer<String>()
> +        attr.normalize( oid, new Normalizer()
> +        {
> +            public static final long serialVersionUID = 1L;
> +
> +            public Object normalize( Object value ) throws NamingException
>              {
> -                public static final long serialVersionUID = 1L;
> -
> -                public String normalize( String value )
> -                {
> -                    return value == null ? null : StringTools.toLowerCase( value );
> -                }
> -            });
> +                return value == null ? null : StringTools.toLowerCase( ( String ) value );
> +            }
> +        });
>
>          assertEquals( null, attr.get().getNormValue() );
>          assertEquals( null, attr.get().getValue() );
> @@ -356,15 +356,15 @@
>          attr.add( "TEST2" );
>          attr.add( (String)null );
>
> -        attr.normalize( oid, new Normalizer<String>()
> +        attr.normalize( oid, new Normalizer()
> +        {
> +            public static final long serialVersionUID = 1L;
> +
> +            public Object normalize( Object value ) throws NamingException
>              {
> -                public static final long serialVersionUID = 1L;
> -
> -                public String normalize( String value )
> -                {
> -                    return value == null ? null : StringTools.toLowerCase( value );
> -                }
> -            });
> +                return value == null ? null : StringTools.toLowerCase( ( String ) value );
> +            }
> +        });
>
>          String[] expectedLC = new String[]{ "test1", "test2", null };
>          String[] expectedUC = new String[]{ "TEST1", "TEST2", null };
> @@ -457,27 +457,27 @@
>
>          OID oid = new OID( "0.1.2.3.4" );
>
> -        attr.normalize( oid, new Normalizer<String>()
> +        attr.normalize( oid, new Normalizer()
> +        {
> +            public static final long serialVersionUID = 1L;
> +
> +            public Object normalize( Object value ) throws NamingException
>              {
> -                public static final long serialVersionUID = 1L;
> -
> -                public String normalize( String value )
> -                {
> -                    return value == null ? null : StringTools.toLowerCase( value );
> -                }
> -            });
> +                return value == null ? null : StringTools.toLowerCase( ( String ) value );
> +            }
> +        });
>
>          assertNotSame( clone, attr );
>
> -        clone.normalize( oid, new Normalizer<String>()
> +        clone.normalize( oid, new Normalizer()
> +        {
> +            public static final long serialVersionUID = 1L;
> +
> +            public Object normalize( Object value ) throws NamingException
>              {
> -                public static final long serialVersionUID = 1L;
> -
> -                public String normalize( String value )
> -                {
> -                    return value == null ? null : StringTools.toLowerCase( value );
> -                }
> -            });
> +                return value == null ? null : StringTools.toLowerCase( ( String ) value );
> +            }
> +        });
>
>          assertEquals( clone, attr );
>
>
> Modified: directory/shared/branches/bigbang/pom.xml
> URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/pom.xml?rev=581133&r1=581132&r2=581133&view=diff
> ==============================================================================
> --- directory/shared/branches/bigbang/pom.xml (original)
> +++ directory/shared/branches/bigbang/pom.xml Mon Oct  1 21:38:21 2007
> @@ -21,7 +21,7 @@
>    <parent>
>      <groupId>org.apache.directory.project</groupId>
>      <artifactId>project</artifactId>
> -    <version>8</version>
> +    <version>9-SNAPSHOT</version>
>    </parent>
>    <groupId>org.apache.directory.shared</groupId>
>    <artifactId>shared-parent</artifactId>
>
>
>


-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com

Mime
View raw message