You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2007/01/08 03:44:40 UTC
svn commit: r493916 [1/7] - in /directory/branches: apacheds/1.0/core-unit/
apacheds/1.0/core-unit/src/main/java/org/apache/directory/server/core/unit/
apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/
apacheds/1.0/core-unit/src/te...
Author: elecharny
Date: Sun Jan 7 18:44:33 2007
New Revision: 493916
URL: http://svn.apache.org/viewvc?view=rev&rev=493916
Log:
Fix DIRSERVER-783. Ok, I admit this is a *huge* commit.
Basically, here are the modification
- get rid of BasicAttribute(s), and replace them by Attribute(s)Impl
- renamed LockableAttribute(s)Impl to Attribute(s)Impl
- created a new ModificationItemImpl which extends ModificationItem for cloning purpose
- added a test for DIRSERVER-783
- fixed the way Attribute(s) are cloned
- fixed a lot of other errors in Attribute(s)Impl (mainly special cases)
- added more utility methods in AttributeUtils
- removed all the import javax.naming.directory.* all over the code (Please, do _not_ use * in imports !!!)
Added:
directory/branches/apacheds/1.0/core-unit/org.apache.directory.server.core.TestPTest.stats
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributeImpl.java
- copied, changed from r493207, directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributeImpl.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributesImpl.java
- copied, changed from r493207, directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributesImpl.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModificationItemImpl.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/AttributeImplTest.java
- copied, changed from r493207, directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributeImplTest.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/AttributesImplTest.java
- copied, changed from r493207, directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java
Removed:
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributeImpl.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributesImpl.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributeImplTest.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java
Modified:
directory/branches/apacheds/1.0/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/RFC2713ITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/SyncITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/operational/BinaryAttributeFilterITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/schema/IllegalModifyAddITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/schema/SchemaServiceITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java
directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/configuration/ConfigurationUtil.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/event/Evaluator.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/event/EventService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResult.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MasterTable.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AddEntryDialog.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AttributesTableModel.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryDialog.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributeSerializer.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializer.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapObjectFactoryRegistry.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/subtree/RefinementEvaluator.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributeSerializerTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
directory/branches/apacheds/1.0/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
directory/branches/apacheds/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java
directory/branches/apacheds/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
directory/branches/apacheds/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/DeletePrincipal.java
directory/branches/apacheds/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
directory/branches/apacheds/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java
directory/branches/apacheds/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalObjectFactory.java
directory/branches/apacheds/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java
directory/branches/apacheds/1.0/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetFlatRecord.java
directory/branches/apacheds/1.0/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java
directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/PersistentSearchListener.java
directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java
directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java
directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/catalog/GetCatalog.java
directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/Krb5KdcEntryFilter.java
directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifLoadFilter.java
directory/branches/apacheds/1.0/protocol-shared/src/test/java/org/apache/directory/server/protocol/shared/kerberos/KerberosTest.java
directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
directory/branches/apacheds/1.0/server-ssl/src/test/java/org/apache/directory/server/ssl/LdapsITest.java
directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java
directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/AddITest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/AddingEntriesWithSpecialCharactersInRDNTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/BinarySearchTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/DefaultAuthorizationTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyRemoveTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyReplaceITest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/PersistentSearchTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ReferralTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/SearchTest.java
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
directory/branches/shared/0.9.5/ldap/src/main/antlr/ACIItem.g
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/filter/Assertion.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/Entry.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequest.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntry.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/util/PropertiesUtils.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserImplTest.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
Added: directory/branches/apacheds/1.0/core-unit/org.apache.directory.server.core.TestPTest.stats
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/org.apache.directory.server.core.TestPTest.stats?view=auto&rev=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/org.apache.directory.server.core.TestPTest.stats (added)
+++ directory/branches/apacheds/1.0/core-unit/org.apache.directory.server.core.TestPTest.stats Sun Jan 7 18:44:33 2007
@@ -0,0 +1,18 @@
+=========================================================================
+[START]: org.apache.directory.server.core.TestPTest
+=========================================================================
+[2] - Started LDIF Import: org.apache.directory.server.core.TestPTest.ldif
+[4] - added 1-th entry in 2
+[6] - added 2-th entry in 2
+[7] - added 3-th entry in 1
+[8] - added 4-th entry in 1
+[9] - added 5-th entry in 1
+[10] - added 6-th entry in 1
+[11] - added 7-th entry in 1
+[13] - added 8-th entry in 1
+[14] - added 9-th entry in 1
+[14] - added 10-th entry in 0
+[15] - Completed LDIF Import: 10 entries in 13 milliseconds
+=========================================================================
+[FINISH]: org.apache.directory.server.core.TestPTest
+=========================================================================
Modified: directory/branches/apacheds/1.0/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java Sun Jan 7 18:44:33 2007
@@ -31,7 +31,7 @@
import java.util.Iterator;
import javax.naming.Context;
-import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.Attributes;
import javax.naming.ldap.InitialLdapContext;
import javax.naming.ldap.LdapContext;
@@ -39,6 +39,7 @@
import org.apache.directory.server.core.partition.PartitionNexus;
import org.apache.directory.shared.ldap.ldif.Entry;
import org.apache.directory.shared.ldap.ldif.LdifReader;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.util.NamespaceTools;
@@ -140,7 +141,7 @@
indexedAttributes.add( "objectClass" );
// Build the root entry for the new partition
- BasicAttributes attributes = new BasicAttributes( "objectClass", "top", true );
+ Attributes attributes = new AttributesImpl( "objectClass", "top", true );
attributes.get( "objectClass" ).add( "organizationalUnit" );
attributes.put( "ou", "test" );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java Sun Jan 7 18:44:33 2007
@@ -26,7 +26,6 @@
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
@@ -35,6 +34,7 @@
import org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration;
import org.apache.directory.server.core.schema.bootstrap.NisSchema;
import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
/**
@@ -47,7 +47,7 @@
{
private DirContext addNisPosixGroup( String name, int gid ) throws NamingException
{
- Attributes attrs = new BasicAttributes( "objectClass", "top", true );
+ Attributes attrs = new AttributesImpl( "objectClass", "top", true );
attrs.get( "objectClass" ).add( "posixGroup" );
attrs.put( "cn", name );
attrs.put( "gidNumber", String.valueOf( gid ) );
@@ -74,7 +74,7 @@
{
MutablePartitionConfiguration sysConf = new MutablePartitionConfiguration();
sysConf.setName( "system" );
- Attributes attrs = new BasicAttributes( "objectClass", "top", true );
+ Attributes attrs = new AttributesImpl( "objectClass", "top", true );
attrs.get( "objectClass" ).add( "organizationalUnit" );
attrs.put( "ou", "system" );
sysConf.setContextEntry( attrs );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java Sun Jan 7 18:44:33 2007
@@ -32,13 +32,13 @@
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.ModificationItem;
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.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
import org.apache.directory.shared.ldap.util.ArrayUtils;
@@ -347,9 +347,9 @@
assertTrue( attrs.get( "roomnumber" ).contains( "4612" ) );
// now modify the password for akarasulu
- LockableAttributeImpl userPasswordAttribute = new LockableAttributeImpl( "userPassword", "newpwd" );
- ic.modifyAttributes( "uid=akarasulu,ou=users", new ModificationItem[] {
- new ModificationItem( DirContext.REPLACE_ATTRIBUTE, userPasswordAttribute ) } );
+ AttributeImpl userPasswordAttribute = new AttributeImpl( "userPassword", "newpwd" );
+ ic.modifyAttributes( "uid=akarasulu,ou=users", new ModificationItemImpl[] {
+ new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, userPasswordAttribute ) } );
// close and try with old password (should fail)
ic.close();
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java Sun Jan 7 18:44:33 2007
@@ -23,11 +23,17 @@
import org.apache.directory.server.core.partition.PartitionNexus;
import org.apache.directory.server.core.subtree.SubentryService;
import org.apache.directory.server.core.unit.AbstractTestCase;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
-import javax.naming.directory.*;
import javax.naming.NamingException;
import javax.naming.Name;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+
import java.util.Hashtable;
@@ -104,8 +110,8 @@
public Name createGroup( String cn, String firstMemberDn ) throws NamingException
{
DirContext adminCtx = getContextAsAdmin();
- Attributes group = new BasicAttributes( "cn", cn, true );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attributes group = new AttributesImpl( "cn", cn, true );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
group.put( objectClass );
objectClass.add( "top" );
objectClass.add( "groupOfUniqueNames" );
@@ -142,9 +148,9 @@
public Name createUser( String uid, String password ) throws NamingException
{
DirContext adminCtx = getContextAsAdmin();
- Attributes user = new BasicAttributes( "uid", uid, true );
+ Attributes user = new AttributesImpl( "uid", uid, true );
user.put( "userPassword", password );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
user.put( objectClass );
objectClass.add( "top" );
objectClass.add( "person" );
@@ -165,8 +171,8 @@
public Name createGroup( String groupName ) throws NamingException
{
DirContext adminCtx = getContextAsAdmin();
- Attributes group = new BasicAttributes( true );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attributes group = new AttributesImpl( true );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
group.put( objectClass );
objectClass.add( "top" );
objectClass.add( "groupOfUniqueNames" );
@@ -187,7 +193,7 @@
public void addUserToGroup( String userUid, String groupCn ) throws NamingException
{
DirContext adminCtx = getContextAsAdmin();
- Attributes changes = new BasicAttributes( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
+ Attributes changes = new AttributesImpl( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
adminCtx.modifyAttributes( "cn=" + groupCn + ",ou=groups", DirContext.ADD_ATTRIBUTE, changes );
}
@@ -202,7 +208,7 @@
public void removeUserFromGroup( String userUid, String groupCn ) throws NamingException
{
DirContext adminCtx = getContextAsAdmin();
- Attributes changes = new BasicAttributes( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
+ Attributes changes = new AttributesImpl( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
adminCtx.modifyAttributes( "cn=" + groupCn + ",ou=groups", DirContext.REMOVE_ATTRIBUTE, changes );
}
@@ -281,13 +287,13 @@
Attribute administrativeRole = ap.get( "administrativeRole" );
if ( administrativeRole == null || !administrativeRole.contains( SubentryService.AC_AREA ) )
{
- Attributes changes = new BasicAttributes( "administrativeRole", SubentryService.AC_AREA, true );
+ Attributes changes = new AttributesImpl( "administrativeRole", SubentryService.AC_AREA, true );
adminCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes );
}
// now add the A/C subentry below ou=system
- Attributes subentry = new BasicAttributes( "cn", cn, true );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attributes subentry = new AttributesImpl( "cn", cn, true );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
subentry.put( objectClass );
objectClass.add( "top" );
objectClass.add( "subentry" );
@@ -311,7 +317,7 @@
DirContext adminCtx = getContextAsAdmin();
// modify the entry relative to ou=system to include the aciItem
- Attributes changes = new BasicAttributes( "entryACI", aciItem, true );
+ Attributes changes = new AttributesImpl( "entryACI", aciItem, true );
adminCtx.modifyAttributes( rdn, DirContext.ADD_ATTRIBUTE, changes );
}
@@ -327,7 +333,7 @@
DirContext adminCtx = getContextAsAdmin();
// modify the entry relative to ou=system to include the aciItem
- Attributes changes = new BasicAttributes( "subentryACI", aciItem, true );
+ Attributes changes = new AttributesImpl( "subentryACI", aciItem, true );
adminCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes );
}
}
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationITest.java Sun Jan 7 18:44:33 2007
@@ -21,10 +21,14 @@
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
/**
@@ -51,8 +55,8 @@
*/
public boolean checkCanAddEntryAs( String uid, String password, String entryRdn ) throws NamingException
{
- Attributes testEntry = new BasicAttributes( "ou", "testou", true );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
testEntry.put( objectClass );
objectClass.add( "top" );
objectClass.add( "organizationalUnit" );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java Sun Jan 7 18:44:33 2007
@@ -24,11 +24,14 @@
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
import org.apache.directory.server.core.unit.AbstractAdminTestCase;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.util.ArrayUtils;
@@ -86,7 +89,7 @@
*/
public void testModifyOnAdminByAdmin() throws NamingException
{
- Attributes attributes = new LockableAttributesImpl();
+ Attributes attributes = new AttributesImpl();
attributes.put( "userPassword", "replaced" );
sysRoot.modifyAttributes( "uid=admin", DirContext.REPLACE_ATTRIBUTE, attributes );
Attributes newAttrs = sysRoot.getAttributes( "uid=admin" );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java Sun Jan 7 18:44:33 2007
@@ -24,11 +24,14 @@
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
import org.apache.directory.server.core.unit.AbstractNonAdminTestCase;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
/**
@@ -83,7 +86,7 @@
*/
public void testModifyOnAdminByNonAdmin()
{
- Attributes attributes = new LockableAttributesImpl();
+ Attributes attributes = new AttributesImpl();
attributes.put( "userPassword", "replaced" );
try
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationITest.java Sun Jan 7 18:44:33 2007
@@ -22,10 +22,14 @@
import org.apache.directory.server.core.jndi.ServerLdapContext;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
/**
@@ -59,8 +63,8 @@
throws NamingException
{
// create the entry with the telephoneNumber attribute to compare
- Attributes testEntry = new BasicAttributes( "ou", "testou", true );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
testEntry.put( objectClass );
objectClass.add( "top" );
objectClass.add( "organizationalUnit" );
@@ -205,9 +209,9 @@
public void testPasswordCompare() throws NamingException
{
DirContext adminCtx = getContextAsAdmin();
- Attributes user = new BasicAttributes( "uid", "bob", true );
+ Attributes user = new AttributesImpl( "uid", "bob", true );
user.put( "userPassword", "bobspassword".getBytes() );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
user.put( objectClass );
objectClass.add( "top" );
objectClass.add( "person" );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationITest.java Sun Jan 7 18:44:33 2007
@@ -21,10 +21,14 @@
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
/**
@@ -56,8 +60,8 @@
*/
public boolean checkCanDeleteEntryAs( String uid, String password, String entryRdn ) throws NamingException
{
- Attributes testEntry = new BasicAttributes( "ou", "testou", true );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
testEntry.put( objectClass );
objectClass.add( "top" );
objectClass.add( "organizationalUnit" );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java Sun Jan 7 18:44:33 2007
@@ -21,12 +21,18 @@
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+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 org.apache.directory.shared.ldap.name.LdapDN;
import javax.naming.NamingException;
import javax.naming.NamingEnumeration;
import javax.naming.Name;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+
import java.util.List;
import java.util.ArrayList;
@@ -57,12 +63,12 @@
* false otherwise.
* @throws javax.naming.NamingException if there are problems conducting the test
*/
- public boolean checkCanModifyAs( String uid, String password, String entryRdn, ModificationItem[] mods )
+ public boolean checkCanModifyAs( String uid, String password, String entryRdn, ModificationItemImpl[] mods )
throws NamingException
{
// create the entry with the telephoneNumber attribute to modify
- Attributes testEntry = new BasicAttributes( "ou", "testou", true );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
testEntry.put( objectClass );
objectClass.add( "top" );
objectClass.add( "organizationalUnit" );
@@ -117,8 +123,8 @@
throws NamingException
{
// create the entry with the telephoneNumber attribute to modify
- Attributes testEntry = new BasicAttributes( "ou", "testou", true );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
testEntry.put( objectClass );
objectClass.add( "top" );
objectClass.add( "organizationalUnit" );
@@ -192,7 +198,7 @@
* false otherwise.
* @throws javax.naming.NamingException if there are problems conducting the test
*/
- public boolean checkCanSelfModify( String uid, String password, ModificationItem[] mods ) throws NamingException
+ public boolean checkCanSelfModify( String uid, String password, ModificationItemImpl[] mods ) throws NamingException
{
try
{
@@ -217,17 +223,17 @@
* @return the array of modification items represting the changes
* @throws NamingException if there are problems accessing attributes
*/
- private ModificationItem[] toItems( int modOp, Attributes changes ) throws NamingException
+ private ModificationItemImpl[] toItems( int modOp, Attributes changes ) throws NamingException
{
List mods = new ArrayList();
NamingEnumeration list = changes.getAll();
while ( list.hasMore() )
{
Attribute attr = ( Attribute ) list.next();
- mods.add( new ModificationItem( modOp, attr ) );
+ mods.add( new ModificationItemImpl( modOp, attr ) );
}
- ModificationItem[] modArray = new ModificationItem[mods.size()];
- return ( ModificationItem[] ) mods.toArray( modArray );
+ ModificationItemImpl[] modArray = new ModificationItemImpl[mods.size()];
+ return ( ModificationItemImpl[] ) mods.toArray( modArray );
}
@@ -241,7 +247,7 @@
createUser( "billyd", "billyd" );
// create the password modification
- ModificationItem[] mods = toItems( DirContext.REPLACE_ATTRIBUTE, new BasicAttributes( "userPassword",
+ ModificationItemImpl[] mods = toItems( DirContext.REPLACE_ATTRIBUTE, new AttributesImpl( "userPassword",
"williams", true ) );
// try a modify operation which should fail without any ACI
@@ -274,7 +280,7 @@
// ----------------------------------------------------------------------------------
// create the add modifications
- ModificationItem[] mods = toItems( DirContext.ADD_ATTRIBUTE, new BasicAttributes( "registeredAddress",
+ ModificationItemImpl[] mods = toItems( DirContext.ADD_ATTRIBUTE, new AttributesImpl( "registeredAddress",
"100 Park Ave.", true ) );
// create the non-admin user
@@ -309,7 +315,7 @@
// ----------------------------------------------------------------------------------
// now let's test to see if we can perform a modify with a delete op
- mods = toItems( DirContext.REMOVE_ATTRIBUTE, new BasicAttributes( "telephoneNumber", "867-5309", true ) );
+ mods = toItems( DirContext.REMOVE_ATTRIBUTE, new AttributesImpl( "telephoneNumber", "867-5309", true ) );
// make sure we cannot remove the telephone number from the test entry
assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", mods ) );
@@ -331,7 +337,7 @@
// ----------------------------------------------------------------------------------
// now let's test to see if we can perform a modify with a delete op
- mods = toItems( DirContext.REPLACE_ATTRIBUTE, new BasicAttributes( "telephoneNumber", "867-5309", true ) );
+ mods = toItems( DirContext.REPLACE_ATTRIBUTE, new AttributesImpl( "telephoneNumber", "867-5309", true ) );
// make sure we cannot remove the telephone number from the test entry
assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", mods ) );
@@ -357,7 +363,7 @@
// Modify with Attribute Addition
// ----------------------------------------------------------------------------------
// create the add modifications
- Attributes changes = new BasicAttributes( "registeredAddress", "100 Park Ave.", true );
+ Attributes changes = new AttributesImpl( "registeredAddress", "100 Park Ave.", true );
// try a modify operation which should fail without any ACI
assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", DirContext.ADD_ATTRIBUTE, changes ) );
@@ -379,7 +385,7 @@
// ----------------------------------------------------------------------------------
// now let's test to see if we can perform a modify with a delete op
- changes = new BasicAttributes( "telephoneNumber", "867-5309", true );
+ changes = new AttributesImpl( "telephoneNumber", "867-5309", true );
// make sure we cannot remove the telephone number from the test entry
assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", DirContext.REMOVE_ATTRIBUTE, changes ) );
@@ -401,7 +407,7 @@
// ----------------------------------------------------------------------------------
// now let's test to see if we can perform a modify with a delete op
- changes = new BasicAttributes( "telephoneNumber", "867-5309", true );
+ changes = new AttributesImpl( "telephoneNumber", "867-5309", true );
// make sure we cannot remove the telephone number from the test entry
assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", DirContext.REPLACE_ATTRIBUTE, changes ) );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationITest.java Sun Jan 7 18:44:33 2007
@@ -21,10 +21,14 @@
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
/**
@@ -53,8 +57,8 @@
public boolean checkCanRenameAs( String uid, String password, String entryRdn, String newRdn )
throws NamingException
{
- Attributes testEntry = new BasicAttributes( "ou", "testou", true );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
testEntry.put( objectClass );
objectClass.add( "top" );
objectClass.add( "organizationalUnit" );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java Sun Jan 7 18:44:33 2007
@@ -22,14 +22,19 @@
import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+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.NamingEnumeration;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
@@ -64,12 +69,12 @@
Attributes[] attributes = new Attributes[count];
for ( int ii = 0; ii < count; ii++ )
{
- attributes[ii] = new LockableAttributesImpl();
- Attribute oc = new LockableAttributeImpl( "objectClass" );
+ attributes[ii] = new AttributesImpl();
+ Attribute oc = new AttributeImpl( "objectClass" );
oc.add( "top" );
oc.add( "organizationalUnit" );
attributes[ii].put( oc );
- Attribute ou = new LockableAttributeImpl( "ou" );
+ Attribute ou = new AttributeImpl( "ou" );
ou.add( String.valueOf( ii ) );
ou.add( "testEntry" );
attributes[ii].put( ou );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java Sun Jan 7 18:44:33 2007
@@ -21,12 +21,18 @@
import org.apache.directory.server.core.unit.AbstractAdminTestCase;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+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.NamingException;
import javax.naming.NamingEnumeration;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
import java.util.Map;
import java.util.HashMap;
@@ -41,8 +47,8 @@
{
public Attributes getTestEntry( String cn )
{
- Attributes subentry = new LockableAttributesImpl();
- Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+ Attributes subentry = new AttributesImpl();
+ Attribute objectClass = new AttributeImpl( "objectClass" );
objectClass.add( "top" );
objectClass.add( "person" );
subentry.put( objectClass );
@@ -54,8 +60,8 @@
public Attributes getTestSubentry()
{
- Attributes subentry = new LockableAttributesImpl();
- Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+ Attributes subentry = new AttributesImpl();
+ Attribute objectClass = new AttributeImpl( "objectClass" );
objectClass.add( "top" );
objectClass.add( "subentry" );
objectClass.add( "collectiveAttributeSubentry" );
@@ -69,8 +75,8 @@
public Attributes getTestSubentry2()
{
- Attributes subentry = new LockableAttributesImpl();
- Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+ Attributes subentry = new AttributesImpl();
+ Attribute objectClass = new AttributeImpl( "objectClass" );
objectClass.add( "top" );
objectClass.add( "subentry" );
objectClass.add( "collectiveAttributeSubentry" );
@@ -84,8 +90,8 @@
public Attributes getTestSubentry3()
{
- Attributes subentry = new LockableAttributesImpl();
- Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+ Attributes subentry = new AttributesImpl();
+ Attribute objectClass = new AttributeImpl( "objectClass" );
objectClass.add( "top" );
objectClass.add( "subentry" );
objectClass.add( "collectiveAttributeSubentry" );
@@ -99,10 +105,10 @@
public void addAdministrativeRole( String role ) throws NamingException
{
- Attribute attribute = new LockableAttributeImpl( "administrativeRole" );
+ Attribute attribute = new AttributeImpl( "administrativeRole" );
attribute.add( role );
- ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attribute );
- super.sysRoot.modifyAttributes( "", new ModificationItem[]
+ ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attribute );
+ super.sysRoot.modifyAttributes( "", new ModificationItemImpl[]
{ item } );
}
@@ -171,9 +177,9 @@
// now modify entries included by the subentry to have collectiveExclusions
// -------------------------------------------------------------------
- ModificationItem[] items = new ModificationItem[]
- { new ModificationItem( DirContext.ADD_ATTRIBUTE,
- new LockableAttributeImpl( "collectiveExclusions", "c-ou" ) ) };
+ ModificationItemImpl[] items = new ModificationItemImpl[]
+ { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
+ new AttributeImpl( "collectiveExclusions", "c-ou" ) ) };
super.sysRoot.modifyAttributes( "ou=services,ou=configuration", items );
// entry should not show the c-ou collective attribute anymore
@@ -227,8 +233,8 @@
// now modify an entry to exclude all collective attributes
// -------------------------------------------------------------------
- items = new ModificationItem[]
- { new ModificationItem( DirContext.REPLACE_ATTRIBUTE, new LockableAttributeImpl( "collectiveExclusions",
+ items = new ModificationItemImpl[]
+ { new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new AttributeImpl( "collectiveExclusions",
"excludeAllCollectiveAttributes" ) ) };
super.sysRoot.modifyAttributes( "ou=interceptors,ou=configuration", items );
@@ -278,9 +284,9 @@
// now modify entries included by the subentry to have collectiveExclusions
// -------------------------------------------------------------------
- ModificationItem[] items = new ModificationItem[]
- { new ModificationItem( DirContext.ADD_ATTRIBUTE,
- new LockableAttributeImpl( "collectiveExclusions", "c-ou" ) ) };
+ ModificationItemImpl[] items = new ModificationItemImpl[]
+ { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
+ new AttributeImpl( "collectiveExclusions", "c-ou" ) ) };
super.sysRoot.modifyAttributes( "ou=services,ou=configuration", items );
entries = getAllEntries();
@@ -337,8 +343,8 @@
// now modify an entry to exclude all collective attributes
// -------------------------------------------------------------------
- items = new ModificationItem[]
- { new ModificationItem( DirContext.REPLACE_ATTRIBUTE, new LockableAttributeImpl( "collectiveExclusions",
+ items = new ModificationItemImpl[]
+ { new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new AttributeImpl( "collectiveExclusions",
"excludeAllCollectiveAttributes" ) ) };
super.sysRoot.modifyAttributes( "ou=interceptors,ou=configuration", items );
entries = getAllEntries();
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java Sun Jan 7 18:44:33 2007
@@ -26,7 +26,6 @@
import javax.naming.InitialContext;
import javax.naming.NameNotFoundException;
import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttributes;
import junit.framework.Assert;
@@ -36,6 +35,7 @@
import org.apache.directory.server.core.jndi.CoreContextFactory;
import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
/**
@@ -57,7 +57,7 @@
MutablePartitionConfiguration partitionCfg = new MutablePartitionConfiguration();
partitionCfg.setName( "removable" );
partitionCfg.setSuffix( "ou=removable" );
- Attributes ctxEntry = new BasicAttributes( true );
+ Attributes ctxEntry = new AttributesImpl( true );
ctxEntry.put( "objectClass", "top" );
ctxEntry.put( "ou", "removable" );
partitionCfg.setContextEntry( ctxEntry );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java Sun Jan 7 18:44:33 2007
@@ -21,9 +21,13 @@
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 javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.SearchControls;
import javax.naming.event.*;
import java.util.List;
import java.util.ArrayList;
@@ -47,8 +51,8 @@
TestListener listener = new TestListener();
EventDirContext ctx = ( EventDirContext ) super.sysRoot.lookup( "" );
ctx.addNamingListener( "", SearchControls.SUBTREE_SCOPE, listener );
- Attributes testEntry = new BasicAttributes( "ou", "testentry", true );
- Attribute objectClass = new BasicAttribute( "objectClass", "top" );
+ Attributes testEntry = new AttributesImpl( "ou", "testentry", true );
+ Attribute objectClass = new AttributeImpl( "objectClass", "top" );
objectClass.add( "organizationalUnit" );
testEntry.put( objectClass );
ctx.createSubcontext( "ou=testentry", testEntry );
@@ -84,8 +88,8 @@
TestListener listener = new TestListener();
EventDirContext ctx = ( EventDirContext ) super.sysRoot.lookup( "" );
ctx.addNamingListener( "", SearchControls.SUBTREE_SCOPE, listener );
- Attributes testEntry = new BasicAttributes( "ou", "testentry", true );
- Attribute objectClass = new BasicAttribute( "objectClass", "top" );
+ Attributes testEntry = new AttributesImpl( "ou", "testentry", true );
+ Attribute objectClass = new AttributeImpl( "objectClass", "top" );
objectClass.add( "organizationalUnit" );
testEntry.put( objectClass );
ctx.createSubcontext( "ou=testentry", testEntry );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceITest.java Sun Jan 7 18:44:33 2007
@@ -25,10 +25,7 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
import javax.naming.ldap.LdapContext;
@@ -38,6 +35,9 @@
import org.apache.directory.shared.ldap.exception.LdapNameAlreadyBoundException;
import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
import org.apache.directory.shared.ldap.exception.LdapNamingException;
+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 org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -253,8 +253,8 @@
*/
public void testFailModifyNoSuchObject() throws NamingException
{
- Attributes attrs = new BasicAttributes( true );
- Attribute ou = new BasicAttribute( "ou" );
+ Attributes attrs = new AttributesImpl( true );
+ Attribute ou = new AttributeImpl( "ou" );
ou.add( "users" );
ou.add( "dummyValue" );
attrs.put( ou );
@@ -270,8 +270,8 @@
assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
}
- ModificationItem[] mods = new ModificationItem[]
- { new ModificationItem( DirContext.ADD_ATTRIBUTE, ou ) };
+ ModificationItemImpl[] mods = new ModificationItemImpl[]
+ { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, ou ) };
try
{
@@ -292,8 +292,8 @@
*/
public void testModifyControl() throws NamingException
{
- Attributes attrs = new BasicAttributes( true );
- Attribute attr = new BasicAttribute( "ou" );
+ Attributes attrs = new AttributesImpl( true );
+ Attribute attr = new AttributeImpl( "ou" );
attr.add( "dummyValue" );
attrs.put( attr );
sysRoot.modifyAttributes( "ou=users", DirContext.ADD_ATTRIBUTE, attrs );
@@ -301,10 +301,10 @@
assertTrue( ou.contains( "users" ) );
assertTrue( ou.contains( "dummyValue" ) );
- attr = new BasicAttribute( "ou" );
+ attr = new AttributeImpl( "ou" );
attr.add( "another" );
- ModificationItem[] mods = new ModificationItem[]
- { new ModificationItem( DirContext.ADD_ATTRIBUTE, attr ) };
+ ModificationItemImpl[] mods = new ModificationItemImpl[]
+ { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr ) };
sysRoot.modifyAttributes( "ou=users", mods );
ou = sysRoot.getAttributes( "ou=users" ).get( "ou" );
@@ -398,8 +398,8 @@
*/
public void testFailAddOnAlias() throws NamingException
{
- Attributes attrs = new BasicAttributes( true );
- Attribute attr = new BasicAttribute( "objectClass" );
+ Attributes attrs = new AttributesImpl( true );
+ Attribute attr = new AttributeImpl( "objectClass" );
attr.add( "top" );
attr.add( "alias" );
attrs.put( attr );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextITest.java Sun Jan 7 18:44:33 2007
@@ -26,13 +26,13 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
/**
@@ -45,8 +45,8 @@
{
protected Attributes getPersonAttributes( String sn, String cn )
{
- Attributes attrs = new BasicAttributes();
- Attribute ocls = new BasicAttribute( "objectClass" );
+ Attributes attrs = new AttributesImpl();
+ Attribute ocls = new AttributeImpl( "objectClass" );
ocls.add( "top" );
ocls.add( "person" );
attrs.put( ocls );
@@ -98,8 +98,8 @@
/*
* create ou=testing00,ou=system
*/
- Attributes attributes = new BasicAttributes( true );
- Attribute attribute = new BasicAttribute( "objectClass" );
+ Attributes attributes = new AttributesImpl( true );
+ Attribute attribute = new AttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "organizationalUnit" );
attributes.put( attribute );
@@ -121,8 +121,8 @@
/*
* create ou=testing01,ou=system
*/
- attributes = new BasicAttributes( true );
- attribute = new BasicAttribute( "objectClass" );
+ attributes = new AttributesImpl( true );
+ attribute = new AttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "organizationalUnit" );
attributes.put( attribute );
@@ -144,8 +144,8 @@
/*
* create ou=testing02,ou=system
*/
- attributes = new BasicAttributes( true );
- attribute = new BasicAttribute( "objectClass" );
+ attributes = new AttributesImpl( true );
+ attribute = new AttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "organizationalUnit" );
attributes.put( attribute );
@@ -169,8 +169,8 @@
*/
ctx = ( DirContext ) sysRoot.lookup( "ou=testing01" );
- attributes = new BasicAttributes( true );
- attribute = new BasicAttribute( "objectClass" );
+ attributes = new AttributesImpl( true );
+ attribute = new AttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "organizationalUnit" );
attributes.put( attribute );
@@ -200,8 +200,8 @@
/*
* create ou=testing00,ou=system
*/
- attributes = new BasicAttributes( true );
- attribute = new BasicAttribute( "objectClass" );
+ attributes = new AttributesImpl( true );
+ attribute = new AttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "organizationalUnit" );
attributes.put( attribute );
@@ -223,8 +223,8 @@
/*
* fail on recreate attempt for ou=testing00,ou=system
*/
- attributes = new BasicAttributes( true );
- attribute = new BasicAttribute( "objectClass" );
+ attributes = new AttributesImpl( true );
+ attribute = new AttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "organizationalUnit" );
attributes.put( attribute );
@@ -247,8 +247,8 @@
public void testCreateContextWithCompositeName() throws Exception
{
- Attributes attrs = new BasicAttributes( true );
- Attribute objclass = new BasicAttribute( "objectClass" );
+ Attributes attrs = new AttributesImpl( true );
+ Attribute objclass = new AttributeImpl( "objectClass" );
objclass.add( "top" );
objclass.add( "extensibleObject" );
attrs.put( objclass );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java Sun Jan 7 18:44:33 2007
@@ -22,11 +22,11 @@
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.BasicAttributes;
import javax.naming.directory.Attribute;
-import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.Attributes;
import javax.naming.directory.SearchResult;
import javax.naming.directory.SearchControls;
import javax.naming.directory.DirContext;
@@ -47,19 +47,19 @@
protected void setUp() throws Exception
{
super.setUp();
- Attributes people = new BasicAttributes( true );
- Attribute attribute = new BasicAttribute( "objectClass" );
+ Attributes people = new AttributesImpl( true );
+ Attribute attribute = new AttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "organizationalUnit" );
people.put( attribute );
people.put( "ou", "people" );
sysRoot.createSubcontext( "ou=people", people );
- Attributes user = new BasicAttributes( "uid", "bob" );
+ Attributes user = new AttributesImpl( "uid", "bob" );
user.put( "cn", "Bob Hamilton" );
user.put( "userPassword", "bobspassword".getBytes( "UTF-8" ) );
- Attribute objectClass = new BasicAttribute( "objectClass" );
+ Attribute objectClass = new AttributeImpl( "objectClass" );
user.put( objectClass );
objectClass.add( "top" );
objectClass.add( "person" );
Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java (original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java Sun Jan 7 18:44:33 2007
@@ -8,18 +8,15 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.InvalidAttributeIdentifierException;
-import javax.naming.directory.InvalidAttributeValueException;
-import javax.naming.directory.ModificationItem;
-import javax.naming.directory.SchemaViolationException;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
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;
/**
* Tries to demonstrate DIRSERVER-783 ("Adding another value to an attribute
@@ -39,12 +36,11 @@
/**
* Try to add entry with required attribute missing.
*/
- /*
public void testAddAnotherValueToAnAttribute() throws NamingException
{
// create a person without sn
- Attributes attrs = new BasicAttributes();
- Attribute ocls = new BasicAttribute("objectClass");
+ Attributes attrs = new AttributesImpl();
+ Attribute ocls = new AttributeImpl("objectClass");
ocls.add("top");
ocls.add("person");
@@ -64,28 +60,28 @@
// Add the first value for description
String description1 = "an American singer-songwriter";
- Attribute firstDescr = new BasicAttribute("description", description1);
- ModificationItem modification = new ModificationItem(DirContext.ADD_ATTRIBUTE, firstDescr);
- ctx.modifyAttributes(rdn, new ModificationItem[] { modification });
+ Attribute firstDescr = new AttributeImpl("description", description1);
+ ModificationItemImpl modification = new ModificationItemImpl(DirContext.ADD_ATTRIBUTE, firstDescr);
+ ctx.modifyAttributes(rdn, new ModificationItemImpl[] { modification });
// Add a second value to description
String description2 = "Grammy award winning";
- Attribute otherDescr = new BasicAttribute("description", description2 );
+ Attribute otherDescr = new AttributeImpl("description", description2 );
- modification = new ModificationItem(DirContext.ADD_ATTRIBUTE, otherDescr );
- ctx.modifyAttributes(rdn, new ModificationItem[] { modification } );
+ modification = new ModificationItemImpl(DirContext.ADD_ATTRIBUTE, otherDescr );
+ ctx.modifyAttributes(rdn, new ModificationItemImpl[] { modification } );
// Add a third value to description
String description3 = "MTV Music Award winning";
- Attribute thirdDescr = new BasicAttribute("description", description3 );
+ Attribute thirdDescr = new AttributeImpl("description", description3 );
- modification = new ModificationItem(DirContext.ADD_ATTRIBUTE, thirdDescr );
- ctx.modifyAttributes(rdn, new ModificationItem[] { modification });
+ modification = new ModificationItemImpl(DirContext.ADD_ATTRIBUTE, thirdDescr );
+ ctx.modifyAttributes(rdn, new ModificationItemImpl[] { modification });
// Search Entry
SearchControls sctls = new SearchControls();
sctls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
- String filter = rdn;
+ String filter = '(' + rdn + ')';
String base = "";
// Check entry
@@ -109,6 +105,5 @@
// Remove the person entry
ctx.destroySubcontext(rdn);
}
- */
}