Author: elecharny Date: Wed Jun 6 06:18:49 2007 New Revision: 544834 URL: http://svn.apache.org/viewvc?view=rev&rev=544834 Log: Used the newly declared constants in SchemaConstants Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java?view=diff&rev=544834&r1=544833&r2=544834 ============================================================================== --- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java (original) +++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java Wed Jun 6 06:18:49 2007 @@ -19,7 +19,6 @@ */ package org.apache.directory.server.core.subtree; -import org.apache.directory.server.core.subtree.SubentryService; import org.apache.directory.server.core.unit.AbstractAdminTestCase; import org.apache.directory.shared.ldap.constants.SchemaConstants; import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException; @@ -133,7 +132,7 @@ // -------------------------------------------------------------------- Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" ); - Attribute collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + Attribute collectiveAttributeSubentries = marked.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -144,7 +143,7 @@ Attributes unmarked = results.get( "cn=unmarked,ou=system" ); assertNull( "cn=unmarked,ou=system should not be marked", unmarked - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); } @@ -168,25 +167,25 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = interceptors.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" ); - collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = partitions.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes services = results.get( "ou=services,ou=configuration,ou=system" ); - collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = services.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -196,20 +195,20 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes groups = results.get( "ou=groups,ou=system" ); - assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=groups,ou=system should not be marked", groups.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes admin = results.get( "uid=admin,ou=system" ); - assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "uid=admin,ou=system should not be marked", admin.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" ); assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); } @@ -225,25 +224,25 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = interceptors.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" ); - collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = partitions.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes services = results.get( "ou=services,ou=configuration,ou=system" ); - collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = services.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -253,20 +252,20 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes groups = results.get( "ou=groups,ou=system" ); - assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=groups,ou=system should not be marked", groups.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes admin = results.get( "uid=admin,ou=system" ); - assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "uid=admin,ou=system should not be marked", admin.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" ); assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); // -------------------------------------------------------------------- // Now modify the subentry by introducing an exclusion @@ -284,19 +283,19 @@ // -------------------------------------------------------------------- configuration = results.get( "ou=configuration,ou=system" ); - collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = interceptors.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); partitions = results.get( "ou=partitions,ou=configuration,ou=system" ); - collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = partitions.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -306,23 +305,23 @@ // -------------------------------------------------------------------- system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); groups = results.get( "ou=groups,ou=system" ); - assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=groups,ou=system should not be marked", groups.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); admin = results.get( "uid=admin,ou=system" ); - assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "uid=admin,ou=system should not be marked", admin.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" ); assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); services = results.get( "ou=services,ou=configuration,ou=system" ); - collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = services.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); if ( collectiveAttributeSubentries != null ) { assertEquals( "ou=services,ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries.size() ); @@ -341,25 +340,25 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = interceptors.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" ); - collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = partitions.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes services = results.get( "ou=services,ou=configuration,ou=system" ); - collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = services.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -369,20 +368,20 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes groups = results.get( "ou=groups,ou=system" ); - assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=groups,ou=system should not be marked", groups.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes admin = results.get( "uid=admin,ou=system" ); - assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "uid=admin,ou=system should not be marked", admin.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" ); assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); // -------------------------------------------------------------------- // Now modify the subentry by introducing an exclusion @@ -399,19 +398,19 @@ // -------------------------------------------------------------------- configuration = results.get( "ou=configuration,ou=system" ); - collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = interceptors.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); partitions = results.get( "ou=partitions,ou=configuration,ou=system" ); - collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = partitions.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -421,23 +420,23 @@ // -------------------------------------------------------------------- system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); groups = results.get( "ou=groups,ou=system" ); - assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=groups,ou=system should not be marked", groups.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); admin = results.get( "uid=admin,ou=system" ); - assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "uid=admin,ou=system should not be marked", admin.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" ); assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); services = results.get( "ou=services,ou=configuration,ou=system" ); - collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = services.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); if ( collectiveAttributeSubentries != null ) { assertEquals( "ou=services,ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries.size() ); @@ -458,14 +457,14 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); if ( collectiveAttributeSubentries != null ) { assertEquals( "ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries.size() ); } Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = interceptors.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); if ( collectiveAttributeSubentries != null ) { assertEquals( "ou=interceptors,ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries @@ -473,31 +472,31 @@ } Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" ); - collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = partitions.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); if ( collectiveAttributeSubentries != null ) { assertEquals( "ou=partitions,ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries.size() ); } Attributes services = results.get( "ou=services,ou=configuration,ou=system" ); - collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = services.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); if ( collectiveAttributeSubentries != null ) { assertEquals( "ou=services,ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries.size() ); } Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes admin = results.get( "uid=admin,ou=system" ); - assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "uid=admin,ou=system should not be marked", admin.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" ); assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); } @@ -514,25 +513,25 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=newname,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = interceptors.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=newname,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" ); - collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = partitions.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=newname,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes services = results.get( "ou=services,ou=configuration,ou=system" ); - collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = services.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=newname,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -542,20 +541,20 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes groups = results.get( "ou=groups,ou=system" ); - assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=groups,ou=system should not be marked", groups.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes admin = results.get( "uid=admin,ou=system" ); - assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "uid=admin,ou=system should not be marked", admin.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" ); assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); } @@ -573,31 +572,31 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = interceptors.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" ); - collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = partitions.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes services = results.get( "ou=services,ou=configuration,ou=system" ); - collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = services.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" ); - collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = marked.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -607,24 +606,24 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes groups = results.get( "ou=groups,ou=system" ); - assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=groups,ou=system should not be marked", groups.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes admin = results.get( "uid=admin,ou=system" ); - assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "uid=admin,ou=system should not be marked", admin.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" ); assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes unmarked = results.get( "cn=unmarked,ou=configuration,ou=system" ); assertNull( "cn=unmarked,ou=configuration,ou=system should not be marked", unmarked - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); // -------------------------------------------------------------------- // Now destry one of the marked/unmarked and rename to deleted entry @@ -636,7 +635,7 @@ unmarked = results.get( "cn=unmarked,ou=configuration,ou=system" ); assertNull( "cn=unmarked,ou=configuration,ou=system should not be marked", unmarked - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); assertNull( results.get( "cn=marked,ou=configuration,ou=system" ) ); // -------------------------------------------------------------------- @@ -648,7 +647,7 @@ assertNull( results.get( "cn=unmarked,ou=configuration,ou=system" ) ); marked = results.get( "cn=marked,ou=configuration,ou=system" ); assertNotNull( marked ); - collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = marked.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -668,31 +667,31 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = interceptors.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" ); - collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = partitions.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes services = results.get( "ou=services,ou=configuration,ou=system" ); - collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = services.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" ); - collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = marked.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -702,24 +701,24 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes groups = results.get( "ou=groups,ou=system" ); - assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=groups,ou=system should not be marked", groups.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes admin = results.get( "uid=admin,ou=system" ); - assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "uid=admin,ou=system should not be marked", admin.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" ); assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes unmarked = results.get( "cn=unmarked,ou=system" ); assertNull( "cn=unmarked,ou=system should not be marked", unmarked - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); // -------------------------------------------------------------------- // Now destry one of the marked/unmarked and rename to deleted entry @@ -731,7 +730,7 @@ unmarked = results.get( "cn=unmarked,ou=system" ); assertNull( "cn=unmarked,ou=system should not be marked", unmarked - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); assertNull( results.get( "cn=marked,ou=configuration,ou=system" ) ); // -------------------------------------------------------------------- @@ -743,7 +742,7 @@ assertNull( results.get( "cn=unmarked,ou=system" ) ); marked = results.get( "cn=marked,ou=configuration,ou=system" ); assertNotNull( marked ); - collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = marked.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -763,31 +762,31 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = interceptors.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" ); - collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = partitions.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes services = results.get( "ou=services,ou=configuration,ou=system" ); - collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = services.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" ); - collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = marked.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); @@ -797,24 +796,24 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes groups = results.get( "ou=groups,ou=system" ); - assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "ou=groups,ou=system should not be marked", groups.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes admin = results.get( "uid=admin,ou=system" ); - assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + assertNull( "uid=admin,ou=system should not be marked", admin.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" ); assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); Attributes unmarked = results.get( "cn=unmarked,ou=system" ); assertNull( "cn=unmarked,ou=system should not be marked", unmarked - .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) ); + .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) ); // -------------------------------------------------------------------- // Now destry one of the marked/unmarked and rename to deleted entry @@ -830,7 +829,7 @@ marked = results.get( "cn=marked,ou=services,ou=configuration,ou=system" ); assertNotNull( marked ); - collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + collectiveAttributeSubentries = marked.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=services,ou=configuration should be marked", collectiveAttributeSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() ); assertEquals( 1, collectiveAttributeSubentries.size() ); Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java?view=diff&rev=544834&r1=544833&r2=544834 ============================================================================== --- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java (original) +++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java Wed Jun 6 06:18:49 2007 @@ -131,7 +131,7 @@ // -------------------------------------------------------------------- Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" ); - Attribute triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES ); + Attribute triggerSubentries = marked.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); @@ -142,7 +142,7 @@ Attributes unmarked = results.get( "cn=unmarked,ou=system" ); assertNull( "cn=unmarked,ou=system should not be marked", unmarked - .get( SubentryService.TRIGGER_SUBENTRIES ) ); + .get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); } @@ -166,13 +166,13 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES ); + Attribute triggerSubentries = configuration.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = interceptors.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); @@ -182,10 +182,10 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); } @@ -200,13 +200,13 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES ); + Attribute triggerSubentries = configuration.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = interceptors.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); @@ -216,10 +216,10 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); // -------------------------------------------------------------------- // Now modify the subentry by introducing an exclusion @@ -236,7 +236,7 @@ // -------------------------------------------------------------------- configuration = results.get( "ou=configuration,ou=system" ); - triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = configuration.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); @@ -246,13 +246,13 @@ // -------------------------------------------------------------------- system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = interceptors.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); if ( triggerSubentries != null ) { assertEquals( "ou=interceptors,ou=configuration,ou=system should not be marked", 0, triggerSubentries.size() ); @@ -272,24 +272,24 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES ); + Attribute triggerSubentries = configuration.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); if ( triggerSubentries != null ) { assertEquals( "ou=configuration,ou=system should not be marked", 0, triggerSubentries.size() ); } Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = interceptors.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); if ( triggerSubentries != null ) { assertEquals( "ou=interceptors,ou=configuration,ou=system should not be marked", 0, triggerSubentries.size() ); } Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); } @@ -305,13 +305,13 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES ); + Attribute triggerSubentries = configuration.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=newname,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = interceptors.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=newname,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); @@ -321,10 +321,10 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); } @@ -341,19 +341,19 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES ); + Attribute triggerSubentries = configuration.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = interceptors.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" ); - triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = marked.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); @@ -363,14 +363,14 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); Attributes unmarked = results.get( "cn=unmarked,ou=configuration,ou=system" ); assertNull( "cn=unmarked,ou=configuration,ou=system should not be marked", unmarked - .get( SubentryService.TRIGGER_SUBENTRIES ) ); + .get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); // -------------------------------------------------------------------- // Now destry one of the marked/unmarked and rename to deleted entry @@ -382,7 +382,7 @@ unmarked = results.get( "cn=unmarked,ou=configuration,ou=system" ); assertNull( "cn=unmarked,ou=configuration,ou=system should not be marked", unmarked - .get( SubentryService.TRIGGER_SUBENTRIES ) ); + .get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); assertNull( results.get( "cn=marked,ou=configuration,ou=system" ) ); // -------------------------------------------------------------------- @@ -394,7 +394,7 @@ assertNull( results.get( "cn=unmarked,ou=configuration,ou=system" ) ); marked = results.get( "cn=marked,ou=configuration,ou=system" ); assertNotNull( marked ); - triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = marked.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); @@ -414,19 +414,19 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES ); + Attribute triggerSubentries = configuration.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = interceptors.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" ); - triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = marked.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); @@ -436,14 +436,14 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); Attributes unmarked = results.get( "cn=unmarked,ou=system" ); assertNull( "cn=unmarked,ou=system should not be marked", unmarked - .get( SubentryService.TRIGGER_SUBENTRIES ) ); + .get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); // -------------------------------------------------------------------- // Now destry one of the marked/unmarked and rename to deleted entry @@ -455,7 +455,7 @@ unmarked = results.get( "cn=unmarked,ou=system" ); assertNull( "cn=unmarked,ou=system should not be marked", unmarked - .get( SubentryService.TRIGGER_SUBENTRIES ) ); + .get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); assertNull( results.get( "cn=marked,ou=configuration,ou=system" ) ); // -------------------------------------------------------------------- @@ -467,7 +467,7 @@ assertNull( results.get( "cn=unmarked,ou=system" ) ); marked = results.get( "cn=marked,ou=configuration,ou=system" ); assertNotNull( marked ); - triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = marked.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); @@ -487,19 +487,19 @@ // -------------------------------------------------------------------- Attributes configuration = results.get( "ou=configuration,ou=system" ); - Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES ); + Attribute triggerSubentries = configuration.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" ); - triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = interceptors.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" ); - triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = marked.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); @@ -509,14 +509,14 @@ // -------------------------------------------------------------------- Attributes system = results.get( "ou=system" ); - assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=system should not be marked", system.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); Attributes users = results.get( "ou=users,ou=system" ); - assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) ); + assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); Attributes unmarked = results.get( "cn=unmarked,ou=system" ); assertNull( "cn=unmarked,ou=system should not be marked", unmarked - .get( SubentryService.TRIGGER_SUBENTRIES ) ); + .get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) ); // -------------------------------------------------------------------- // Now destry one of the marked/unmarked and rename to deleted entry @@ -532,7 +532,7 @@ marked = results.get( "cn=marked,ou=interceptors,ou=configuration,ou=system" ); assertNotNull( marked ); - triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES ); + triggerSubentries = marked.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); assertNotNull( "cn=marked,ou=interceptors,ou=configuration should be marked", triggerSubentries ); assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() ); assertEquals( 1, triggerSubentries.size() ); Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java?view=diff&rev=544834&r1=544833&r2=544834 ============================================================================== --- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java (original) +++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Wed Jun 6 06:18:49 2007 @@ -46,6 +46,7 @@ import org.apache.directory.server.core.invocation.InvocationStack; import org.apache.directory.server.core.partition.PartitionNexus; import org.apache.directory.server.schema.registries.AttributeTypeRegistry; +import org.apache.directory.shared.ldap.constants.SchemaConstants; import org.apache.directory.shared.ldap.message.AttributeImpl; import org.apache.directory.shared.ldap.message.ServerSearchResult; import org.apache.directory.shared.ldap.name.LdapDN; @@ -68,8 +69,6 @@ /** The service name */ public static final String NAME = "collectiveAttributeService"; - public static final String COLLECTIVE_ATTRIBUTE_SUBENTRIES = "collectiveAttributeSubentries"; - public static final String EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES_OID = "2.5.18.0"; public static final String EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES = "excludeAllCollectiveAttributes"; @@ -118,8 +117,9 @@ */ private void addCollectiveAttributes( LdapDN normName, Attributes entry, String[] retAttrs ) throws NamingException { - Attributes entryWithCAS = nexus.lookup( new LookupOperationContext( normName, new String[] { COLLECTIVE_ATTRIBUTE_SUBENTRIES } ) ); - Attribute caSubentries = entryWithCAS.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + Attributes entryWithCAS = nexus.lookup( new LookupOperationContext( normName, new String[] { + SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT } ) ); + Attribute caSubentries = entryWithCAS.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); /* * If there are no collective attribute subentries referenced Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?view=diff&rev=544834&r1=544833&r2=544834 ============================================================================== --- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java (original) +++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java Wed Jun 6 06:18:49 2007 @@ -95,24 +95,22 @@ public static final String AC_AREA = "accessControlSpecificArea"; public static final String AC_INNERAREA = "accessControlInnerArea"; - public static final String AC_SUBENTRIES = "accessControlSubentries"; + //public static final String AC_SUBENTRIES = "accessControlSubentries"; public static final String SCHEMA_AREA = "subschemaAdminSpecificArea"; public static final String COLLECTIVE_AREA = "collectiveAttributeSpecificArea"; public static final String COLLECTIVE_INNERAREA = "collectiveAttributeInnerArea"; - public static final String COLLECTIVE_ATTRIBUTE_SUBENTRIES = "collectiveAttributeSubentries"; public static final String TRIGGER_AREA = "triggerExecutionSpecificArea"; public static final String TRIGGER_INNERAREA = "triggerExecutionInnerArea"; - public static final String TRIGGER_SUBENTRIES = "triggerExecutionSubentries"; public static final String[] SUBENTRY_OPATTRS = { - AC_SUBENTRIES, + SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT, SchemaConstants.SUBSCHEMA_SUBENTRY_AT, - COLLECTIVE_ATTRIBUTE_SUBENTRIES, - TRIGGER_SUBENTRIES + SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT, + SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT }; private static final Logger log = LoggerFactory.getLogger( SubentryService.class ); @@ -335,10 +333,10 @@ if ( subentry.isAccessControlSubentry() ) { - operational = subentryAttrs.get( AC_SUBENTRIES ); + operational = subentryAttrs.get( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ); if ( operational == null ) { - operational = new AttributeImpl( AC_SUBENTRIES ); + operational = new AttributeImpl( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ); subentryAttrs.put( operational ); } operational.add( subentryDn.toString() ); @@ -355,20 +353,20 @@ } if ( subentry.isCollectiveSubentry() ) { - operational = subentryAttrs.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + operational = subentryAttrs.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); if ( operational == null ) { - operational = new AttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + operational = new AttributeImpl( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); subentryAttrs.put( operational ); } operational.add( subentryDn.toString() ); } if ( subentry.isTriggerSubentry() ) { - operational = subentryAttrs.get( TRIGGER_SUBENTRIES ); + operational = subentryAttrs.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); if ( operational == null ) { - operational = new AttributeImpl( TRIGGER_SUBENTRIES ); + operational = new AttributeImpl( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); subentryAttrs.put( operational ); } operational.add( subentryDn.toString() ); @@ -493,11 +491,11 @@ if ( subentry.isAccessControlSubentry() ) { - operational = entry.get( AC_SUBENTRIES ); + operational = entry.get( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ); if ( operational == null ) { - operational = new AttributeImpl( AC_SUBENTRIES ); + operational = new AttributeImpl( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ); entry.put( operational ); } @@ -519,11 +517,11 @@ if ( subentry.isCollectiveSubentry() ) { - operational = entry.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + operational = entry.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); if ( operational == null ) { - operational = new AttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + operational = new AttributeImpl( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); entry.put( operational ); } @@ -532,11 +530,11 @@ if ( subentry.isTriggerSubentry() ) { - operational = entry.get( TRIGGER_SUBENTRIES ); + operational = entry.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); if ( operational == null ) { - operational = new AttributeImpl( TRIGGER_SUBENTRIES ); + operational = new AttributeImpl( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); entry.put( operational ); } @@ -1137,10 +1135,10 @@ if ( subentry.isAccessControlSubentry() ) { - operational = ( Attribute ) entry.get( AC_SUBENTRIES ).clone(); + operational = ( Attribute ) entry.get( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ).clone(); if ( operational == null ) { - operational = new AttributeImpl( AC_SUBENTRIES ); + operational = new AttributeImpl( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ); operational.add( newName.toString() ); } else @@ -1167,10 +1165,10 @@ } if ( subentry.isCollectiveSubentry() ) { - operational = ( Attribute ) entry.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES ).clone(); + operational = ( Attribute ) entry.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ).clone(); if ( operational == null ) { - operational = new AttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES ); + operational = new AttributeImpl( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ); operational.add( newName.toString() ); } else @@ -1182,10 +1180,10 @@ } if ( subentry.isTriggerSubentry() ) { - operational = ( Attribute ) entry.get( TRIGGER_SUBENTRIES ).clone(); + operational = ( Attribute ) entry.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ).clone(); if ( operational == null ) { - operational = new AttributeImpl( TRIGGER_SUBENTRIES ); + operational = new AttributeImpl( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); operational.add( newName.toString() ); } else @@ -1217,13 +1215,13 @@ if ( subentry.isAccessControlSubentry() ) { - if ( operational.get( AC_SUBENTRIES ) == null ) + if ( operational.get( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ) == null ) { - operational.put( AC_SUBENTRIES, name.toString() ); + operational.put( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT, name.toString() ); } else { - operational.get( AC_SUBENTRIES ).add( name.toString() ); + operational.get( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ).add( name.toString() ); } } if ( subentry.isSchemaSubentry() ) @@ -1239,24 +1237,24 @@ } if ( subentry.isCollectiveSubentry() ) { - if ( operational.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES ) == null ) + if ( operational.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) == null ) { - operational.put( COLLECTIVE_ATTRIBUTE_SUBENTRIES, name.toString() ); + operational.put( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT, name.toString() ); } else { - operational.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES ).add( name.toString() ); + operational.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ).add( name.toString() ); } } if ( subentry.isTriggerSubentry() ) { - if ( operational.get( TRIGGER_SUBENTRIES ) == null ) + if ( operational.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) == null ) { - operational.put( TRIGGER_SUBENTRIES, name.toString() ); + operational.put( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT, name.toString() ); } else { - operational.get( TRIGGER_SUBENTRIES ).add( name.toString() ); + operational.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ).add( name.toString() ); } } Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java?view=diff&rev=544834&r1=544833&r2=544834 ============================================================================== --- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java (original) +++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java Wed Jun 6 06:18:49 2007 @@ -85,12 +85,6 @@ /** the entry trigger attribute string: entryTrigger */ private static final String ENTRY_TRIGGER_ATTR = "entryTriggerSpecification"; - /** - * the multivalued operational attribute used to track the prescriptive - * trigger subentries that apply to an entry - */ - private static final String TRIGGER_SUBENTRIES_ATTR = "triggerExecutionSubentries"; - /** a triggerSpecCache that responds to add, delete, and modify attempts */ private TriggerSpecCache triggerSpecCache; /** a normalizing Trigger Specification parser */ @@ -139,7 +133,7 @@ entry = proxy.lookup( new LookupOperationContext( parentDn ), PartitionNexusProxy.LOOKUP_BYPASS ); } - Attribute subentries = entry.get( TRIGGER_SUBENTRIES_ATTR ); + Attribute subentries = entry.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ); if ( subentries == null ) { return;