You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2005/06/20 17:41:56 UTC
svn commit: r191493 - in /directory/apacheds/branches/db_refactor/core/src:
main/java/org/apache/ldap/server/authz/
main/java/org/apache/ldap/server/configuration/
main/java/org/apache/ldap/server/interceptor/
main/java/org/apache/ldap/server/jndi/ mai...
Author: trustin
Date: Mon Jun 20 08:41:54 2005
New Revision: 191493
URL: http://svn.apache.org/viewcvs?rev=191493&view=rev
Log:
* Moved back SystemPartition to package 'partition'
* Made RootNExus self-configure and configure context partitions
* Made register and unregister inaccessable (private)
* Moved all user partition initialization code in DefaultContextFactoryConfiguration to RootNexus.
Added:
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/SystemPartition.java
- copied, changed from r191472, directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/SystemPartition.java
Removed:
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/SystemPartition.java
Modified:
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/authz/AuthorizationService.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorContext.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/ContextFactoryConfiguration.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryConfiguration.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/RootNexusProxy.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/RootNexus.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/jdbm/JdbmContextPartition.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalAttributeTypeRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalComparatorRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitContentRuleRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitStructureRuleRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleUseRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNameFormRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNormalizerRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalObjectClassRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalRegistries.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java
directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java
directory/apacheds/branches/db_refactor/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsAdminTest.java
directory/apacheds/branches/db_refactor/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/authz/AuthorizationService.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/authz/AuthorizationService.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/authz/AuthorizationService.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/authz/AuthorizationService.java Mon Jun 20 08:41:54 2005
@@ -43,8 +43,8 @@
import org.apache.ldap.server.invocation.MoveAndModifyRN;
import org.apache.ldap.server.invocation.Search;
import org.apache.ldap.server.jndi.ServerContext;
-import org.apache.ldap.server.jndi.SystemPartition;
import org.apache.ldap.server.partition.ContextPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.partition.store.impl.btree.ResultFilteringEnumeration;
import org.apache.ldap.server.partition.store.impl.btree.SearchResultFilter;
import org.apache.ldap.server.schema.AttributeTypeRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java Mon Jun 20 08:41:54 2005
@@ -29,7 +29,9 @@
import javax.naming.directory.BasicAttributes;
import org.apache.ldap.common.name.LdapName;
+import org.apache.ldap.common.schema.Normalizer;
import org.apache.ldap.server.partition.ContextPartition;
+import org.apache.ldap.server.schema.MatchingRuleRegistry;
/**
@@ -42,7 +44,6 @@
{
private String name;
private String suffix;
- private Name normalizedSuffix;
private Set indexedAttributes = new HashSet(); // Set<String>
private Attributes contextEntry = new BasicAttributes();
private ContextPartition contextPartition;
@@ -110,23 +111,28 @@
return suffix;
}
- public Name getNormalizedSuffix()
+ public Name getNormalizedSuffix( MatchingRuleRegistry matchingRuleRegistry ) throws NamingException
{
- return normalizedSuffix;
+ return getNormalizedSuffix( matchingRuleRegistry.lookup( "distinguishedNameMatch" ).getNormalizer() );
+ }
+
+ public Name getNormalizedSuffix( Normalizer normalizer ) throws NamingException
+ {
+ return new LdapName( normalizer.normalize( suffix ).toString() );
}
protected void setSuffix( String suffix )
{
- // TODO Suffix should be normalized before being set
- this.suffix = suffix.trim();
+ suffix = suffix.trim();
try
{
- this.normalizedSuffix = new LdapName( suffix );
+ new LdapName( suffix );
}
catch( NamingException e )
{
throw new ConfigurationException( "Failed to normalized the suffix: " + suffix );
}
+ this.suffix = suffix;
}
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorContext.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorContext.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorContext.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorContext.java Mon Jun 20 08:41:54 2005
@@ -2,8 +2,8 @@
import org.apache.ldap.server.configuration.StartupConfiguration;
-import org.apache.ldap.server.jndi.SystemPartition;
import org.apache.ldap.server.partition.RootNexus;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.GlobalRegistries;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/ContextFactoryConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/ContextFactoryConfiguration.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/ContextFactoryConfiguration.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/ContextFactoryConfiguration.java Mon Jun 20 08:41:54 2005
@@ -40,11 +40,6 @@
StartupConfiguration getConfiguration();
/**
- * Returns the system partition used by this context factory.
- */
- SystemPartition getSystemPartition();
-
- /**
* Returns the registries for system schema objects
*/
GlobalRegistries getGlobalRegistries();
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryConfiguration.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryConfiguration.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryConfiguration.java Mon Jun 20 08:41:54 2005
@@ -16,8 +16,6 @@
*/
package org.apache.ldap.server.jndi;
-import java.io.File;
-import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Iterator;
@@ -35,30 +33,18 @@
import org.apache.ldap.common.name.DnParser;
import org.apache.ldap.common.name.LdapName;
import org.apache.ldap.common.name.NameComponentNormalizer;
-import org.apache.ldap.common.schema.AttributeType;
-import org.apache.ldap.common.schema.Normalizer;
import org.apache.ldap.common.util.DateUtils;
import org.apache.ldap.server.configuration.Configuration;
-import org.apache.ldap.server.configuration.ContextPartitionConfiguration;
import org.apache.ldap.server.configuration.StartupConfiguration;
import org.apache.ldap.server.interceptor.InterceptorChain;
import org.apache.ldap.server.interceptor.InterceptorContext;
import org.apache.ldap.server.invocation.Invocation;
-import org.apache.ldap.server.partition.ApplicationPartition;
-import org.apache.ldap.server.partition.ContextPartition;
import org.apache.ldap.server.partition.ContextPartitionNexus;
import org.apache.ldap.server.partition.RootNexus;
-import org.apache.ldap.server.partition.store.impl.btree.DefaultSearchEngine;
-import org.apache.ldap.server.partition.store.impl.btree.ExpressionEnumerator;
-import org.apache.ldap.server.partition.store.impl.btree.ExpressionEvaluator;
-import org.apache.ldap.server.partition.store.impl.btree.BTreeContextPartition;
-import org.apache.ldap.server.partition.store.impl.btree.SearchEngine;
-import org.apache.ldap.server.partition.store.impl.btree.jdbm.JdbmBTreeContextPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.AttributeTypeRegistry;
import org.apache.ldap.server.schema.ConcreteNameComponentNormalizer;
import org.apache.ldap.server.schema.GlobalRegistries;
-import org.apache.ldap.server.schema.MatchingRuleRegistry;
-import org.apache.ldap.server.schema.OidRegistry;
import org.apache.ldap.server.schema.bootstrap.BootstrapRegistries;
import org.apache.ldap.server.schema.bootstrap.BootstrapSchemaLoader;
@@ -80,9 +66,6 @@
/** the configuration */
private StartupConfiguration configuration;
- /** the system partition used by the context factory */
- private SystemPartition systemPartition;
-
/** the registries for system schema objects */
private GlobalRegistries globalRegistries;
@@ -254,11 +237,6 @@
return configuration;
}
- public SystemPartition getSystemPartition()
- {
- return systemPartition;
- }
-
public GlobalRegistries getGlobalRegistries()
{
return globalRegistries;
@@ -504,148 +482,10 @@
throw e;
}
- // --------------------------------------------------------------------
- // Fire up the system partition
- // --------------------------------------------------------------------
-
- File workDir = configuration.getWorkingDirectory();
-
- LdapName suffix = new LdapName();
- suffix.add( SystemPartition.SUFFIX );
-
- BTreeContextPartition db = new JdbmBTreeContextPartition( suffix, suffix, workDir.getPath() );
- AttributeTypeRegistry attributeTypeRegistry = bootstrapRegistries .getAttributeTypeRegistry();
- OidRegistry oidRegistry = bootstrapRegistries.getOidRegistry();
- ExpressionEvaluator evaluator = new ExpressionEvaluator( db, oidRegistry, attributeTypeRegistry );
- ExpressionEnumerator enumerator = new ExpressionEnumerator( db, attributeTypeRegistry, evaluator );
- SearchEngine eng = new DefaultSearchEngine( db, evaluator, enumerator );
-
- AttributeType[] attributes = new AttributeType[]
- {
- attributeTypeRegistry.lookup( SystemPartition.ALIAS_OID ),
- attributeTypeRegistry.lookup( SystemPartition.EXISTANCE_OID ),
- attributeTypeRegistry.lookup( SystemPartition.HIERARCHY_OID ),
- attributeTypeRegistry.lookup( SystemPartition.NDN_OID ),
- attributeTypeRegistry.lookup( SystemPartition.ONEALIAS_OID ),
- attributeTypeRegistry.lookup( SystemPartition.SUBALIAS_OID ),
- attributeTypeRegistry.lookup( SystemPartition.UPDN_OID )
- };
-
- systemPartition = new SystemPartition( db, eng, attributes );
- globalRegistries = new GlobalRegistries( systemPartition, bootstrapRegistries );
- rootNexus = new RootNexus( systemPartition, new LockableAttributesImpl() );
+ rootNexus = new RootNexus( new LockableAttributesImpl() );
+ globalRegistries = new GlobalRegistries( rootNexus.getSystemPartition(), bootstrapRegistries );
interceptorChain = new InterceptorChain( configuration.getInterceptorConfigurations() );
- interceptorChain.init( new InterceptorContext( configuration, systemPartition, globalRegistries, rootNexus ) );
-
- // fire up the app partitions now!
- startUpAppPartitions();
- }
-
- /**
- * Starts up all the application partitions that will be attached to naming contexts in the system. Partition
- * database files are created within a subdirectory immediately under the Eve working directory base.
- *
- * @throws javax.naming.NamingException if there are problems creating and starting these new application
- * partitions
- */
- private void startUpAppPartitions() throws NamingException
- {
- OidRegistry oidRegistry = globalRegistries.getOidRegistry();
- AttributeTypeRegistry attributeTypeRegistry;
- attributeTypeRegistry = globalRegistries.getAttributeTypeRegistry();
- MatchingRuleRegistry reg = globalRegistries.getMatchingRuleRegistry();
-
- File workDir = configuration.getWorkingDirectory();
-
- Iterator i = configuration.getContextPartitionConfigurations().iterator();
- while( i.hasNext() )
- {
- ContextPartitionConfiguration cfg = ( ContextPartitionConfiguration ) i.next();
-
- // ----------------------------------------------------------------
- // create working directory under eve directory for app partition
- // ----------------------------------------------------------------
-
- File partitionWorkDir = new File( workDir.getPath() + File.separator + cfg.getName() );
- partitionWorkDir.mkdirs();
-
- // ----------------------------------------------------------------
- // create the database/store
- // ----------------------------------------------------------------
-
- Name upSuffix = new LdapName( cfg.getSuffix() );
- Normalizer dnNorm = reg.lookup( "distinguishedNameMatch" ) .getNormalizer();
- Name normSuffix = new LdapName( ( String ) dnNorm.normalize( cfg.getSuffix() ) );
- BTreeContextPartition db = new JdbmBTreeContextPartition( upSuffix, normSuffix, partitionWorkDir.getPath() );
-
- // ----------------------------------------------------------------
- // create the search engine using db, enumerators and evaluators
- // ----------------------------------------------------------------
-
- ExpressionEvaluator evaluator;
- evaluator = new ExpressionEvaluator( db, oidRegistry, attributeTypeRegistry );
- ExpressionEnumerator enumerator;
- enumerator = new ExpressionEnumerator( db, attributeTypeRegistry, evaluator );
- SearchEngine eng = new DefaultSearchEngine( db, evaluator, enumerator );
-
- // ----------------------------------------------------------------
- // fill up a list with the AttributeTypes for the system indices
- // ----------------------------------------------------------------
-
- ArrayList attributeTypeList = new ArrayList();
- attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.ALIAS_OID ) );
- attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.EXISTANCE_OID ) );
- attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.HIERARCHY_OID ) );
- attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.NDN_OID ) );
- attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.ONEALIAS_OID ) );
- attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.SUBALIAS_OID ) );
- attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.UPDN_OID ) );
-
- // ----------------------------------------------------------------
- // if user indices are specified add those attribute types as well
- // ----------------------------------------------------------------
-
- Iterator j = cfg.getIndexedAttributes().iterator();
- while( j.hasNext() )
- {
- String attribute = ( String ) j.next();
- attributeTypeList.add( attributeTypeRegistry
- .lookup( attribute ) );
- }
-
- // ----------------------------------------------------------------
- // fire up the appPartition & register it with the nexus
- // ----------------------------------------------------------------
-
- AttributeType[] indexTypes = ( AttributeType[] ) attributeTypeList
- .toArray( new AttributeType[attributeTypeList.size()] );
-
- ContextPartition partition = cfg.getContextPartition();
-
- if ( partition == null )
- {
- // If custom partition is not defined, use the ApplicationPartion.
- partition = new ApplicationPartition( db, eng, indexTypes );
- }
-
- // Initialize the partition
- try
- {
- partition.init( upSuffix, normSuffix );
- rootNexus.register( partition );
- }
- catch ( Exception e )
- {
- throw ( NamingException ) new NamingException(
- "Failed to initialize custom partition." ).initCause( e );
- }
-
- // ----------------------------------------------------------------
- // add the nexus context entry
- // ----------------------------------------------------------------
-
- partition.add( cfg.getSuffix(), normSuffix, cfg.getContextEntry() );
- }
+ interceptorChain.init( new InterceptorContext( configuration, rootNexus.getSystemPartition(), globalRegistries, rootNexus ) );
}
}
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/RootNexusProxy.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/RootNexusProxy.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/RootNexusProxy.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/RootNexusProxy.java Mon Jun 20 08:41:54 2005
@@ -28,6 +28,7 @@
import javax.naming.ldap.LdapContext;
import org.apache.ldap.common.filter.ExprNode;
+import org.apache.ldap.server.configuration.ContextPartitionConfiguration;
import org.apache.ldap.server.invocation.Add;
import org.apache.ldap.server.invocation.Delete;
import org.apache.ldap.server.invocation.GetMatchedDN;
@@ -44,7 +45,6 @@
import org.apache.ldap.server.invocation.Move;
import org.apache.ldap.server.invocation.MoveAndModifyRN;
import org.apache.ldap.server.invocation.Search;
-import org.apache.ldap.server.partition.ContextPartition;
import org.apache.ldap.server.partition.ContextPartitionNexus;
class RootNexusProxy implements ContextPartitionNexus
@@ -72,14 +72,6 @@
return ( Iterator ) this.provider.invoke( new ListSuffixes( normalized ) );
}
- public void register(ContextPartition partition) {
- this.provider.getRootNexus().register( partition );
- }
-
- public void unregister(ContextPartition partition) {
- this.provider.getRootNexus().unregister( partition );
- }
-
public void delete(Name name) throws NamingException {
this.provider.invoke( new Delete( name ) );
}
@@ -142,5 +134,20 @@
public boolean isInitialized() {
return this.provider.getRootNexus().isInitialized();
+ }
+
+ public void init( ContextFactoryConfiguration factoryCfg, ContextPartitionConfiguration cfg ) throws NamingException
+ {
+ throw new IllegalStateException();
+ }
+
+ public void destroy() throws NamingException
+ {
+ throw new IllegalStateException();
+ }
+
+ public Name getSuffix( boolean normalized )
+ {
+ return this.provider.getRootNexus().getSuffix( normalized );
}
}
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/RootNexus.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/RootNexus.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/RootNexus.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/RootNexus.java Mon Jun 20 08:41:54 2005
@@ -20,9 +20,11 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.naming.Name;
import javax.naming.NameNotFoundException;
@@ -46,8 +48,8 @@
import org.apache.ldap.common.name.LdapName;
import org.apache.ldap.common.util.SingletonEnumeration;
import org.apache.ldap.server.configuration.ContextPartitionConfiguration;
+import org.apache.ldap.server.configuration.MutableContextPartitionConfiguration;
import org.apache.ldap.server.jndi.ContextFactoryConfiguration;
-import org.apache.ldap.server.jndi.SystemPartition;
/**
@@ -91,10 +93,8 @@
*
* @see <a href="http://www.faqs.org/rfcs/rfc3045.html">Vendor Information</a>
*/
- public RootNexus( SystemPartition system, Attributes rootDSE )
+ public RootNexus( Attributes rootDSE )
{
- this.system = system;
-
// setup that root DSE
this.rootDSE = rootDSE;
Attribute attr = new LockableAttributeImpl( "subschemaSubentry" );
@@ -116,9 +116,6 @@
attr = new LockableAttributeImpl( VENDORNAME_ATTR );
attr.add( ASF );
rootDSE.put( attr );
-
- // register will add to the list of namingContexts as well
- register( this.system );
}
@@ -131,8 +128,29 @@
return;
}
- Iterator i = factoryCfg.getConfiguration().getContextPartitionConfigurations().iterator();
List initializedPartitions = new ArrayList();
+
+ // initialize system partition first
+ MutableContextPartitionConfiguration systemCfg = new MutableContextPartitionConfiguration();
+ system = new SystemPartition();
+ systemCfg.setName( "system" );
+ systemCfg.setSuffix( SystemPartition.SUFFIX );
+ systemCfg.setContextPartition( system );
+ Set indexedSystemAttrs = new HashSet();
+ indexedSystemAttrs.add( SystemPartition.ALIAS_OID );
+ indexedSystemAttrs.add( SystemPartition.EXISTANCE_OID );
+ indexedSystemAttrs.add( SystemPartition.HIERARCHY_OID );
+ indexedSystemAttrs.add( SystemPartition.NDN_OID );
+ indexedSystemAttrs.add( SystemPartition.ONEALIAS_OID );
+ indexedSystemAttrs.add( SystemPartition.SUBALIAS_OID );
+ indexedSystemAttrs.add( SystemPartition.UPDN_OID );
+ systemCfg.setIndexedAttributes( indexedSystemAttrs );
+
+ system.init( factoryCfg, systemCfg );
+ register( system );
+ initializedPartitions.add( system );
+
+ Iterator i = factoryCfg.getConfiguration().getContextPartitionConfigurations().iterator();
boolean success = false;
try
{
@@ -141,7 +159,11 @@
cfg = ( ContextPartitionConfiguration ) i.next();
ContextPartition partition = cfg.getContextPartition();
partition.init( factoryCfg, cfg );
- initializedPartitions.add( partition );
+ partition.add(
+ cfg.getSuffix(),
+ cfg.getNormalizedSuffix( factoryCfg.getGlobalRegistries().getMatchingRuleRegistry() ),
+ cfg.getContextEntry() );
+ initializedPartitions.add( 0, partition );
register( partition );
}
success = true;
@@ -154,6 +176,7 @@
while( i.hasNext() )
{
ContextPartition partition = ( ContextPartition ) i.next();
+ i.remove();
try
{
partition.destroy();
@@ -275,6 +298,11 @@
// BackendNexus Interface Method Implementations
// ------------------------------------------------------------------------
+
+ public SystemPartition getSystemPartition()
+ {
+ return system;
+ }
/**
* @see ContextPartitionNexus#getLdapContext()
Copied: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/SystemPartition.java (from r191472, directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/SystemPartition.java)
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/SystemPartition.java?p2=directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/SystemPartition.java&p1=directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/SystemPartition.java&r1=191472&r2=191493&rev=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/SystemPartition.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/SystemPartition.java Mon Jun 20 08:41:54 2005
@@ -14,21 +14,19 @@
* limitations under the License.
*
*/
-package org.apache.ldap.server.jndi;
+package org.apache.ldap.server.partition;
-import javax.naming.InvalidNameException;
import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import org.apache.ldap.common.message.LockableAttributesImpl;
import org.apache.ldap.common.name.LdapName;
-import org.apache.ldap.common.schema.AttributeType;
import org.apache.ldap.common.util.DateUtils;
import org.apache.ldap.common.util.NamespaceTools;
-import org.apache.ldap.server.partition.store.impl.btree.BTreeContextPartition;
-import org.apache.ldap.server.partition.store.impl.btree.BTreeContextPartition;
-import org.apache.ldap.server.partition.store.impl.btree.SearchEngine;
+import org.apache.ldap.server.configuration.ContextPartitionConfiguration;
+import org.apache.ldap.server.jndi.ContextFactoryConfiguration;
+import org.apache.ldap.server.partition.store.impl.btree.jdbm.JdbmContextPartition;
/**
@@ -39,7 +37,7 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public final class SystemPartition extends BTreeContextPartition
+public final class SystemPartition extends JdbmContextPartition
{
/** the default user principal or DN */
public final static String ADMIN_PRINCIPAL = "uid=admin,ou=system";
@@ -62,9 +60,6 @@
*/
public static final String SUFFIX = "ou=system" ;
- /** The suffix as a name. */
- private final Name suffix ;
-
// ------------------------------------------------------------------------
// S T A T I C M E T H O D S
@@ -152,35 +147,26 @@
* Creates the system partition which is used to store various peices of
* information critical for server operation. Things like the system
* catalog and other operational information like system users are
- * maintained within the context of this partition. Unlike other
- * ContextBackends which must have their suffix specified this one does
- * not since it will stay fixed at the following namingContext: ou=system.
- *
- * @param db the database used for this partition
- * @param searchEngine the search engine to conduct searches with
- * @param indexAttributes the attributeTypes of indicies to build which must
- * also contain all system index attribute types - if not the system will
- * not operate correctly.
+ * maintained within the context of this partition.
*/
- public SystemPartition( BTreeContextPartition db, SearchEngine searchEngine,
- AttributeType[] indexAttributes )
- throws NamingException
+ public SystemPartition()
{
- super( db, searchEngine, indexAttributes );
- suffix = new LdapName() ;
-
- try
- {
- suffix.add( SUFFIX ) ;
- }
- catch ( InvalidNameException e )
- {
- // Never thrown - name will always be valid!
- }
+ }
+
+ // ------------------------------------------------------------------------
+ // B A C K E N D M E T H O D S
+ // ------------------------------------------------------------------------
+
+ public void init( ContextFactoryConfiguration factoryCfg, ContextPartitionConfiguration cfg ) throws NamingException
+ {
+ super.init( factoryCfg, cfg );
+
+ Name suffix = cfg.getNormalizedSuffix( factoryCfg.getGlobalRegistries().getMatchingRuleRegistry() );
+
// add the root entry for the system root context if it does not exist
- Attributes attributes = db.getSuffixEntry() ;
- if ( null == attributes )
+ Attributes attributes = cfg.getContextEntry();
+ if( attributes == null || attributes.size() == 0 )
{
attributes = new LockableAttributesImpl() ;
attributes.put( "objectClass", "top" ) ;
@@ -190,39 +176,7 @@
attributes.put( NamespaceTools.getRdnAttribute( SUFFIX ),
NamespaceTools.getRdnValue( SUFFIX ) ) ;
- getDb().add( SUFFIX, suffix, attributes ) ;
+ add( suffix.toString(), suffix, attributes ) ;
}
- }
-
-
- // ------------------------------------------------------------------------
- // B A C K E N D M E T H O D S
- // ------------------------------------------------------------------------
-
- public final void init( Name upSuffix, Name normalizedSuffix )
- {
- // This method may not be called.
- throw new IllegalStateException( "SystemPartition is already initialized." );
- }
-
- /**
- * @see org.apache.ldap.server.partition.ContextPartition#getSuffix(boolean)
- */
- public final Name getSuffix( boolean normalized )
- {
- /*
- * The suffix is presummed to be both the normalized and the user
- * provided form so we do not need to take a_normalized into account.
- */
- return ( Name ) suffix.clone() ;
- }
-
-
- /**
- * @see org.apache.ldap.server.partition.ContextPartition#isSuffix(javax.naming.Name)
- */
- public final boolean isSuffix( Name dn )
- {
- return SUFFIX.equals( dn.toString() ) ;
}
}
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/BTreeContextPartition.java Mon Jun 20 08:41:54 2005
@@ -142,7 +142,6 @@
sysOidSet.add( SUBALIAS_OID );
sysOidSet.add( ALIAS_OID );
-
Iterator i = cfg.getIndexedAttributes().iterator();
while( i.hasNext() )
{
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/jdbm/JdbmContextPartition.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/jdbm/JdbmContextPartition.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/jdbm/JdbmContextPartition.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/store/impl/btree/jdbm/JdbmContextPartition.java Mon Jun 20 08:41:54 2005
@@ -48,7 +48,7 @@
import org.apache.ldap.common.schema.Normalizer;
import org.apache.ldap.common.util.NamespaceTools;
import org.apache.ldap.server.configuration.ContextPartitionConfiguration;
-import org.apache.ldap.server.configuration.StartupConfiguration;
+import org.apache.ldap.server.jndi.ContextFactoryConfiguration;
import org.apache.ldap.server.partition.ContextPartition;
import org.apache.ldap.server.partition.store.impl.btree.BTreeContextPartition;
import org.apache.ldap.server.partition.store.impl.btree.Index;
@@ -112,12 +112,12 @@
{
}
- public synchronized void init( StartupConfiguration factoryCfg, ContextPartitionConfiguration cfg ) throws NamingException
+ public synchronized void init( ContextFactoryConfiguration factoryCfg, ContextPartitionConfiguration cfg ) throws NamingException
{
this.upSuffix = new LdapName( cfg.getSuffix() );
- this.normSuffix = cfg.getNormalizedSuffix();
+ this.normSuffix = cfg.getNormalizedSuffix( factoryCfg.getGlobalRegistries().getMatchingRuleRegistry() );
- this.workingDirectory = factoryCfg.getWorkingDirectory();
+ this.workingDirectory = factoryCfg.getConfiguration().getWorkingDirectory();
try
{
@@ -137,6 +137,8 @@
master = new JdbmMasterTable( recMan );
indices = new HashMap();
sysIndices = new HashMap();
+
+ super.init( factoryCfg, cfg );
initialized = true;
}
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalAttributeTypeRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalAttributeTypeRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalAttributeTypeRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalAttributeTypeRegistry.java Mon Jun 20 08:41:54 2005
@@ -25,7 +25,7 @@
import org.apache.ldap.common.schema.AttributeType;
import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapAttributeTypeRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalComparatorRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalComparatorRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalComparatorRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalComparatorRegistry.java Mon Jun 20 08:41:54 2005
@@ -23,7 +23,7 @@
import javax.naming.NamingException;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapComparatorRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitContentRuleRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitContentRuleRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitContentRuleRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitContentRuleRegistry.java Mon Jun 20 08:41:54 2005
@@ -25,7 +25,7 @@
import org.apache.ldap.common.schema.DITContentRule;
import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapDitContentRuleRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitStructureRuleRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitStructureRuleRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitStructureRuleRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitStructureRuleRegistry.java Mon Jun 20 08:41:54 2005
@@ -25,7 +25,7 @@
import org.apache.ldap.common.schema.DITStructureRule;
import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapDitStructureRuleRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleRegistry.java Mon Jun 20 08:41:54 2005
@@ -25,7 +25,7 @@
import org.apache.ldap.common.schema.MatchingRule;
import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapMatchingRuleRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleUseRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleUseRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleUseRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleUseRegistry.java Mon Jun 20 08:41:54 2005
@@ -25,7 +25,7 @@
import org.apache.ldap.common.schema.MatchingRuleUse;
import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapMatchingRuleUseRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNameFormRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNameFormRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNameFormRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNameFormRegistry.java Mon Jun 20 08:41:54 2005
@@ -25,7 +25,7 @@
import org.apache.ldap.common.schema.NameForm;
import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapNameFormRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNormalizerRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNormalizerRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNormalizerRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNormalizerRegistry.java Mon Jun 20 08:41:54 2005
@@ -23,7 +23,7 @@
import javax.naming.NamingException;
import org.apache.ldap.common.schema.Normalizer;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapNormalizerRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalObjectClassRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalObjectClassRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalObjectClassRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalObjectClassRegistry.java Mon Jun 20 08:41:54 2005
@@ -25,7 +25,7 @@
import org.apache.ldap.common.schema.ObjectClass;
import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapObjectClassRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java Mon Jun 20 08:41:54 2005
@@ -25,7 +25,7 @@
import javax.naming.NamingException;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapOidRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalRegistries.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalRegistries.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalRegistries.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalRegistries.java Mon Jun 20 08:41:54 2005
@@ -27,7 +27,7 @@
import org.apache.ldap.common.schema.MatchingRule;
import org.apache.ldap.common.schema.ObjectClass;
import org.apache.ldap.common.schema.Syntax;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapAttributeTypeRegistry;
import org.apache.ldap.server.schema.bootstrap.BootstrapComparatorRegistry;
import org.apache.ldap.server.schema.bootstrap.BootstrapDitContentRuleRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java Mon Jun 20 08:41:54 2005
@@ -23,7 +23,7 @@
import javax.naming.NamingException;
import org.apache.ldap.common.schema.SyntaxChecker;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapSyntaxCheckerRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java Mon Jun 20 08:41:54 2005
@@ -25,7 +25,7 @@
import org.apache.ldap.common.schema.Syntax;
import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.jndi.SystemPartition;
+import org.apache.ldap.server.partition.SystemPartition;
import org.apache.ldap.server.schema.bootstrap.BootstrapSyntaxRegistry;
Modified: directory/apacheds/branches/db_refactor/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsAdminTest.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsAdminTest.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsAdminTest.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsAdminTest.java Mon Jun 20 08:41:54 2005
@@ -24,11 +24,11 @@
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
import org.apache.ldap.common.exception.LdapNoPermissionException;
import org.apache.ldap.common.message.LockableAttributesImpl;
import org.apache.ldap.server.AbstractAdminTestCase;
-import org.apache.ldap.server.partition.store.impl.btree.BTreeContextPartitionSearchResult;
/**
@@ -110,7 +110,7 @@
while ( list.hasMore() )
{
- BTreeContextPartitionSearchResult result = ( BTreeContextPartitionSearchResult ) list.next();
+ SearchResult result = ( SearchResult ) list.next();
set.add( result.getName() );
}
Modified: directory/apacheds/branches/db_refactor/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java?rev=191493&r1=191492&r2=191493&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java Mon Jun 20 08:41:54 2005
@@ -24,11 +24,11 @@
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
import org.apache.ldap.common.exception.LdapNoPermissionException;
import org.apache.ldap.common.message.LockableAttributesImpl;
import org.apache.ldap.server.AbstractNonAdminTestCase;
-import org.apache.ldap.server.partition.store.impl.btree.BTreeContextPartitionSearchResult;
/**
@@ -110,7 +110,7 @@
"(objectClass=*)", controls );
while ( list.hasMore() )
{
- BTreeContextPartitionSearchResult result = ( BTreeContextPartitionSearchResult ) list.next();
+ SearchResult result = ( SearchResult ) list.next();
set.add( result.getName() );
}