directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r582462 [1/10] - in /directory: apacheds/branches/bigbang/ apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/ apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/ apacheds...
Date Sat, 06 Oct 2007 06:48:45 GMT
Author: akarasulu
Date: Fri Oct  5 23:48:35 2007
New Revision: 582462

URL: http://svn.apache.org/viewvc?rev=582462&view=rev
Log:
This is big step on the way to fixing all the configuration issues.  
It removes all the configuration objects from the core
minus one property editor thingy.  So all that's left are the config 
beans for the protocol providers.


Added:
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateITest.java   (contents, props changed)
      - copied, changed from r581137, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateTest.java
    directory/apacheds/branches/bigbang/interceptor-kerberos/   (with props)
    directory/apacheds/branches/bigbang/interceptor-kerberos/pom.xml
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java
      - copied, changed from r581137, directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyService.java
      - copied, changed from r581137, directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyService.java
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/resources/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/resources/META-INF/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/test/
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/test/java/
    directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
Removed:
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateTest.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryServiceConfiguration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DirectoryServiceConfiguration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DirectoryServiceListener.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/AddPartitionConfiguration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/Configuration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/ConfigurationException.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/RemovePartitionConfiguration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/ShutdownConfiguration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/
    directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
    directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java
Modified:
    directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
    directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759ITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/ShutdownITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SyncITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ServerPreferencesFactoryITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ServerSystemPreferencesITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryITest.java
    directory/apacheds/branches/bigbang/core/pom.xml
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DirectoryService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AnonymousAuthenticator.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyOperationContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/AbstractContextFactory.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    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/PartitionNexusProxy.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/prefs/ServerPreferencesFactory.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
    directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/apacheds/branches/bigbang/kerberos-shared/pom.xml
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/JndiPrincipalStoreImpl.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/DefaultReplicationContext.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationContext.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationLogCleanJob.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationProtocolHandler.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/ReplicationStore.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java
    directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java
    directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java
    directory/apacheds/branches/bigbang/pom.xml
    directory/apacheds/branches/bigbang/protocol-dns/pom.xml
    directory/apacheds/branches/bigbang/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/JndiRecordStoreImpl.java
    directory/apacheds/branches/bigbang/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/MultiBaseSearch.java
    directory/apacheds/branches/bigbang/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/SingleBaseSearch.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapConfiguration.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/AbstractSaslCallbackHandler.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/BindHandlerChain.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/CramMd5CallbackHandler.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/CramMd5MechanismHandler.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/DigestMd5CallbackHandler.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/DigestMd5MechanismHandler.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/GssapiCallbackHandler.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/GssapiMechanismHandler.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/HandleSasl.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java
    directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java
    directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/ServiceConfiguration.java
    directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
    directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/diagnosticcmd/DiagnosticCommandExecutor.java
    directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/DisconnectNotificationCommandExecutor.java
    directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
    directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java
    directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/gracefulshutdowncmd/GracefulShutdownCommandExecutor.java
    directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/importcmd/ImportCommandExecutor.java
    directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/storedprocedurecmd/StoredProcedureCommandExecutor.java
    directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/execution/BaseToolCommandExecutor.java
    directory/apacheds/branches/bigbang/server-unit/pom.xml
    directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java
    directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/AddITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/FastSearchTest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NegationOperatorITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NtpITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchTest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/StoredProcedureExecutionITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java
    directory/apacheds/branches/bigbang/server-xml/src/test/java/org/apache/directory/server/SpringServerTest.java
    directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java

Modified: directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java Fri Oct  5 23:48:35 2007
@@ -20,7 +20,8 @@
 package org.apache.directory.server.core.unit;
 
 
-import org.apache.directory.server.core.partition.Partition;
+import org.apache.directory.server.core.DefaultDirectoryService;
+import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.impl.btree.Index;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
@@ -98,18 +99,19 @@
 public class AbstractPerformanceTest extends AbstractTestCase
 {
     private final Class<?> subclass;
-    private boolean isExternal = false;
-    private String prepareCommand = null;
-    private File outputDirectory = null;
-    private PrintWriter statsOut = null;
-    private long startTime = 0;
+    private boolean isExternal;
+    private String prepareCommand;
+    private PrintWriter statsOut;
+    private long startTime;
     private LdapContext testRoot;
+    private DirectoryService service;
     
     
     /**
      * Initializes the statistics log PrintWriter.
      * 
-     * @param subclass 
+     * @param subclass the subclass to use for the name
+     * @throws IOException if there are problems setting up for this test
      */
     protected AbstractPerformanceTest( Class<?> subclass ) throws IOException
     {
@@ -117,7 +119,7 @@
         this.subclass = subclass;
         
         // Setup the statistics output writer
-        outputDirectory = new File( System.getProperty( "outputDirectory", "." ) );
+        File outputDirectory = new File( System.getProperty( "outputDirectory", "." ) );
         File statsOutFile = new File( outputDirectory, subclass.getName() + ".stats" );
         statsOut = new PrintWriter( new FileWriter( statsOutFile ) );
         
@@ -151,13 +153,15 @@
             partition.setId( "test" );
             partition.setSuffix( "ou=test" );
             partition.setContextEntry( attributes );
-            
-            configuration.setShutdownHookEnabled( false );
-            configuration.setPartitions( Collections.singleton( partition ) );
+
+            service = new DefaultDirectoryService();
+            service.setShutdownHookEnabled( false );
+            service.setPartitions( Collections.singleton( partition ) );
 
             super.setUp();
             
-            Hashtable<String, Object> env = new Hashtable<String, Object>( configuration.toJndiEnvironment() );
+            Hashtable<String, Object> env = new Hashtable<String, Object>();
+            env.put( DirectoryService.JNDI_KEY, service );
             env.put( Context.SECURITY_PRINCIPAL, username );
             env.put( Context.SECURITY_CREDENTIALS, password );
             env.put( Context.SECURITY_AUTHENTICATION, "simple" );

Modified: directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java Fri Oct  5 23:48:35 2007
@@ -20,34 +20,26 @@
 package org.apache.directory.server.core.unit;
 
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.naming.ldap.InitialLdapContext;
-import javax.naming.ldap.LdapContext;
-
 import junit.framework.TestCase;
-
 import org.apache.commons.io.FileUtils;
+import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.configuration.Configuration;
-import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
-import org.apache.directory.server.core.configuration.ShutdownConfiguration;
-import org.apache.directory.server.core.configuration.SyncConfiguration;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
 
 
 /**
@@ -58,6 +50,8 @@
  */
 public abstract class AbstractTestCase extends TestCase
 {
+    public static final Logger LOG = LoggerFactory.getLogger( AbstractTestCase.class );
+
     public static final String LDIF = 
     	"dn: uid=akarasulu,ou=users,ou=system\n" + 
     	"cn: Alex Karasulu\n" +
@@ -93,8 +87,6 @@
     /** flag whether to delete database files for each test or not */
     protected boolean doDelete = true;
 
-    protected MutableStartupConfiguration configuration = new MutableStartupConfiguration();
-
     /** A testEntries of entries as Attributes to add to the DIT for testing */
     protected List<Entry> testEntries = new ArrayList<Entry>();
 
@@ -107,9 +99,11 @@
     private Hashtable<String,Object> overrides = new Hashtable<String,Object>();
 
     protected Registries registries;
-    
 
-    protected AbstractTestCase(String username, String password)
+    protected DirectoryService service;
+
+
+    protected AbstractTestCase( String username, String password )
     {
         if ( username == null || password == null )
         {
@@ -118,6 +112,7 @@
 
         this.username = username;
         this.password = password;
+        this.service = new DefaultDirectoryService();
     }
 
 
@@ -180,27 +175,28 @@
             File ldifFile = new File( ldifPath );
             if ( ldifFile.exists() )
             {
+                //noinspection UnusedAssignment
                 in = new FileInputStream( ldifPath );
             }
             else
             {
+                //noinspection UnusedAssignment
                 in = getClass().getResourceAsStream( ldifPath );
             }
             throw new FileNotFoundException( ldifPath );
         }
-        else if ( loadClass != null && ldifPath != null )
+        else if ( loadClass != null )
         {
             in = loadClass.getResourceAsStream( ldifPath );
         }
 
         if ( in != null )
         {
-            Iterator list = new LdifReader( in );
+            Iterator<Entry> list = new LdifReader( in );
             
             while ( list.hasNext() )
             {
-                entry = ( Entry ) list.next();
-                
+                entry = list.next();
                 testEntries.add( entry );
             }
         }
@@ -209,27 +205,36 @@
         // Add key for extra entries to the testEntries of extras
         // -------------------------------------------------------------------
 
-        configuration.setTestEntries( testEntries );
-        configuration.setShutdownHookEnabled( false );
-        doDelete( configuration.getWorkingDirectory() );
-        setContextRoots( username, password, configuration );
-        registries = DirectoryService.getInstance().getConfiguration().getRegistries();
+        service.setTestEntries( testEntries );
+        service.setShutdownHookEnabled( false );
+        doDelete( service.getWorkingDirectory() );
+        service.startup();
+        setContextRoots( username, password );
+        registries = service.getRegistries();
     }
 
     
     /**
      * Restarts the server without loading data when it has been shutdown.
+     * @throws NamingException if the restart fails
      */
     protected void restart() throws NamingException
     {
-        configuration = new MutableStartupConfiguration();
-        configuration.setShutdownHookEnabled( false );
-        setContextRoots( username, password, configuration );
+        if ( service == null )
+        {
+            service = new DefaultDirectoryService();
+        }
+        service.setShutdownHookEnabled( false );
+        service.startup();
+        setContextRoots( username, password );
     }
     
 
     /**
-     * Deletes the Eve working directory.
+     * Deletes the working directory.
+     *
+     * @param wkdir the working directory to delete
+     * @throws IOException if the working directory cannot be deleted
      */
     protected void doDelete( File wkdir ) throws IOException
     {
@@ -237,7 +242,14 @@
         {
             if ( wkdir.exists() )
             {
-                FileUtils.deleteDirectory( wkdir );
+                try
+                {
+                    FileUtils.deleteDirectory( wkdir );
+                }
+                catch ( IOException e )
+                {
+                    LOG.error( "Failed to delete the working directory.", e );
+                }
             }
             if ( wkdir.exists() )
             {
@@ -256,9 +268,10 @@
      * @param passwd the password of the user
      * @throws NamingException if there is a failure of any kind
      */
-    protected void setContextRoots( String user, String passwd, Configuration cfg ) throws NamingException
+    protected void setContextRoots( String user, String passwd ) throws NamingException
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put(  DirectoryService.JNDI_KEY, service );
         env.put( Context.SECURITY_PRINCIPAL, user );
         env.put( Context.SECURITY_CREDENTIALS, passwd );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
@@ -290,6 +303,8 @@
         adminEnv.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         adminEnv.put( Context.SECURITY_CREDENTIALS, "secret" );
         adminEnv.put( Context.SECURITY_AUTHENTICATION, "simple" );
+        adminEnv.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
+        adminEnv.put( DirectoryService.JNDI_KEY, service );
         new InitialLdapContext( adminEnv, null );
 
         // OK, now let's get an appropriate context.
@@ -306,6 +321,8 @@
     /**
      * Overrides default JNDI environment properties.  Please call this method
      * to override any JNDI environment properties this test case will set.
+     * @param key the key of the hashtable entry to add to the environment
+     * @param value the value of the hashtable entry to add to the environment
      */
     protected void overrideEnvironment( String key, Object value )
     {
@@ -324,21 +341,13 @@
      */
     protected void shutdown()
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>();
-
-        env.put( Context.PROVIDER_URL, "ou=system" );
-        env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
-        env.putAll( new ShutdownConfiguration().toJndiEnvironment() );
-        env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
-        env.put( Context.SECURITY_CREDENTIALS, "secret" );
-        env.put( Context.SECURITY_AUTHENTICATION, "simple" );
-
         try
         {
-            new InitialContext( env );
+            service.shutdown();
         }
         catch ( Exception e )
         {
+            LOG.error( "Encountered an error while shutting down directory service.", e );
         } 
         sysRoot = null;
         Runtime.getRuntime().gc();
@@ -350,21 +359,13 @@
      */
     protected void sync()
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>();
-
-        env.put( Context.PROVIDER_URL, "ou=system" );
-        env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
-        env.putAll( new SyncConfiguration().toJndiEnvironment() );
-        env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
-        env.put( Context.SECURITY_CREDENTIALS, "secret" );
-        env.put( Context.SECURITY_AUTHENTICATION, "simple" );
-
         try
         {
-            new InitialContext( env );
+            service.sync();
         }
         catch ( Exception e )
         {
+            LOG.warn( "Encountered error while syncing.", e );
         } 
     }
 
@@ -382,8 +383,8 @@
         ldifPath = null;
         loadClass = null;
         overrides.clear();
-        configuration = new MutableStartupConfiguration();
-        doDelete( configuration.getWorkingDirectory() );
+        service = new DefaultDirectoryService();
+        doDelete( service.getWorkingDirectory() );
     }
 
 
@@ -396,17 +397,17 @@
     /**
      * Inject an ldif String into the server. DN must be relative to the
      * root.
+     * 
+     * @param ldif the ldif containing entries to add to the server.
+     * @throws NamingException if there is a problem adding the entries from the LDIF
      */
     protected void injectEntries( String ldif ) throws NamingException
     {
         LdifReader reader = new LdifReader();
         List<Entry> entries = reader.parseLdif( ldif );
-        
-        Iterator<Entry> entryIter = entries.iterator(); 
-        
-        while ( entryIter.hasNext() )
+
+        for ( Entry entry : entries )
         {
-            Entry entry = entryIter.next();
             rootDSE.createSubcontext( new LdapDN( entry.getDn() ), entry.getAttributes() );
         }
     }

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java Fri Oct  5 23:48:35 2007
@@ -74,7 +74,7 @@
             indices.addAll( partition.getIndexedAttributes() );
             indices.add( new JdbmIndex( "gidNumber" ) );
             partition.setIndexedAttributes( indices );
-            configuration.setSystemPartition( partition );
+            service.setSystemPartition( partition );
         }
         
         super.setUp();
@@ -115,6 +115,11 @@
     /**
      *  Convenience method that performs a one level search using the 
      *  specified filter returning their DNs as Strings in a set.
+     *
+     * @param controls the search controls
+     * @param filter the filter expression
+     * @return the set of groups
+     * @throws NamingException if there are problems conducting the search
      */
     public Set<String> searchGroups( String filter, SearchControls controls ) throws NamingException
     {
@@ -139,8 +144,12 @@
     /**
      *  Convenience method that performs a one level search using the 
      *  specified filter returning their DNs as Strings in a set.
+     *
+     * @param filter the filter expression
+     * @return the set of group names
+     * @throws NamingException if there are problems conducting the search
      */
-    public Set searchGroups( String filter ) throws NamingException
+    public Set<String> searchGroups( String filter ) throws NamingException
     {
         return searchGroups( filter, null );
     }

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java Fri Oct  5 23:48:35 2007
@@ -20,9 +20,13 @@
 package org.apache.directory.server.core.authn;
 
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Hashtable;
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
+import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
+import org.apache.directory.shared.ldap.util.ArrayUtils;
 
 import javax.naming.ConfigurationException;
 import javax.naming.Context;
@@ -33,13 +37,9 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
 import javax.naming.ldap.InitialLdapContext;
-
-import org.apache.directory.server.core.unit.AbstractAdminTestCase;
-import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
-import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
-import org.apache.directory.shared.ldap.util.ArrayUtils;
+import java.io.File;
+import java.io.IOException;
+import java.util.Hashtable;
 
 
 /**
@@ -53,7 +53,7 @@
 {
     /**
      * Cleans up old database files on creation.
-     * @throws IOException
+     * @throws IOException if we cannot delete some working directories
      */
     public SimpleAuthenticationITest() throws IOException
     {
@@ -138,7 +138,8 @@
 
     public void test3UseAkarasulu() throws NamingException
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -179,10 +180,12 @@
     {
         // clean out the database
         tearDown();
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.SECURITY_AUTHENTICATION, "none" );
+        service.setAllowAnonymousAccess( false );
+        service.startup();
 
-        configuration.setAllowAnonymousAccess( false );
         try
         {
             setContextRoots( env );
@@ -194,17 +197,18 @@
         tearDown();
 
         // ok this should start up the system now as admin
-        env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.SECURITY_AUTHENTICATION, "none" );
-        configuration.setAllowAnonymousAccess( true );
+        service.setAllowAnonymousAccess( true );
+        service.startup();
 
         setContextRoots( env );
         assertNotNull( sysRoot );
 
-        // now go in as anonymous user and we should be wh
+        // now go in as anonymous user and we should be ok
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
-
         InitialLdapContext initial = new InitialLdapContext( env, null );
 
         try
@@ -236,9 +240,11 @@
         // clean out the database
         tearDown();
         doDelete( new File( "target" + File.separator + "eve" ) );
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.SECURITY_AUTHENTICATION, "none" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
+        service.startup();
 
         try
         {
@@ -265,9 +271,11 @@
         // clean out the database
         tearDown();
         doDelete( new File( "target" + File.separator + "eve" ) );
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
+        service.startup();
 
         try
         {
@@ -288,7 +296,8 @@
      */
     public void test8PassPrincAuthTypeSimple() throws Exception
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -306,7 +315,8 @@
      */
     public void test10TestNonAdminUser() throws Exception
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -318,7 +328,8 @@
 
     public void test11InvalidateCredentialCache() throws NamingException
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -392,7 +403,8 @@
 
     public void testSHA() throws NamingException
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -444,7 +456,8 @@
 
     public void testSSHA() throws NamingException
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -494,9 +507,11 @@
         assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
     }
 
+
     public void testMD5() throws NamingException
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -546,9 +561,11 @@
         assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
     }
 
+
     public void testSMD5() throws NamingException
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -600,7 +617,8 @@
 
     public void testCRYPT() throws NamingException
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, super.service );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -651,12 +669,14 @@
     }
     
     /**
-     * @see https://issues.apache.org/jira/browse/DIRSERVER-1001
+     * @see <a ref="https://issues.apache.org/jira/browse/DIRSERVER-1001"/>
+     * @throws NamingException on errors
      */
     public void testInvalidateCredentialCacheForUpdatingAnotherUsersPassword() throws NamingException
     {
         // bind as akarasulu
-        Hashtable<String,Object> envUser = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> envUser = new Hashtable<String,Object>();
+        envUser.put( DirectoryService.JNDI_KEY, super.service );
         envUser.put( Context.PROVIDER_URL, "ou=system" );
         envUser.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         envUser.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -666,7 +686,8 @@
         idcUser.close();
         
         // bind as admin
-        Hashtable<String,Object> envAdmin = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> envAdmin = new Hashtable<String,Object>();
+        envAdmin.put( DirectoryService.JNDI_KEY, super.service );
         envAdmin.put( Context.PROVIDER_URL, "ou=system" );
         envAdmin.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         envAdmin.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -684,7 +705,7 @@
         envUser.put( Context.SECURITY_CREDENTIALS, "test" );
         try
         {
-            idcUser = new InitialDirContext( envUser );
+            new InitialDirContext( envUser );
             fail( "Authentication with old password should fail" );
         }
         catch ( NamingException e )

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java Fri Oct  5 23:48:35 2007
@@ -20,6 +20,7 @@
 package org.apache.directory.server.core.authz;
 
 
+import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.subtree.SubentryService;
 import org.apache.directory.server.core.unit.AbstractTestCase;
@@ -28,13 +29,12 @@
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
-import javax.naming.NamingException;
 import javax.naming.Name;
+import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
-
 import java.util.Hashtable;
 
 
@@ -58,7 +58,7 @@
     public AbstractAuthorizationITest()
     {
         super( PartitionNexus.ADMIN_PRINCIPAL, "secret" );
-        super.configuration.setAccessControlEnabled( true );
+        super.service.setAccessControlEnabled( true );
     }
 
 
@@ -95,6 +95,8 @@
         env.put( DirContext.SECURITY_AUTHENTICATION, "simple" );
         env.put( DirContext.SECURITY_PRINCIPAL, PartitionNexus.ADMIN_PRINCIPAL );
         env.put( DirContext.SECURITY_CREDENTIALS, "secret" );
+        env.put( DirContext.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
+        env.put( DirectoryService.JNDI_KEY, service );
         return new InitialDirContext( env );
     }
 
@@ -169,6 +171,10 @@
      * Creates a simple groupOfUniqueNames under the ou=groups,ou=system
      * container.  The admin user is always a member of this newly created 
      * group.
+     *
+     * @param groupName the name of the cgroup to create
+     * @return the DN of the group as a Name object
+     * @throws NamingException if the group cannot be created
      */
     public Name createGroup( String groupName ) throws NamingException
     {
@@ -246,6 +252,8 @@
         env.put( DirContext.SECURITY_AUTHENTICATION, "simple" );
         env.put( DirContext.SECURITY_PRINCIPAL, user.toString() );
         env.put( DirContext.SECURITY_CREDENTIALS, password );
+        env.put( DirContext.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
+        env.put( DirectoryService.JNDI_KEY, service );
         return new InitialDirContext( env );
     }
 
@@ -344,8 +352,10 @@
     /**
      * Replaces values of an prescriptiveACI attribute of a subentry subordinate
      * to ou=system.
-     * @throws NamingException 
      *
+     * @param cn the common name of the aci subentry
+     * @param aciItem the new value for the ACI item
+     * @throws NamingException if the modify fails
      */
     public void changePresciptiveACI( String cn, String aciItem ) throws NamingException
     {

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupITest.java Fri Oct  5 23:48:35 2007
@@ -39,7 +39,7 @@
     {
         if ( getName().equals( "testDefaultNonAdminReadAccessToGroups" ) )
         {
-            configuration.setAccessControlEnabled( false );
+            service.setAccessControlEnabled( false );
         }
         
         super.setUp();

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnITest.java Fri Oct  5 23:48:35 2007
@@ -20,11 +20,12 @@
 package org.apache.directory.server.core.authz;
 
 
-import javax.naming.NamingException;
-
+import junit.framework.Assert;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
+import javax.naming.NamingException;
+
 
 /**
  * Tests whether or not authentication with authorization works properly.
@@ -76,7 +77,7 @@
         }
         catch ( LdapNoPermissionException e )
         {
-            
+            Assert.assertNotNull( e ); 
         }
     }
     

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java Fri Oct  5 23:48:35 2007
@@ -21,6 +21,7 @@
 
 
 import junit.framework.Assert;
+import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
@@ -35,8 +36,7 @@
 
 
 /**
- * Tests {@link AddPartitionConfiguration} and
- * {@link RemovePartitionConfiguration} works correctly.
+ * Tests dynamic partition addition and removal.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
@@ -59,19 +59,19 @@
         partition.setContextEntry( ctxEntry );
 
         // Test AddContextPartition
-        AddPartitionConfiguration addCfg = new AddPartitionConfiguration( partition );
+        service.addPartition( partition );
 
         Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
-        env.putAll( addCfg.toJndiEnvironment() );
-
+        env.put( DirectoryService.JNDI_KEY, service );
+        env.put( Context.SECURITY_CREDENTIALS, "secret" );
+        env.put( Context.SECURITY_AUTHENTICATION, "simple" );
+        env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         Context ctx = new InitialContext( env );
         Assert.assertNotNull( ctx.lookup( "ou=removable" ) );
 
         // Test removeContextPartition
-        RemovePartitionConfiguration removeCfg = new RemovePartitionConfiguration( "ou=removable" );
-        env.putAll( removeCfg.toJndiEnvironment() );
-
+        service.removePartition( partition );
         ctx = new InitialContext( env );
         try
         {

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java Fri Oct  5 23:48:35 2007
@@ -20,19 +20,14 @@
 package org.apache.directory.server.core.jndi;
 
 
+import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
-import org.apache.directory.server.core.jndi.CoreContextFactory;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 
-import javax.naming.directory.Attributes;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.SearchResult;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.NamingEnumeration;
 import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.directory.*;
 import java.util.Hashtable;
 
 
@@ -73,7 +68,8 @@
 
     public void testSearchResultNameIsRelativeToSearchContext() throws Exception
     {
-        Hashtable<String,Object> env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 
@@ -108,10 +104,13 @@
     /**
      * Search over binary attributes now should work via the core JNDI 
      * provider.
+     *
+     * @throws Exception if there are errors
      */
     public void testPasswordComparisonSucceeds() throws Exception
     {
-        Hashtable<String,Object> env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759ITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759ITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759ITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759ITest.java Fri Oct  5 23:48:35 2007
@@ -47,7 +47,7 @@
     {
         if ( this.getName().equals( "testOpAttrDenormalizationOn" ) )
         {
-            super.configuration.setDenormalizeOpAttrsEnabled( true );
+            super.service.setDenormalizeOpAttrsEnabled( true );
         }
         
         super.setUp();

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java Fri Oct  5 23:48:35 2007
@@ -19,23 +19,18 @@
  */
 package org.apache.directory.server.core.jndi;
 
-import java.util.Hashtable;
-
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-
+import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 
+import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.*;
+import java.util.Hashtable;
+
 /**
  * Tries to demonstrate DIRSERVER-783 ("Adding another value to an attribute
  * results in the value to be added twice").
@@ -53,6 +48,8 @@
 
     /**
      * Try to add entry with required attribute missing.
+     * 
+     * @throws NamingException if there are errors
      */
     public void testAddAnotherValueToAnAttribute() throws NamingException
     {
@@ -68,7 +65,8 @@
 
         String rdn = "cn=Fiona Apple";
 
-        Hashtable<String,Object> env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = new Hashtable<String, Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 
@@ -109,10 +107,7 @@
         while (enm.hasMore()) 
         {
             SearchResult sr = (SearchResult) enm.next();
-
-            attrs = sr.getAttributes();
             Attribute desc = sr.getAttributes().get("description");
-
             assertNotNull(desc);
             assertTrue(desc.contains(description1));
             assertTrue(desc.contains(description2));

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java Fri Oct  5 23:48:35 2007
@@ -19,23 +19,17 @@
  */
 package org.apache.directory.server.core.jndi;
 
-import java.util.Hashtable;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.InvalidAttributeIdentifierException;
-import javax.naming.directory.InvalidAttributeValueException;
-import javax.naming.directory.SchemaViolationException;
-
+import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.directory.*;
+import java.util.Hashtable;
+
 /**
  * A test case which demonstrates the three defects described in DIRSERVER-791.
  * 
@@ -45,6 +39,7 @@
 {
     /**
      * Returns the attributes as depicted as test data in DIRSERVER-791
+     * @return attributes for the test entry
      */
     protected Attributes getTestEntryAttributes() {
 
@@ -74,14 +69,18 @@
         sysRoot.createSubcontext("cn=test", entry);
     }
 
+    
     /**
      * Demonstrates that removal of a value from RDN attribute which is not part
      * of the RDN is not possible.
+     *
+     * @throws NamingException on error
      */
     public void testDefect1a() throws NamingException 
     {
 
-        Hashtable<String,Object> env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 
@@ -98,13 +97,17 @@
         assertFalse( cn.contains("aaa") );
     }
 
+
     /**
      * Checks whether it is possible to replace the cn attribute with a single
      * value. The JIRA issue states that this one works.
+     *
+     * @throws NamingException on error
      */
     public void testDefect1b() throws NamingException 
     {
-        Hashtable<String,Object> env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 
@@ -122,14 +125,18 @@
         assertFalse(cn.contains("aaa"));
     }
 
+
     /**
      * It is possible to add an value to objectclass, which isn't a valid
      * objectclass. The server returns an error, but nevertheless the invalid
      * value is stored. I think this should be rejected from server.
+     *
+     * @throws NamingException on error
      */
     public void testDefect2() throws NamingException 
     {
-        Hashtable<String,Object> env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 
@@ -168,13 +175,17 @@
         assertFalse(ocls.contains("test"));
     }
 
+
     /**
      * It is possible to add an attribute to the entry that is not allowed
      * according the objectclasses. The server should reject this.
+     *
+     * @throws NamingException on error
      */
     public void testDefect3() throws NamingException 
     {
-        Hashtable<String,Object> env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java Fri Oct  5 23:48:35 2007
@@ -74,7 +74,7 @@
         Set<Partition> partitions = new HashSet<Partition>();
         partitions.add( partition );
 
-        configuration.setPartitions( partitions );
+        service.setPartitions( partitions );
         super.overrideEnvironment( Context.PROVIDER_URL, suffix );
 
         super.setUp();

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java Fri Oct  5 23:48:35 2007
@@ -20,24 +20,23 @@
 package org.apache.directory.server.core.jndi;
 
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Hashtable;
+import junit.framework.TestCase;
+import org.apache.commons.io.FileUtils;
+import org.apache.directory.server.core.DefaultDirectoryService;
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
-import org.apache.directory.server.core.configuration.ShutdownConfiguration;
-import org.apache.directory.server.core.jndi.CoreContextFactory;
-import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
+import java.io.File;
+import java.io.IOException;
+import java.util.Hashtable;
 
 
 /**
@@ -48,6 +47,7 @@
  */
 public class RootDSEITest extends TestCase
 {
+    private static final Logger LOG = LoggerFactory.getLogger( RootDSEITest.class );
     /** flag whether to delete database files for each test or not */
     protected boolean doDelete = true;
 
@@ -67,8 +67,9 @@
 
 
     /**
-     * Deletes the Eve working directory.
+     * Deletes the servers working directory.
      *
+     * @param wkdir the working directory to delete
      * @throws java.io.IOException if there are failures while deleting.
      */
     protected void doDelete( File wkdir ) throws IOException
@@ -77,39 +78,21 @@
         {
             if ( wkdir.exists() )
             {
-                FileUtils.deleteDirectory( wkdir );
+                try
+                {
+                    FileUtils.deleteDirectory( wkdir );
+                }
+                catch ( IOException e )
+                {
+                    LOG.error( "Failed to delete the working directory: {}" + wkdir, e );
+                    throw e;
+                }
             }
         }
     }
 
 
     /**
-     * Sets the system context root to null.
-     *
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception
-    {
-        super.tearDown();
-
-        Hashtable<String,Object> env = new Hashtable<String,Object>();
-        env.put( Context.PROVIDER_URL, "ou=system" );
-        env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
-        env.putAll( new ShutdownConfiguration().toJndiEnvironment() );
-        env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
-        env.put( Context.SECURITY_CREDENTIALS, "secret" );
-
-        try
-        {
-            new InitialContext( env );
-        }
-        catch ( Exception e )
-        {
-        }
-    }
-
-
-    /**
      * Creates an initial context using the empty string for the provider URL.
      * This should work.
      *
@@ -117,11 +100,12 @@
      */
     public void testGetInitialContext() throws NamingException
     {
-        MutableStartupConfiguration cfg = new MutableStartupConfiguration();
-        cfg.setShutdownHookEnabled( false );
-        cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        DirectoryService service = new DefaultDirectoryService();
+        service.setShutdownHookEnabled( false );
+        service.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
 
-        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -130,6 +114,7 @@
 
         InitialContext initCtx = new InitialContext( env );
         assertNotNull( initCtx );
+        service.shutdown();
     }
 
 
@@ -141,11 +126,13 @@
      */
     public void testGetInitialContextLookupAttributes() throws NamingException
     {
-        MutableStartupConfiguration cfg = new MutableStartupConfiguration();
-        cfg.setShutdownHookEnabled( false );
-        cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        DirectoryService service = new DefaultDirectoryService();
+        service.setShutdownHookEnabled( false );
+        service.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        service.startup();
 
-        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -153,15 +140,14 @@
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
 
         InitialContext initCtx = new InitialContext( env );
-
         assertNotNull( initCtx );
 
         DirContext ctx = ( DirContext ) initCtx.lookup( "" );
-
         Attributes attributes = ctx.getAttributes( "" );
 
         // Added some objectClass attributes to the rootDSE
         assertEquals( 1, attributes.size() );
+        service.shutdown();
     }
 
 
@@ -172,11 +158,13 @@
      */
     public void testGetInitialContextLookupAttributesByName() throws NamingException
     {
-        MutableStartupConfiguration cfg = new MutableStartupConfiguration();
-        cfg.setShutdownHookEnabled( false );
-        cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        DirectoryService service = new DefaultDirectoryService();
+        service.setShutdownHookEnabled( false );
+        service.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        service.startup();
 
-        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -192,6 +180,7 @@
         assertEquals( 2, attributes.size() );
         assertEquals( "Apache Software Foundation", attributes.get( "vendorName" ).get() );
         assertTrue( attributes.get( "namingContexts" ).contains( "ou=system" ) );
+        service.shutdown();
     }
 
 
@@ -202,11 +191,13 @@
      */
     public void testDelete() throws NamingException
     {
-        MutableStartupConfiguration cfg = new MutableStartupConfiguration();
-        cfg.setShutdownHookEnabled( false );
-        cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        DirectoryService service = new DefaultDirectoryService();
+        service.setShutdownHookEnabled( false );
+        service.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        service.startup();
 
-        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -229,6 +220,7 @@
         }
 
         assertNotNull( notNull );
+        service.shutdown();
     }
 
 
@@ -239,10 +231,13 @@
      */
     public void testRename() throws NamingException
     {
-        MutableStartupConfiguration cfg = new MutableStartupConfiguration();
-        cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        DirectoryService service = new DefaultDirectoryService();
+        service.setShutdownHookEnabled( false );
+        service.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        service.startup();
 
-        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -265,6 +260,7 @@
         }
 
         assertNotNull( notNull );
+        service.shutdown();
     }
 
 
@@ -275,11 +271,13 @@
      */
     public void testModify() throws NamingException
     {
-        MutableStartupConfiguration cfg = new MutableStartupConfiguration();
-        cfg.setShutdownHookEnabled( false );
-        cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        DirectoryService service = new DefaultDirectoryService();
+        service.setShutdownHookEnabled( false );
+        service.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        service.startup();
 
-        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -302,6 +300,7 @@
         }
 
         assertNotNull( notNull );
+        service.shutdown();
     }
 
 
@@ -312,11 +311,13 @@
      */
     public void testModify2() throws NamingException
     {
-        MutableStartupConfiguration cfg = new MutableStartupConfiguration();
-        cfg.setShutdownHookEnabled( false );
-        cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        DirectoryService service = new DefaultDirectoryService();
+        service.setShutdownHookEnabled( false );
+        service.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
+        service.startup();
 
-        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -344,5 +345,6 @@
         }
 
         assertNotNull( notNull );
+        service.shutdown();
     }
 }

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java Fri Oct  5 23:48:35 2007
@@ -54,7 +54,7 @@
     {
         if ( this.getName().equals( "testOpAttrDenormalizationOn" ) )
         {
-            super.configuration.setDenormalizeOpAttrsEnabled( true );
+            super.service.setDenormalizeOpAttrsEnabled( true );
         }
         
         super.setUp();
@@ -514,6 +514,10 @@
     
     /**
      * Creation of required attributes of a person entry.
+     *
+     * @param cn the commonName of the person
+     * @param sn the surName of the person
+     * @return the attributes of a new person entry
      */
     protected Attributes getPersonAttributes( String sn, String cn )
     {

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchITest.java?rev=582462&r1=582461&r2=582462&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchITest.java Fri Oct  5 23:48:35 2007
@@ -45,14 +45,14 @@
  */
 public class SearchITest extends AbstractAdminTestCase
 {
-    private static final String rdn = "cn=Heather Nova";
-    private static final String filter = "(objectclass=*)";
+    private static final String RDN = "cn=Heather Nova";
+    private static final String FILTER = "(objectclass=*)";
 
     protected void setUp() throws Exception
     {
         if ( this.getName().equals( "testOpAttrDenormalizationOn" ) )
         {
-            super.configuration.setDenormalizeOpAttrsEnabled( true );
+            super.service.setDenormalizeOpAttrsEnabled( true );
         }
         
         super.setUp();
@@ -162,10 +162,10 @@
         heather.put( ocls );
         heather.put( "cn", "Heather Nova" );
         heather.put( "sn", "Nova" );
-        ctx = sysRoot.createSubcontext( rdn, heather );
+        ctx = sysRoot.createSubcontext( RDN, heather );
         assertNotNull( ctx );
 
-        ctx = ( DirContext ) sysRoot.lookup( rdn );
+        ctx = ( DirContext ) sysRoot.lookup( RDN );
         assertNotNull( ctx );
     }
 
@@ -329,6 +329,7 @@
 
     /**
      * Search an entry and fetch an attribute with unknown option
+     * @throws NamingException if there are errors
      */
     public void testSearchFetchNonExistingAttributeOption() throws NamingException
     {
@@ -337,7 +338,7 @@
         ctls.setReturningAttributes( new String[]
             { "cn", "sn;unknownOption" } );
 
-        NamingEnumeration result = sysRoot.search( rdn, filter, ctls );
+        NamingEnumeration result = sysRoot.search( RDN, FILTER, ctls );
 
         if ( result.hasMore() )
         {
@@ -353,7 +354,7 @@
         }
         else
         {
-            fail( "entry " + rdn + " not found" );
+            fail( "entry " + RDN + " not found" );
         }
 
         result.close();
@@ -361,6 +362,7 @@
 
     /**
      * Search an entry and fetch an attribute with twice the same attributeType
+     * @throws NamingException if there are errors
      */
     public void testSearchFetchTwiceSameAttribute() throws NamingException
     {
@@ -369,7 +371,7 @@
         ctls.setReturningAttributes( new String[]
             { "cn", "cn" } );
 
-        NamingEnumeration result = sysRoot.search( rdn, filter, ctls );
+        NamingEnumeration result = sysRoot.search( RDN, FILTER, ctls );
 
         if ( result.hasMore() )
         {
@@ -382,7 +384,7 @@
         }
         else
         {
-            fail( "entry " + rdn + " not found" );
+            fail( "entry " + RDN + " not found" );
         }
 
         result.close();



Mime
View raw message