directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1389185 - in /directory/apacheds/trunk/server-config/src/main: java/org/apache/directory/server/config/ java/org/apache/directory/server/config/beans/ resources/
Date Mon, 24 Sep 2012 02:23:24 GMT
Author: elecharny
Date: Mon Sep 24 02:23:24 2012
New Revision: 1389185

URL: http://svn.apache.org/viewvc?rev=1389185&view=rev
Log:
forgot to commit those file while merging mvbt branch into trunk

Modified:
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigSchemaConstants.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java
    directory/apacheds/trunk/server-config/src/main/resources/config.ldif

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java?rev=1389185&r1=1389184&r2=1389185&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
(original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
Mon Sep 24 02:23:24 2012
@@ -36,12 +36,14 @@ import java.util.Set;
 
 import org.apache.directory.server.config.beans.AdsBaseBean;
 import org.apache.directory.server.config.beans.ConfigBean;
+import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition;
 import org.apache.directory.server.i18n.I18n;
-import org.apache.directory.server.xdbm.ForwardIndexEntry;
-import org.apache.directory.server.xdbm.IndexCursor;
+import org.apache.directory.server.xdbm.IndexEntry;
+import org.apache.directory.server.xdbm.search.PartitionSearchResult;
 import org.apache.directory.server.xdbm.search.SearchEngine;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
@@ -72,10 +74,10 @@ public class ConfigPartitionReader
     private static final Logger LOG = LoggerFactory.getLogger( ConfigPartitionReader.class
);
 
     /** the partition which holds the configuration data */
-    private AbstractBTreePartition<Long> configPartition;
+    private AbstractBTreePartition configPartition;
 
     /** the search engine of the partition */
-    private SearchEngine<Entry, Long> se;
+    private SearchEngine se;
 
     /** the schema manager set in the config partition */
     private SchemaManager schemaManager;
@@ -97,7 +99,7 @@ public class ConfigPartitionReader
      *
      * @param configPartition the non null config partition
      */
-    public ConfigPartitionReader( AbstractBTreePartition<Long> configPartition )
+    public ConfigPartitionReader( AbstractBTreePartition configPartition )
     {
         if ( configPartition == null )
         {
@@ -726,7 +728,7 @@ public class ConfigPartitionReader
         // Prepare the search request
         AttributeType adsdAt = schemaManager.getAttributeType( SchemaConstants.OBJECT_CLASS_AT
);
         EqualityNode<?> filter = new EqualityNode( adsdAt, new StringValue( name )
);
-        IndexCursor<Long, Entry, Long> cursor = null;
+        Cursor<IndexEntry<String, String>> cursor = null;
 
         // Create a container for all the read beans
         List<AdsBaseBean> beans = new ArrayList<AdsBaseBean>();
@@ -734,7 +736,14 @@ public class ConfigPartitionReader
         try
         {
             // Do the search
-            cursor = se.cursor( baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, scope
);
+            SearchOperationContext searchContext = new SearchOperationContext( null );
+            searchContext.setAliasDerefMode( AliasDerefMode.NEVER_DEREF_ALIASES );
+            searchContext.setDn( baseDn );
+            searchContext.setFilter( filter );
+            searchContext.setScope( scope );
+            PartitionSearchResult searchResult = se.computeResult( schemaManager, searchContext
);
+
+            cursor = searchResult.getResultSet();
 
             // First, check if we have some entries to process.
             if ( !cursor.next() )
@@ -758,7 +767,7 @@ public class ConfigPartitionReader
             // Loop on all the found elements
             do
             {
-                ForwardIndexEntry<Long, Long> forwardEntry = ( ForwardIndexEntry<Long,
Long> ) cursor
+                IndexEntry<String, String> forwardEntry = cursor
                     .get();
 
                 // Now, get the entry

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigSchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigSchemaConstants.java?rev=1389185&r1=1389184&r2=1389185&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigSchemaConstants.java
(original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigSchemaConstants.java
Mon Sep 24 02:23:24 2012
@@ -81,16 +81,16 @@ public enum ConfigSchemaConstants
 
     ADS_HTTP_SERVER_OC("ads-httpServer", "1.3.6.1.4.1.18060.0.4.1.3.804"),
 
-    ADS_REPL_EVENT_LOG_OC( "ads-replEventLog", "1.3.6.1.4.1.18060.0.4.1.3.805" ),
+    ADS_REPL_EVENT_LOG_OC("ads-replEventLog", "1.3.6.1.4.1.18060.0.4.1.3.805"),
 
     ADS_REPL_CONSUMER_OC("ads-replConsumer", "1.3.6.1.4.1.18060.0.4.1.3.806"),
 
     ADS_PASSWORD_POLICY_OC("ads-passwordPolicy", "1.3.6.1.4.1.18060.0.4.1.3.900"),
-    
+
     ADS_AUTHENTICATOR_OC("ads-authenticator", "1.3.6.1.4.1.18060.0.4.1.3.901"),
-    
+
     ADS_AUTHENTICATOR_IMPL_OC("ads-authenticatorImpl", "1.3.6.1.4.1.18060.0.4.1.3.902"),
-    
+
     ADS_DELEGATING_AUTHENTICATOR_OC("ads-delegatingAuthenticator", "1.3.6.1.4.1.18060.0.4.1.3.904"),
 
     ADS_CONFIG_ID("ads-configId", ""),
@@ -179,6 +179,8 @@ public enum ConfigSchemaConstants
 
     ADS_INDEX_ATTRIBUTE_ID("ads-indexAttributeId", ""),
 
+    ADS_INDEX_HAS_REVERSE("ads-indexHasReverse", ""),
+
     ADS_JDBMINDEX("ads-jdbmIndex", ""),
 
     ADS_INDEX_CACHESIZE("ads-indexCacheSize", ""),

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java?rev=1389185&r1=1389184&r2=1389185&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java
(original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java
Mon Sep 24 02:23:24 2012
@@ -34,6 +34,9 @@ public abstract class IndexBean extends 
     @ConfigurationElement(attributeType = "ads-indexAttributeId", isRdn = true)
     private String indexAttributeId;
 
+    @ConfigurationElement(attributeType = "ads-indexHasReverse", isRdn = true)
+    private String indexHasReverse;
+
 
     /**
      * Create a new IndexBean instance
@@ -62,6 +65,24 @@ public abstract class IndexBean extends 
 
 
     /**
+     * @param indexHasReverse the indexHasReverse to set
+     */
+    public void setIndexHasReverse( String indexHasReverse )
+    {
+        this.indexHasReverse = indexHasReverse;
+    }
+
+
+    /**
+     * @return the indexHasReverse
+     */
+    public String getIndexHasReverse()
+    {
+        return indexHasReverse;
+    }
+
+
+    /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
@@ -70,6 +91,7 @@ public abstract class IndexBean extends 
 
         sb.append( super.toString( tabs + "  " ) );
         sb.append( tabs ).append( "  indexed attribute ID : " ).append( indexAttributeId
).append( '\n' );
+        sb.append( tabs ).append( "  indexed has reverse : " ).append( indexHasReverse ).append(
'\n' );
 
         return sb.toString();
     }

Modified: directory/apacheds/trunk/server-config/src/main/resources/config.ldif
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/resources/config.ldif?rev=1389185&r1=1389184&r2=1389185&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/resources/config.ldif (original)
+++ directory/apacheds/trunk/server-config/src/main/resources/config.ldif Mon Sep 24 02:23:24
2012
@@ -270,7 +270,6 @@ ads-indexes: apacheOneAlias
 ads-indexes: apacheSubAlias
 ads-indexes: apacheAlias
 ads-indexes: objectClass
-ads-indexes: entryUUID
 ads-indexes: entryCSN
 ads-indexes: ou
 ads-indexes: uid
@@ -293,15 +292,7 @@ objectclass: top
 
 dn: ads-indexAttributeId=apacheRdn,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: apacheRdn
-ads-indexcachesize: 100
-objectclass: ads-index
-objectclass: ads-jdbmIndex
-objectclass: ads-base
-objectclass: top
-ads-enabled: TRUE
-
-dn: ads-indexAttributeId=apacheSubLevel,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
-ads-indexattributeid: apacheSubLevel
+ads-indexHasReverse: TRUE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -311,15 +302,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=apachePresence,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: apachePresence
-ads-indexcachesize: 100
-objectclass: ads-index
-objectclass: ads-jdbmIndex
-objectclass: ads-base
-objectclass: top
-ads-enabled: TRUE
-
-dn: ads-indexAttributeId=apacheOneLevel,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
-ads-indexattributeid: apacheOneLevel
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -329,6 +312,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=apacheOneAlias,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: apacheOneAlias
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -338,6 +322,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=apacheSubAlias,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: apacheSubAlias
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -347,6 +332,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=apacheAlias,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: apacheAlias
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -356,15 +342,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=objectClass,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: objectClass
-ads-indexcachesize: 100
-objectclass: ads-index
-objectclass: ads-jdbmIndex
-objectclass: ads-base
-objectclass: top
-ads-enabled: TRUE
-
-dn: ads-indexAttributeId=entryUUID,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
-ads-indexattributeid: entryUUID
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -374,6 +352,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=entryCSN,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: entryCSN
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -383,6 +362,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=ou,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: ou
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -392,6 +372,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=uid,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: uid
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -411,7 +392,6 @@ ads-indexes: apacheOneLevel
 ads-indexes: apacheOneAlias
 ads-indexes: apacheSubAlias
 ads-indexes: apacheAlias
-ads-indexes: entryUUID
 ads-indexes: entryCSN
 ads-indexes: dc
 ads-indexes: krb5PrincipalName
@@ -432,15 +412,7 @@ objectclass: top
 
 dn: ads-indexAttributeId=apacheRdn,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: apacheRdn
-ads-indexcachesize: 100
-objectclass: ads-index
-objectclass: ads-jdbmIndex
-objectclass: ads-base
-objectclass: top
-ads-enabled: TRUE
-
-dn: ads-indexAttributeId=apacheSubLevel,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
-ads-indexattributeid: apacheSubLevel
+ads-indexHasReverse: TRUE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -450,15 +422,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=apachePresence,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: apachePresence
-ads-indexcachesize: 100
-objectclass: ads-index
-objectclass: ads-jdbmIndex
-objectclass: ads-base
-objectclass: top
-ads-enabled: TRUE
-
-dn: ads-indexAttributeId=apacheOneLevel,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
-ads-indexattributeid: apacheOneLevel
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -468,6 +432,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=apacheOneAlias,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: apacheOneAlias
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -477,6 +442,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=apacheSubAlias,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: apacheSubAlias
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -486,6 +452,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=apacheAlias,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: apacheAlias
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -495,6 +462,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=dc,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: dc
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -504,6 +472,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=krb5PrincipalName,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: krb5PrincipalName
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -513,15 +482,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=objectClass,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: objectClass
-ads-indexcachesize: 100
-objectclass: ads-index
-objectclass: ads-jdbmIndex
-objectclass: ads-base
-objectclass: top
-ads-enabled: TRUE
-
-dn: ads-indexAttributeId=entryUUID,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
-ads-indexattributeid: entryUUID
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -531,6 +492,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=entryCSN,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: entryCSN
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -540,6 +502,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=ou,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: ou
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex
@@ -549,6 +512,7 @@ ads-enabled: TRUE
 
 dn: ads-indexAttributeId=uid,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
 ads-indexattributeid: uid
+ads-indexHasReverse: FALSE
 ads-indexcachesize: 100
 objectclass: ads-index
 objectclass: ads-jdbmIndex



Mime
View raw message