directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1188118 - in /directory/apacheds/branches/apacheds-osgi: apache-felix/ apache-felix/src/main/resources/ service-osgi/src/main/java/org/apache/directory/server/ xdbm-partition/ xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ ...
Date Mon, 24 Oct 2011 12:35:52 GMT
Author: pamarcelot
Date: Mon Oct 24 12:35:51 2011
New Revision: 1188118

URL: http://svn.apache.org/viewvc?rev=1188118&view=rev
Log:
Part of a fix for DIRSERVER-1672 (Making Comparators extendable). Applied patch sent by Göktürk
Gezer.

Modified:
    directory/apacheds/branches/apacheds-osgi/apache-felix/pom.xml
    directory/apacheds/branches/apacheds-osgi/apache-felix/src/main/resources/config.properties
    directory/apacheds/branches/apacheds-osgi/service-osgi/src/main/java/org/apache/directory/server/ApacheDsService.java
    directory/apacheds/branches/apacheds-osgi/xdbm-partition/pom.xml
    directory/apacheds/branches/apacheds-osgi/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdnComparator.java
    directory/apacheds/branches/apacheds-osgi/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java

Modified: directory/apacheds/branches/apacheds-osgi/apache-felix/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/apache-felix/pom.xml?rev=1188118&r1=1188117&r2=1188118&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/apache-felix/pom.xml (original)
+++ directory/apacheds/branches/apacheds-osgi/apache-felix/pom.xml Mon Oct 24 12:35:51 2011
@@ -92,6 +92,12 @@
                   <overWrite>true</overWrite>                  
                 </artifactItem>
                 <artifactItem>
+                  <groupId>org.apache.felix</groupId>
+                  <artifactId>org.apache.felix.ipojo.handler.whiteboard</artifactId>
+                  <version>1.6.0</version>
+                  <overWrite>true</overWrite>                  
+                </artifactItem>
+                <artifactItem>
                   <groupId>commons-io</groupId>
                   <artifactId>commons-io</artifactId>
                   <version>2.0.1</version>

Modified: directory/apacheds/branches/apacheds-osgi/apache-felix/src/main/resources/config.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/apache-felix/src/main/resources/config.properties?rev=1188118&r1=1188117&r2=1188118&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/apache-felix/src/main/resources/config.properties
(original)
+++ directory/apacheds/branches/apacheds-osgi/apache-felix/src/main/resources/config.properties
Mon Oct 24 12:35:51 2011
@@ -112,7 +112,6 @@ file:../../apacheds/jdbm-partition/targe
 file:../../apacheds/core-api/target/apacheds-core-api-2.0.0-M4-SNAPSHOT.jar \
 file:../../apacheds/core-shared/target/apacheds-core-shared-2.0.0-M4-SNAPSHOT.jar \
 file:../../apacheds/server-config/target/apacheds-server-config-2.0.0-M4-SNAPSHOT.jar \
-file:../../apacheds/service-osgi/target/apacheds-service-osgi-2.0.0-M4-SNAPSHOT.jar \
 file:../../apacheds/server-annotations/target/apacheds-server-annotations-2.0.0-M4-SNAPSHOT.jar
\
 file:../../apacheds/protocol-shared/target/apacheds-protocol-shared-2.0.0-M4-SNAPSHOT.jar
\
 file:../../apacheds/core-avl/target/apacheds-core-avl-2.0.0-M4-SNAPSHOT.jar \
@@ -137,7 +136,9 @@ file:../../shared/ldap/schema/converter/
 file:../../shared/ldap/model/target/shared-ldap-model-1.0.0-M9-SNAPSHOT.jar \
 file:../../shared/asn1/ber/target/shared-asn1-ber-1.0.0-M9-SNAPSHOT.jar \
 file:../../shared/asn1/api/target/shared-asn1-api-1.0.0-M9-SNAPSHOT.jar \
-file:../../shared/i18n/target/shared-i18n-1.0.0-M9-SNAPSHOT.jar
+file:../../shared/i18n/target/shared-i18n-1.0.0-M9-SNAPSHOT.jar \
+file:../../shared/ipojo-manager/target/shared-ipojo-manager-1.0.0-M9-SNAPSHOT.jar \
+file:../../apacheds/service-osgi/target/apacheds-service-osgi-2.0.0-M4-SNAPSHOT.jar
 
 felix.log.level=1
 

Modified: directory/apacheds/branches/apacheds-osgi/service-osgi/src/main/java/org/apache/directory/server/ApacheDsService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/service-osgi/src/main/java/org/apache/directory/server/ApacheDsService.java?rev=1188118&r1=1188117&r2=1188118&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/service-osgi/src/main/java/org/apache/directory/server/ApacheDsService.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/service-osgi/src/main/java/org/apache/directory/server/ApacheDsService.java
Mon Oct 24 12:35:51 2011
@@ -75,6 +75,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schemaextractor.impl.DefaultSchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schemaloader.LdifSchemaLoader;
 import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
+import org.apache.directory.shared.ldap.schemamanager.impl.OSGISchemaManager;
 import org.apache.directory.shared.util.DateUtils;
 import org.apache.directory.shared.util.exception.Exceptions;
 import org.slf4j.Logger;
@@ -101,7 +102,6 @@ public class ApacheDsService
     //    private DnsServer dnsServer;
 
     /** The Change Password server instance *
-    private ChangePasswordServer changePwdServer;/
 
     /** The Kerberos server instance */
     private KdcServer kdcServer;
@@ -220,7 +220,7 @@ public class ApacheDsService
         }
 
         SchemaLoader loader = new LdifSchemaLoader( schemaPartitionDirectory );
-        schemaManager = new DefaultSchemaManager( loader );
+        schemaManager = new OSGISchemaManager( loader );
 
         // We have to load the schema now, otherwise we won't be able
         // to initialize the Partitions, as we won't be able to parse 

Modified: directory/apacheds/branches/apacheds-osgi/xdbm-partition/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/xdbm-partition/pom.xml?rev=1188118&r1=1188117&r2=1188118&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/xdbm-partition/pom.xml (original)
+++ directory/apacheds/branches/apacheds-osgi/xdbm-partition/pom.xml Mon Oct 24 12:35:51 2011
@@ -81,6 +81,12 @@
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-util</artifactId>
     </dependency>
+    
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.ipojo.annotations</artifactId>
+      <version>1.8.0</version>
+    </dependency>
   </dependencies>
 
   <build>
@@ -128,6 +134,19 @@
           </instructions>
         </configuration>
       </plugin>
+      
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-ipojo-plugin</artifactId>
+        <version>1.8.0</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>ipojo-bundle</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>

Modified: directory/apacheds/branches/apacheds-osgi/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdnComparator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdnComparator.java?rev=1188118&r1=1188117&r2=1188118&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdnComparator.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdnComparator.java
Mon Oct 24 12:35:51 2011
@@ -22,6 +22,9 @@ package org.apache.directory.server.xdbm
 
 
 import org.apache.directory.shared.ldap.model.schema.comparators.SerializableComparator;
+import org.apache.felix.ipojo.annotations.Component;
+import org.apache.felix.ipojo.annotations.Provides;
+import org.apache.felix.ipojo.annotations.Property;
 
 
 /**
@@ -29,17 +32,27 @@ import org.apache.directory.shared.ldap.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@Component
+@Provides
 public class ParentIdAndRdnComparator<ID extends Comparable<ID>> extends SerializableComparator<ParentIdAndRdn<ID>>
 {
+    /**
+     * Property to specify factory type.
+     * TODO:This is temporary. Will be vanished after introducing custom annotations
+     */
+    @Property(name = "ads.comp.type", value = "comparator")
+    public String compType;
+
     /** The serial version UID */
     private static final long serialVersionUID = 2L;
 
+
     /**
      * Creates a new instance of ParentIdAndRdnComparator.
      *
      * @param matchingRuleOid The associated MatchingRule
      */
-    public ParentIdAndRdnComparator( String matchingRuleOid )
+    public ParentIdAndRdnComparator( @Property(name = "ads.comp.comparator.oid") String matchingRuleOid
)
     {
         super( matchingRuleOid );
     }

Modified: directory/apacheds/branches/apacheds-osgi/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java?rev=1188118&r1=1188117&r2=1188118&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
Mon Oct 24 12:35:51 2011
@@ -48,10 +48,10 @@ import org.apache.directory.shared.util.
 public class EqualityEvaluator<T, ID extends Comparable<ID>> extends LeafEvaluator<T,
ID>
 {
     /** The default byte[] comparator if no comparator has been defined */
-    private static final Comparator<byte[]> BINARY_COMPARATOR = new ByteArrayComparator(
null );
+    private static final Comparator<byte[]> BINARY_COMPARATOR = new ByteArrayComparator(
"" );
 
     /** The default String comparator if no comparator has been defined */
-    private static final Comparator<String> STRING_COMPARATOR = new StringComparator(
null );
+    private static final Comparator<String> STRING_COMPARATOR = new StringComparator(
"" );
 
 
     @SuppressWarnings("unchecked")



Mime
View raw message