You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2010/08/20 21:32:02 UTC
svn commit: r987611 [7/13] - in /directory/apacheds/trunk: ./ all/
core-annotations/ core-api/
core-api/src/main/java/org/apache/directory/server/core/
core-api/src/main/java/org/apache/directory/server/core/event/
core-api/src/main/java/org/apache/dir...
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java Fri Aug 20 19:31:58 2010
@@ -19,6 +19,7 @@
*/
package org.apache.directory.server.core.subtree;
+
import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -41,11 +42,6 @@ import javax.naming.directory.SearchResu
import javax.naming.ldap.LdapContext;
import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.AddResponse;
-import org.apache.directory.ldap.client.api.message.DeleteResponse;
-import org.apache.directory.ldap.client.api.message.ModifyRequest;
-import org.apache.directory.ldap.client.api.message.SearchResponse;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
@@ -59,7 +55,13 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.filter.SearchScope;
import org.apache.directory.shared.ldap.jndi.JndiUtils;
import org.apache.directory.shared.ldap.ldif.LdifUtils;
+import org.apache.directory.shared.ldap.message.AddResponse;
+import org.apache.directory.shared.ldap.message.DeleteResponse;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
+import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
+import org.apache.directory.shared.ldap.message.Response;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
import org.apache.directory.shared.ldap.message.control.Control;
import org.apache.directory.shared.ldap.name.DN;
import org.junit.Ignore;
@@ -72,8 +74,8 @@ import org.junit.runner.RunWith;
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-@RunWith ( FrameworkRunner.class )
-@CreateDS( name="SubentryServiceIT-class" )
+@RunWith(FrameworkRunner.class)
+@CreateDS(name = "SubentryServiceIT-class")
@ApplyLdifs(
{
// A test branch
@@ -82,83 +84,57 @@ import org.junit.runner.RunWith;
"objectClass: domain",
"dc: test",
"",
- // The first level AP
- "dn: dc=AP-A,dc=test,ou=system",
- "objectClass: top",
- "objectClass: domain",
- "administrativeRole: collectiveAttributeSpecificArea",
- "dc: AP-A",
- "",
- // entry A1
- "dn: cn=A1,dc=AP-A,dc=test,ou=system",
- "objectClass: top",
- "objectClass: person",
- "cn: A1",
- "sn: a1",
- "",
- // entry A1-1
- "dn: cn=A1-1,cn=A1,dc=AP-A,dc=test,ou=system",
- "objectClass: top",
- "objectClass: person",
- "cn: A1-1",
- "sn: a1-1",
- "",
- // entry A1-2
- "dn: cn=A1-2,cn=A1,dc=AP-A,dc=test,ou=system",
- "objectClass: top",
- "objectClass: person",
- "cn: A1-2",
- "sn: a1-2",
- "",
- // entry A2
- "dn: cn=A2,dc=AP-A,dc=test,ou=system",
- "objectClass: top",
- "objectClass: person",
- "cn: A2",
- "sn: a2",
- "",
- // entry A2-1
- "dn: cn=A2-1,cn=A2,dc=AP-A,dc=test,ou=system",
- "objectClass: top",
- "objectClass: person",
- "cn: A2-1",
- "sn: a2-1",
- "",
- // The second level AP
- "dn: dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
- "objectClass: top",
- "objectClass: domain",
- "administrativeRole: collectiveAttributeSpecificArea",
- "dc: AP-B",
- "",
- // entry B1
- "dn: cn=B1,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
- "objectClass: top",
- "objectClass: person",
- "cn: B1",
- "sn: b1",
- "",
- // entry B2
- "dn: cn=B2,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
- "objectClass: top",
- "objectClass: person",
- "cn: B2",
- "sn: b2",
- "",
- // The first level non AP
- "dn: dc=not-AP,dc=test,ou=system",
- "objectClass: top",
- "objectClass: domain",
- "dc: not-AP",
- "",
- // An entry under non-AP
- "dn: cn=C,dc=not-AP,dc=test,ou=system",
- "objectClass: top",
- "objectClass: person",
- "cn: C",
- "sn: entry-C",
- ""
- })
+ // The first level AP
+ "dn: dc=AP-A,dc=test,ou=system",
+ "objectClass: top",
+ "objectClass: domain",
+ "administrativeRole: collectiveAttributeSpecificArea",
+ "dc: AP-A",
+ "",
+ // entry A1
+ "dn: cn=A1,dc=AP-A,dc=test,ou=system",
+ "objectClass: top",
+ "objectClass: person",
+ "cn: A1",
+ "sn: a1",
+ "",
+ // entry A1-1
+ "dn: cn=A1-1,cn=A1,dc=AP-A,dc=test,ou=system",
+ "objectClass: top",
+ "objectClass: person",
+ "cn: A1-1",
+ "sn: a1-1",
+ "",
+ // entry A1-2
+ "dn: cn=A1-2,cn=A1,dc=AP-A,dc=test,ou=system", "objectClass: top",
+ "objectClass: person",
+ "cn: A1-2",
+ "sn: a1-2",
+ "",
+ // entry A2
+ "dn: cn=A2,dc=AP-A,dc=test,ou=system", "objectClass: top", "objectClass: person",
+ "cn: A2",
+ "sn: a2",
+ "",
+ // entry A2-1
+ "dn: cn=A2-1,cn=A2,dc=AP-A,dc=test,ou=system", "objectClass: top", "objectClass: person",
+ "cn: A2-1",
+ "sn: a2-1",
+ "",
+ // The second level AP
+ "dn: dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system", "objectClass: top", "objectClass: domain",
+ "administrativeRole: collectiveAttributeSpecificArea", "dc: AP-B",
+ "",
+ // entry B1
+ "dn: cn=B1,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system", "objectClass: top", "objectClass: person", "cn: B1",
+ "sn: b1", "",
+ // entry B2
+ "dn: cn=B2,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system", "objectClass: top", "objectClass: person", "cn: B2",
+ "sn: b2", "",
+ // The first level non AP
+ "dn: dc=not-AP,dc=test,ou=system", "objectClass: top", "objectClass: domain", "dc: not-AP", "",
+ // An entry under non-AP
+ "dn: cn=C,dc=not-AP,dc=test,ou=system", "objectClass: top", "objectClass: person", "cn: C", "sn: entry-C", "" })
public class SubentryServiceIT extends AbstractLdapTestUnit
{
@@ -192,13 +168,9 @@ public class SubentryServiceIT extends A
public Entry getSubentry( String dn ) throws Exception
{
- Entry subentry = LdifUtils.createEntry( new DN( dn ),
- "objectClass: top",
- "objectClass: subentry",
- "objectClass: collectiveAttributeSubentry",
- "subtreeSpecification: { base \"ou=configuration\" }",
- "c-o: Test Org",
- "cn: testsubentry" );
+ Entry subentry = LdifUtils.createEntry( new DN( dn ), "objectClass: top", "objectClass: subentry",
+ "objectClass: collectiveAttributeSubentry", "subtreeSpecification: { base \"ou=configuration\" }",
+ "c-o: Test Org", "cn: testsubentry" );
return subentry;
}
@@ -233,7 +205,8 @@ public class SubentryServiceIT extends A
private void addAdministrativeRole( LdapConnection connection, String dn, String role ) throws Exception
{
- ModifyRequest modifyRequest = new ModifyRequest( new DN( dn ) );
+ ModifyRequest modifyRequest = new ModifyRequestImpl();
+ modifyRequest.setName( new DN( dn ) );
modifyRequest.add( "administrativeRole", role );
connection.modify( modifyRequest );
}
@@ -263,17 +236,17 @@ public class SubentryServiceIT extends A
{
Map<String, Entry> results = new HashMap<String, Entry>();
- Cursor<SearchResponse> responses = connection.search( dn, "(objectClass=*)", SearchScope.SUBTREE, "+", "*" );
+ Cursor<Response> responses = connection.search( dn, "(objectClass=*)", SearchScope.SUBTREE, "+", "*" );
while ( responses.next() )
{
- SearchResponse response = responses.get();
+ Response response = responses.get();
if ( response instanceof SearchResultEntry )
{
- Entry entry = ((SearchResultEntry)response).getEntry();
+ Entry entry = ( ( SearchResultEntry ) response ).getEntry();
- results.put( entry.getDn().getName(), entry );
+ results.put( entry.getDn().getName(), entry );
}
}
@@ -362,12 +335,9 @@ public class SubentryServiceIT extends A
// Add the subentry
Entry subEntryA = LdifUtils.createEntry( new DN( "cn=testsubentryA,dc=AP-A,dc=test,ou=system" ),
- "objectClass: top",
- "objectClass: subentry",
- "objectClass: collectiveAttributeSubentry",
- "subtreeSpecification: {}", // All the entry from the AP, including the AP
- "c-o: Test Org",
- "cn: testsubentryA" );
+ "objectClass: top", "objectClass: subentry", "objectClass: collectiveAttributeSubentry",
+ "subtreeSpecification: {}", // All the entry from the AP, including the AP
+ "c-o: Test Org", "cn: testsubentryA" );
AddResponse response = connection.add( subEntryA );
@@ -382,17 +352,11 @@ public class SubentryServiceIT extends A
String subEntryAPADn = "2.5.4.3=testsubentrya,0.9.2342.19200300.100.1.25=ap-a,0.9.2342.19200300.100.1.25=test,2.5.4.11=system";
String[] modifiedEntriesA = new String[]
- {
- "dc=AP-A,dc=test,ou=system",
- "cn=A1,dc=AP-A,dc=test,ou=system",
- "cn=A1-1,cn=A1,dc=AP-A,dc=test,ou=system",
- "cn=A1-2,cn=A1,dc=AP-A,dc=test,ou=system",
- "cn=A2,dc=AP-A,dc=test,ou=system",
- "cn=A2-1,cn=A2,dc=AP-A,dc=test,ou=system",
- "dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
- "cn=B1,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
- "cn=B2,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
- };
+ { "dc=AP-A,dc=test,ou=system", "cn=A1,dc=AP-A,dc=test,ou=system",
+ "cn=A1-1,cn=A1,dc=AP-A,dc=test,ou=system", "cn=A1-2,cn=A1,dc=AP-A,dc=test,ou=system",
+ "cn=A2,dc=AP-A,dc=test,ou=system", "cn=A2-1,cn=A2,dc=AP-A,dc=test,ou=system",
+ "dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system", "cn=B1,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
+ "cn=B2,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system", };
for ( String dn : modifiedEntriesA )
{
@@ -403,11 +367,7 @@ public class SubentryServiceIT extends A
// Make sure entries not selected by subentryA do not have the mark
// --------------------------------------------------------------------
String[] unchangedEntriesA = new String[]
- {
- "dc=test,ou=system",
- "dc=not-AP,dc=test,ou=system",
- "cn=C,dc=not-AP,dc=test,ou=system",
- };
+ { "dc=test,ou=system", "dc=not-AP,dc=test,ou=system", "cn=C,dc=not-AP,dc=test,ou=system", };
for ( String dn : unchangedEntriesA )
{
@@ -417,12 +377,9 @@ public class SubentryServiceIT extends A
// Now add another subentry on AP-B
// Add the subentry
Entry subEntryB = LdifUtils.createEntry( new DN( "cn=testsubentryB,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system" ),
- "objectClass: top",
- "objectClass: subentry",
- "objectClass: collectiveAttributeSubentry",
- "subtreeSpecification: {}", // All the entry from the AP, including the AP
- "c-o: Test Org",
- "cn: testsubentryB" );
+ "objectClass: top", "objectClass: subentry", "objectClass: collectiveAttributeSubentry",
+ "subtreeSpecification: {}", // All the entry from the AP, including the AP
+ "c-o: Test Org", "cn: testsubentryB" );
response = connection.add( subEntryB );
@@ -434,14 +391,9 @@ public class SubentryServiceIT extends A
// the subentry A
// --------------------------------------------------------------------
String[] modifiedEntriesAB = new String[]
- {
- "dc=AP-A,dc=test,ou=system",
- "cn=A1,dc=AP-A,dc=test,ou=system",
- "cn=A1-1,cn=A1,dc=AP-A,dc=test,ou=system",
- "cn=A1-2,cn=A1,dc=AP-A,dc=test,ou=system",
- "cn=A2,dc=AP-A,dc=test,ou=system",
- "cn=A2-1,cn=A2,dc=AP-A,dc=test,ou=system",
- };
+ { "dc=AP-A,dc=test,ou=system", "cn=A1,dc=AP-A,dc=test,ou=system",
+ "cn=A1-1,cn=A1,dc=AP-A,dc=test,ou=system", "cn=A1-2,cn=A1,dc=AP-A,dc=test,ou=system",
+ "cn=A2,dc=AP-A,dc=test,ou=system", "cn=A2-1,cn=A2,dc=AP-A,dc=test,ou=system", };
for ( String dn : modifiedEntriesAB )
{
@@ -455,11 +407,8 @@ public class SubentryServiceIT extends A
String subEntryAPBDn = "2.5.4.3=testsubentryb,0.9.2342.19200300.100.1.25=ap-b,2.5.4.3=a2,0.9.2342.19200300.100.1.25=ap-a,0.9.2342.19200300.100.1.25=test,2.5.4.11=system";
String[] modifiedEntriesB = new String[]
- {
- "dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
- "cn=B1,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
- "cn=B2,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
- };
+ { "dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system", "cn=B1,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system",
+ "cn=B2,dc=AP-B,cn=A2,dc=AP-A,dc=test,ou=system", };
for ( String dn : modifiedEntriesB )
{
@@ -470,11 +419,7 @@ public class SubentryServiceIT extends A
// Make sure entries not selected by subentryA do not have the mark
// --------------------------------------------------------------------
String[] unchangedEntriesB = new String[]
- {
- "dc=test,ou=system",
- "dc=not-AP,dc=test,ou=system",
- "cn=C,dc=not-AP,dc=test,ou=system",
- };
+ { "dc=test,ou=system", "dc=not-AP,dc=test,ou=system", "cn=C,dc=not-AP,dc=test,ou=system", };
for ( String dn : unchangedEntriesB )
{
@@ -511,7 +456,8 @@ public class SubentryServiceIT extends A
Entry subEntry = getSubentry( "cn=testsubentry,ou=system" );
AddResponse response = connection.add( subEntry );
- assertTrue( "should never get here: cannot create subentry under regular entries", response.getLdapResult().getResultCode() == ResultCodeEnum.NO_SUCH_ATTRIBUTE );
+ assertTrue( "should never get here: cannot create subentry under regular entries", response.getLdapResult()
+ .getResultCode() == ResultCodeEnum.NO_SUCH_ATTRIBUTE );
addAdministrativeRole( connection, "ou=system", "collectiveAttributeSpecificArea" );
connection.add( subEntry );
@@ -527,13 +473,9 @@ public class SubentryServiceIT extends A
String subEntryDn = "2.5.4.3=testsubentry,2.5.4.11=system";
String[] modifiedEntries = new String[]
- {
- "ou=configuration,ou=system",
- "ou=interceptors,ou=configuration,ou=system",
- "ou=partitions,ou=configuration,ou=system",
- "ou=configuration,ou=system",
- "ou=services,ou=configuration,ou=system"
- };
+ { "ou=configuration,ou=system", "ou=interceptors,ou=configuration,ou=system",
+ "ou=partitions,ou=configuration,ou=system", "ou=configuration,ou=system",
+ "ou=services,ou=configuration,ou=system" };
for ( String dn : modifiedEntries )
{
@@ -544,13 +486,8 @@ public class SubentryServiceIT extends A
// Make sure entries not selected by subentry do not have the mark
// --------------------------------------------------------------------
String[] unchangedEntries = new String[]
- {
- "ou=system",
- "ou=users,ou=system",
- "ou=groups,ou=system",
- "uid=admin,ou=system",
- "prefNodeName=sysPrefRoot,ou=system"
- };
+ { "ou=system", "ou=users,ou=system", "ou=groups,ou=system", "uid=admin,ou=system",
+ "prefNodeName=sysPrefRoot,ou=system" };
for ( String dn : unchangedEntries )
{
@@ -574,7 +511,8 @@ public class SubentryServiceIT extends A
// --------------------------------------------------------------------
Attributes configuration = results.get( "ou=configuration,ou=system" );
- Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+ 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() );
@@ -605,13 +543,16 @@ public class SubentryServiceIT extends A
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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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
@@ -658,13 +599,16 @@ public class SubentryServiceIT extends A
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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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
@@ -674,7 +618,8 @@ public class SubentryServiceIT extends A
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() );
+ assertEquals( "ou=services,ou=configuration,ou=system should not be marked", 0,
+ collectiveAttributeSubentries.size() );
}
}
@@ -692,7 +637,8 @@ public class SubentryServiceIT extends A
// --------------------------------------------------------------------
Attributes configuration = results.get( "ou=configuration,ou=system" );
- Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+ 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() );
@@ -723,13 +669,16 @@ public class SubentryServiceIT extends A
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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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
@@ -775,13 +724,16 @@ public class SubentryServiceIT extends A
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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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
@@ -791,7 +743,8 @@ public class SubentryServiceIT extends A
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() );
+ assertEquals( "ou=services,ou=configuration,ou=system should not be marked", 0,
+ collectiveAttributeSubentries.size() );
}
}
@@ -811,7 +764,8 @@ public class SubentryServiceIT extends A
// --------------------------------------------------------------------
Attributes configuration = results.get( "ou=configuration,ou=system" );
- Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+ Attribute collectiveAttributeSubentries = configuration
+ .get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
if ( collectiveAttributeSubentries != null )
{
@@ -823,8 +777,8 @@ public class SubentryServiceIT extends A
if ( collectiveAttributeSubentries != null )
{
- assertEquals( "ou=interceptors,ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries
- .size() );
+ assertEquals( "ou=interceptors,ou=configuration,ou=system should not be marked", 0,
+ collectiveAttributeSubentries.size() );
}
Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
@@ -832,7 +786,8 @@ public class SubentryServiceIT extends A
if ( collectiveAttributeSubentries != null )
{
- assertEquals( "ou=partitions,ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries.size() );
+ assertEquals( "ou=partitions,ou=configuration,ou=system should not be marked", 0,
+ collectiveAttributeSubentries.size() );
}
Attributes services = results.get( "ou=services,ou=configuration,ou=system" );
@@ -840,17 +795,20 @@ public class SubentryServiceIT extends A
if ( collectiveAttributeSubentries != null )
{
- assertEquals( "ou=services,ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries.size() );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
Attributes users = results.get( "ou=users,ou=system" );
- assertNull( "ou=users,ou=system should not be marked", users.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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
@@ -874,7 +832,8 @@ public class SubentryServiceIT extends A
// --------------------------------------------------------------------
Attributes configuration = results.get( "ou=configuration,ou=system" );
- Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+ 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() );
@@ -905,13 +864,16 @@ public class SubentryServiceIT extends A
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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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
@@ -935,7 +897,8 @@ public class SubentryServiceIT extends A
// --------------------------------------------------------------------
Attributes configuration = results.get( "ou=configuration,ou=system" );
- Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+ 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() );
@@ -972,13 +935,16 @@ public class SubentryServiceIT extends A
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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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
@@ -1018,7 +984,7 @@ public class SubentryServiceIT extends A
@Test
- @Ignore ( "Ignored until DIRSERVER-1223 is fixed" )
+ @Ignore("Ignored until DIRSERVER-1223 is fixed")
public void testEntryMoveWithRdnChange() throws Exception
{
LdapContext sysRoot = getSystemContext( service );
@@ -1033,7 +999,8 @@ public class SubentryServiceIT extends A
// --------------------------------------------------------------------
Attributes configuration = results.get( "ou=configuration,ou=system" );
- Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+ 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() );
@@ -1070,13 +1037,16 @@ public class SubentryServiceIT extends A
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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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
@@ -1116,7 +1086,7 @@ public class SubentryServiceIT extends A
@Test
- @Ignore ( "Ignored until DIRSERVER-1223 is fixed" )
+ @Ignore("Ignored until DIRSERVER-1223 is fixed")
public void testEntryMove() throws Exception
{
LdapContext sysRoot = getSystemContext( service );
@@ -1131,7 +1101,8 @@ public class SubentryServiceIT extends A
// --------------------------------------------------------------------
Attributes configuration = results.get( "ou=configuration,ou=system" );
- Attribute collectiveAttributeSubentries = configuration.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+ 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() );
@@ -1168,13 +1139,16 @@ public class SubentryServiceIT extends A
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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
+ 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
@@ -1206,7 +1180,7 @@ public class SubentryServiceIT extends A
@Test
- @Ignore ( "Ignored until DIRSERVER-1223 is fixed" )
+ @Ignore("Ignored until DIRSERVER-1223 is fixed")
public void testSubentriesControl() throws Exception
{
LdapContext sysRoot = getSystemContext( service );
@@ -1232,7 +1206,8 @@ public class SubentryServiceIT extends A
// except subentries disappear
SubentriesControl ctl = new SubentriesControl();
ctl.setVisibility( true );
- sysRoot.setRequestControls( JndiUtils.toJndiControls( new Control[] { ctl } ) );
+ sysRoot.setRequestControls( JndiUtils.toJndiControls( new Control[]
+ { ctl } ) );
list = sysRoot.search( "", "(objectClass=*)", searchControls );
SearchResult result = list.next();
assertFalse( list.hasMore() );
@@ -1250,7 +1225,8 @@ public class SubentryServiceIT extends A
searchControls.setSearchScope( SearchControls.OBJECT_SCOPE );
Map<String, SearchResult> entries = new HashMap<String, SearchResult>();
- NamingEnumeration<SearchResult> list = sysRoot.search( "cn=testsubentry", "(objectClass=subentry)", searchControls );
+ NamingEnumeration<SearchResult> list = sysRoot.search( "cn=testsubentry", "(objectClass=subentry)",
+ searchControls );
while ( list.hasMore() )
{
Propchange: directory/apacheds/trunk/core-jndi/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/core-jndi:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/core-jndi:980138-980935
-/directory/apacheds/trunk/core-jndi:980025-980137
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java Fri Aug 20 19:31:58 2010
@@ -56,15 +56,15 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.filter.FilterParser;
import org.apache.directory.shared.ldap.filter.SearchScope;
+import org.apache.directory.shared.ldap.message.AddRequest;
import org.apache.directory.shared.ldap.message.AliasDerefMode;
+import org.apache.directory.shared.ldap.message.CompareRequest;
+import org.apache.directory.shared.ldap.message.DeleteRequest;
+import org.apache.directory.shared.ldap.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
+import org.apache.directory.shared.ldap.message.SearchRequest;
+import org.apache.directory.shared.ldap.message.UnbindRequest;
import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.message.internal.InternalAddRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalCompareRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalModifyRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalSearchRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalUnbindRequest;
import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.name.RDN;
import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -85,15 +85,15 @@ public class DefaultCoreSession implemen
private final DirectoryService directoryService;
private final LdapPrincipal authenticatedPrincipal;
private LdapPrincipal authorizedPrincipal;
-
-
+
+
public DefaultCoreSession( LdapPrincipal principal, DirectoryService directoryService )
{
this.directoryService = directoryService;
this.authenticatedPrincipal = principal;
}
-
+
/**
* Set the ignoreRefferal flag for the current operationContext.
*
@@ -111,8 +111,8 @@ public class DefaultCoreSession implemen
opContext.throwReferral();
}
}
-
-
+
+
/**
* {@inheritDoc}
*/
@@ -139,7 +139,7 @@ public class DefaultCoreSession implemen
AddOperationContext addContext = new AddOperationContext( this, entry );
addContext.setLogChange( log );
-
+
OperationManager operationManager = directoryService.getOperationManager();
operationManager.add( addContext );
}
@@ -154,7 +154,7 @@ public class DefaultCoreSession implemen
addContext.setLogChange( log );
setReferralHandling( addContext, ignoreReferral );
-
+
OperationManager operationManager = directoryService.getOperationManager();
operationManager.add( addContext );
}
@@ -163,51 +163,51 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void add( InternalAddRequest addRequest ) throws LdapException
+ public void add( AddRequest addRequest ) throws LdapException
{
add( addRequest, LogChange.TRUE );
}
-
+
/**
* {@inheritDoc}
*/
- public void add( InternalAddRequest addRequest, LogChange log ) throws LdapException
+ public void add( AddRequest addRequest, LogChange log ) throws LdapException
{
AddOperationContext addContext = new AddOperationContext( this, addRequest );
addContext.setLogChange( log );
-
+
OperationManager operationManager = directoryService.getOperationManager();
try
{
operationManager.add( addContext );
}
- catch( LdapException e )
+ catch ( LdapException e )
{
- addRequest.getResultResponse().addAll( addContext.getResponseControls() );
+ addRequest.getResultResponse().addAllControls( addContext.getResponseControls() );
throw e;
}
- addRequest.getResultResponse().addAll( addContext.getResponseControls() );
+ addRequest.getResultResponse().addAllControls( addContext.getResponseControls() );
}
-
+
private Value<?> convertToValue( String oid, Object value ) throws LdapException
{
Value<?> val = null;
-
+
AttributeType attributeType = directoryService.getSchemaManager().lookupAttributeTypeRegistry( oid );
-
+
// make sure we add the request controls to operation
if ( attributeType.getSyntax().isHumanReadable() )
{
if ( value instanceof String )
{
- val = new StringValue( attributeType, (String)value );
+ val = new StringValue( attributeType, ( String ) value );
}
else if ( value instanceof byte[] )
{
- val = new StringValue( attributeType, StringTools.utf8ToString( (byte[])value ) );
+ val = new StringValue( attributeType, StringTools.utf8ToString( ( byte[] ) value ) );
}
else
{
@@ -218,31 +218,30 @@ public class DefaultCoreSession implemen
{
if ( value instanceof String )
{
- val = new BinaryValue( attributeType, StringTools.getBytesUtf8( (String)value ) );
+ val = new BinaryValue( attributeType, StringTools.getBytesUtf8( ( String ) value ) );
}
else if ( value instanceof byte[] )
{
- val = new BinaryValue( attributeType, (byte[])value );
+ val = new BinaryValue( attributeType, ( byte[] ) value );
}
else
{
throw new LdapException( I18n.err( I18n.ERR_309, oid ) );
}
}
-
+
return val;
}
+
/**
* {@inheritDoc}
*/
public boolean compare( DN dn, String oid, Object value ) throws LdapException
{
OperationManager operationManager = directoryService.getOperationManager();
-
- return operationManager.compare(
- new CompareOperationContext( this, dn, oid,
- convertToValue( oid, value ) ) );
+
+ return operationManager.compare( new CompareOperationContext( this, dn, oid, convertToValue( oid, value ) ) );
}
@@ -251,12 +250,11 @@ public class DefaultCoreSession implemen
*/
public boolean compare( DN dn, String oid, Object value, boolean ignoreReferral ) throws LdapException
{
- CompareOperationContext compareContext =
- new CompareOperationContext( this, dn, oid,
- convertToValue( oid, value ) );
-
+ CompareOperationContext compareContext = new CompareOperationContext( this, dn, oid,
+ convertToValue( oid, value ) );
+
setReferralHandling( compareContext, ignoreReferral );
-
+
OperationManager operationManager = directoryService.getOperationManager();
return operationManager.compare( compareContext );
}
@@ -288,7 +286,7 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void delete( DN dn, boolean ignoreReferral ) throws LdapException
+ public void delete( DN dn, boolean ignoreReferral ) throws LdapException
{
delete( dn, ignoreReferral, LogChange.TRUE );
}
@@ -300,7 +298,7 @@ public class DefaultCoreSession implemen
public void delete( DN dn, boolean ignoreReferral, LogChange log ) throws LdapException
{
DeleteOperationContext deleteContext = new DeleteOperationContext( this, dn );
-
+
deleteContext.setLogChange( log );
setReferralHandling( deleteContext, ignoreReferral );
@@ -365,7 +363,7 @@ public class DefaultCoreSession implemen
{
return authenticatedPrincipal;
}
-
+
return authorizedPrincipal;
}
@@ -408,8 +406,8 @@ public class DefaultCoreSession implemen
// TODO Auto-generated method stub
return true;
}
-
-
+
+
/**
* TODO - perhaps we should just use a flag that is calculated on creation
* of this session
@@ -418,7 +416,7 @@ public class DefaultCoreSession implemen
*/
public boolean isAdministrator()
{
- String normName = getEffectivePrincipal().getName();
+ String normName = getEffectivePrincipal().getName();
return normName.equals( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
}
@@ -439,7 +437,7 @@ public class DefaultCoreSession implemen
{
return true;
}
-
+
// TODO fix this so it checks groups
return false;
}
@@ -455,7 +453,7 @@ public class DefaultCoreSession implemen
ListOperationContext listContext = new ListOperationContext( this, dn, returningAttributes );
listContext.setAliasDerefMode( aliasDerefMode );
-
+
return operationManager.list( listContext );
}
@@ -472,7 +470,7 @@ public class DefaultCoreSession implemen
listContext.setSizeLimit( sizeLimit );
listContext.setTimeLimit( timeLimit );
listContext.setAliasDerefMode( aliasDerefMode );
-
+
return operationManager.list( listContext );
}
@@ -496,7 +494,7 @@ public class DefaultCoreSession implemen
LookupOperationContext lookupContext = new LookupOperationContext( this, dn, attrId );
Entry entry = operationManager.lookup( lookupContext );
-
+
return entry;
}
@@ -519,14 +517,14 @@ public class DefaultCoreSession implemen
{
return;
}
-
+
List<Modification> serverModifications = new ArrayList<Modification>( mods.size() );
-
- for ( Modification mod:mods )
+
+ for ( Modification mod : mods )
{
serverModifications.add( new DefaultModification( directoryService.getSchemaManager(), mod ) );
}
-
+
ModifyOperationContext modifyContext = new ModifyOperationContext( this, dn, serverModifications );
modifyContext.setLogChange( log );
@@ -554,16 +552,16 @@ public class DefaultCoreSession implemen
{
return;
}
-
+
List<Modification> serverModifications = new ArrayList<Modification>( mods.size() );
-
- for ( Modification mod:mods )
+
+ for ( Modification mod : mods )
{
serverModifications.add( new DefaultModification( directoryService.getSchemaManager(), mod ) );
}
ModifyOperationContext modifyContext = new ModifyOperationContext( this, dn, serverModifications );
-
+
setReferralHandling( modifyContext, ignoreReferral );
modifyContext.setLogChange( log );
@@ -610,7 +608,7 @@ public class DefaultCoreSession implemen
{
OperationManager operationManager = directoryService.getOperationManager();
MoveOperationContext moveContext = new MoveOperationContext( this, dn, newParent );
-
+
setReferralHandling( moveContext, ignoreReferral );
moveContext.setLogChange( log );
@@ -630,11 +628,12 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void moveAndRename( DN dn, DN newSuperiorDn, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException
+ public void moveAndRename( DN dn, DN newSuperiorDn, RDN newRdn, boolean deleteOldRdn, LogChange log )
+ throws LdapException
{
- MoveAndRenameOperationContext moveAndRenameContext =
- new MoveAndRenameOperationContext( this, dn, newSuperiorDn, newRdn, deleteOldRdn );
-
+ MoveAndRenameOperationContext moveAndRenameContext = new MoveAndRenameOperationContext( this, dn,
+ newSuperiorDn, newRdn, deleteOldRdn );
+
moveAndRenameContext.setLogChange( log );
OperationManager operationManager = directoryService.getOperationManager();
@@ -645,7 +644,8 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException
+ public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral )
+ throws LdapException
{
moveAndRename( dn, newParent, newRdn, deleteOldRdn, ignoreReferral, LogChange.TRUE );
}
@@ -654,11 +654,13 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws LdapException
+ public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral,
+ LogChange log ) throws LdapException
{
OperationManager operationManager = directoryService.getOperationManager();
- MoveAndRenameOperationContext moveAndRenameContext = new MoveAndRenameOperationContext( this, dn, newParent, newRdn, deleteOldRdn );
-
+ MoveAndRenameOperationContext moveAndRenameContext = new MoveAndRenameOperationContext( this, dn, newParent,
+ newRdn, deleteOldRdn );
+
moveAndRenameContext.setLogChange( log );
setReferralHandling( moveAndRenameContext, ignoreReferral );
@@ -681,11 +683,11 @@ public class DefaultCoreSession implemen
public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException
{
RenameOperationContext renameContext = new RenameOperationContext( this, dn, newRdn, deleteOldRdn );
-
+
renameContext.setLogChange( log );
OperationManager operationManager = directoryService.getOperationManager();
-
+
operationManager.rename( renameContext );
}
@@ -702,11 +704,12 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws LdapException
+ public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log )
+ throws LdapException
{
OperationManager operationManager = directoryService.getOperationManager();
RenameOperationContext renameContext = new RenameOperationContext( this, dn, newRdn, deleteOldRdn );
-
+
renameContext.setLogChange( log );
setReferralHandling( renameContext, ignoreReferral );
@@ -730,24 +733,24 @@ public class DefaultCoreSession implemen
{
OperationManager operationManager = directoryService.getOperationManager();
ExprNode filterNode = null;
-
+
try
- {
- filterNode = (ExprNode)FilterParser.parse( directoryService.getSchemaManager(), filter );
+ {
+ filterNode = ( ExprNode ) FilterParser.parse( directoryService.getSchemaManager(), filter );
}
catch ( ParseException pe )
{
throw new LdapInvalidSearchFilterException( pe.getMessage() );
}
-
- SearchOperationContext searchContext = new SearchOperationContext( this, dn, SearchScope.OBJECT,
- filterNode, null );
- searchContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
+
+ SearchOperationContext searchContext = new SearchOperationContext( this, dn, SearchScope.OBJECT, filterNode,
+ null );
+ searchContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
setReferralHandling( searchContext, ignoreReferrals );
return operationManager.search( searchContext );
}
-
+
/* (non-Javadoc)
* @see org.apache.directory.server.core.CoreSession#search(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.filter.SearchScope, org.apache.directory.shared.ldap.filter.ExprNode, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set)
@@ -757,8 +760,7 @@ public class DefaultCoreSession implemen
{
OperationManager operationManager = directoryService.getOperationManager();
- SearchOperationContext searchContext = new SearchOperationContext( this, dn, scope, filter,
- returningAttributes );
+ SearchOperationContext searchContext = new SearchOperationContext( this, dn, scope, filter, returningAttributes );
searchContext.setAliasDerefMode( aliasDerefMode );
return operationManager.search( searchContext );
@@ -773,12 +775,11 @@ public class DefaultCoreSession implemen
{
OperationManager operationManager = directoryService.getOperationManager();
- SearchOperationContext searchContext = new SearchOperationContext( this, dn, scope, filter,
- returningAttributes );
+ SearchOperationContext searchContext = new SearchOperationContext( this, dn, scope, filter, returningAttributes );
searchContext.setAliasDerefMode( aliasDerefMode );
searchContext.setSizeLimit( sizeLimit );
searchContext.setTimeLimit( timeLimit );
-
+
return operationManager.search( searchContext );
}
@@ -792,7 +793,7 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public boolean compare( InternalCompareRequest compareRequest ) throws LdapException
+ public boolean compare( CompareRequest compareRequest ) throws LdapException
{
CompareOperationContext compareContext = new CompareOperationContext( this, compareRequest );
OperationManager operationManager = directoryService.getOperationManager();
@@ -801,13 +802,13 @@ public class DefaultCoreSession implemen
{
result = operationManager.compare( compareContext );
}
- catch( LdapException e )
+ catch ( LdapException e )
{
- compareRequest.getResultResponse().addAll( compareContext.getResponseControls() );
+ compareRequest.getResultResponse().addAllControls( compareContext.getResponseControls() );
throw e;
}
-
- compareRequest.getResultResponse().addAll( compareContext.getResponseControls() );
+
+ compareRequest.getResultResponse().addAllControls( compareContext.getResponseControls() );
return result;
}
@@ -815,7 +816,7 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void delete( InternalDeleteRequest deleteRequest ) throws LdapException
+ public void delete( DeleteRequest deleteRequest ) throws LdapException
{
delete( deleteRequest, LogChange.TRUE );
}
@@ -824,10 +825,10 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void delete( InternalDeleteRequest deleteRequest, LogChange log ) throws LdapException
+ public void delete( DeleteRequest deleteRequest, LogChange log ) throws LdapException
{
DeleteOperationContext deleteContext = new DeleteOperationContext( this, deleteRequest );
-
+
deleteContext.setLogChange( log );
OperationManager operationManager = directoryService.getOperationManager();
@@ -835,13 +836,13 @@ public class DefaultCoreSession implemen
{
operationManager.delete( deleteContext );
}
- catch( LdapException e )
+ catch ( LdapException e )
{
- deleteRequest.getResultResponse().addAll( deleteContext.getResponseControls() );
+ deleteRequest.getResultResponse().addAllControls( deleteContext.getResponseControls() );
throw e;
}
-
- deleteRequest.getResultResponse().addAll( deleteContext.getResponseControls() );
+
+ deleteRequest.getResultResponse().addAllControls( deleteContext.getResponseControls() );
}
@@ -856,7 +857,7 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void modify( InternalModifyRequest modifyRequest ) throws LdapException
+ public void modify( ModifyRequest modifyRequest ) throws LdapException
{
modify( modifyRequest, LogChange.TRUE );
}
@@ -865,32 +866,32 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void modify( InternalModifyRequest modifyRequest, LogChange log ) throws LdapException
+ public void modify( ModifyRequest modifyRequest, LogChange log ) throws LdapException
{
ModifyOperationContext modifyContext = new ModifyOperationContext( this, modifyRequest );
modifyContext.setLogChange( log );
OperationManager operationManager = directoryService.getOperationManager();
-
+
try
{
operationManager.modify( modifyContext );
}
- catch( LdapException e )
+ catch ( LdapException e )
{
- modifyRequest.getResultResponse().addAll( modifyContext.getResponseControls() );
+ modifyRequest.getResultResponse().addAllControls( modifyContext.getResponseControls() );
throw e;
}
-
- modifyRequest.getResultResponse().addAll( modifyContext.getResponseControls() );
+
+ modifyRequest.getResultResponse().addAllControls( modifyContext.getResponseControls() );
}
/**
* {@inheritDoc}
*/
- public void move( InternalModifyDnRequest modifyDnRequest ) throws LdapException
+ public void move( ModifyDnRequest modifyDnRequest ) throws LdapException
{
move( modifyDnRequest, LogChange.TRUE );
}
@@ -899,32 +900,32 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void move( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
+ public void move( ModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
{
MoveOperationContext moveContext = new MoveOperationContext( this, modifyDnRequest );
-
+
moveContext.setLogChange( log );
OperationManager operationManager = directoryService.getOperationManager();
-
+
try
{
operationManager.move( moveContext );
}
- catch( LdapException e )
+ catch ( LdapException e )
{
- modifyDnRequest.getResultResponse().addAll( moveContext.getResponseControls() );
+ modifyDnRequest.getResultResponse().addAllControls( moveContext.getResponseControls() );
throw e;
}
-
- modifyDnRequest.getResultResponse().addAll( moveContext.getResponseControls() );
+
+ modifyDnRequest.getResultResponse().addAllControls( moveContext.getResponseControls() );
}
/**
* {@inheritDoc}
*/
- public void moveAndRename( InternalModifyDnRequest modifyDnRequest ) throws LdapException
+ public void moveAndRename( ModifyDnRequest modifyDnRequest ) throws LdapException
{
moveAndRename( modifyDnRequest, LogChange.TRUE );
}
@@ -933,32 +934,32 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void moveAndRename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
+ public void moveAndRename( ModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
{
MoveAndRenameOperationContext moveAndRenameContext = new MoveAndRenameOperationContext( this, modifyDnRequest );
moveAndRenameContext.setLogChange( log );
OperationManager operationManager = directoryService.getOperationManager();
-
+
try
{
operationManager.moveAndRename( moveAndRenameContext );
}
- catch( LdapException e )
+ catch ( LdapException e )
{
- modifyDnRequest.getResultResponse().addAll( moveAndRenameContext.getResponseControls() );
+ modifyDnRequest.getResultResponse().addAllControls( moveAndRenameContext.getResponseControls() );
throw e;
}
-
- modifyDnRequest.getResultResponse().addAll( moveAndRenameContext.getResponseControls() );
+
+ modifyDnRequest.getResultResponse().addAllControls( moveAndRenameContext.getResponseControls() );
}
/**
* {@inheritDoc}
*/
- public void rename( InternalModifyDnRequest modifyDnRequest ) throws LdapException
+ public void rename( ModifyDnRequest modifyDnRequest ) throws LdapException
{
rename( modifyDnRequest, LogChange.TRUE );
}
@@ -967,47 +968,47 @@ public class DefaultCoreSession implemen
/**
* {@inheritDoc}
*/
- public void rename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
+ public void rename( ModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
{
RenameOperationContext renameContext = new RenameOperationContext( this, modifyDnRequest );
renameContext.setLogChange( log );
OperationManager operationManager = directoryService.getOperationManager();
-
+
try
{
operationManager.rename( renameContext );
}
- catch( LdapException e )
+ catch ( LdapException e )
{
- modifyDnRequest.getResultResponse().addAll( renameContext.getResponseControls() );
+ modifyDnRequest.getResultResponse().addAllControls( renameContext.getResponseControls() );
throw e;
}
-
- modifyDnRequest.getResultResponse().addAll( renameContext.getResponseControls() );
+
+ modifyDnRequest.getResultResponse().addAllControls( renameContext.getResponseControls() );
}
- public EntryFilteringCursor search( InternalSearchRequest searchRequest ) throws LdapException
+ public EntryFilteringCursor search( SearchRequest searchRequest ) throws LdapException
{
SearchOperationContext searchContext = new SearchOperationContext( this, searchRequest );
OperationManager operationManager = directoryService.getOperationManager();
-
+
EntryFilteringCursor cursor = null;
-
+
try
{
cursor = operationManager.search( searchContext );
}
- catch( LdapException e )
+ catch ( LdapException e )
{
- searchRequest.getResultResponse().addAll( searchContext.getResponseControls() );
+ searchRequest.getResultResponse().addAllControls( searchContext.getResponseControls() );
throw e;
}
-
- searchRequest.getResultResponse().addAll( searchContext.getResponseControls() );
-
+
+ searchRequest.getResultResponse().addAllControls( searchContext.getResponseControls() );
+
return cursor;
}
@@ -1019,7 +1020,7 @@ public class DefaultCoreSession implemen
}
- public void unbind( InternalUnbindRequest unbindRequest )
+ public void unbind( UnbindRequest unbindRequest )
{
// TODO Auto-generated method stub
}
Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/PasswordPolicyConfiguration.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/apacheds-codec-merge/core/src/main/java/org/apache/directory/server/core/authn/PasswordPolicyConfiguration.java:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/authn/PasswordPolicyConfiguration.java:980138-980934
/directory/apacheds/branches/apacheds-replication/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyConfiguration.java:749790-764110
/directory/apacheds/branches/apacheds-schema/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyConfiguration.java:806623-896441
Propchange: directory/apacheds/trunk/http-integration/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/http-integration:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/http-integration:980138-980935
-/directory/apacheds/trunk/http-integration:980025-980137
Propchange: directory/apacheds/trunk/i18n/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/i18n:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/i18n:980138-980935
-/directory/apacheds/trunk/i18n:980025-980137
Propchange: directory/apacheds/trunk/interceptor-kerberos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/interceptor-kerberos:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/interceptor-kerberos:980138-980935
Propchange: directory/apacheds/trunk/jdbm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/jdbm:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm:980138-980935
-/directory/apacheds/trunk/jdbm:980025-980137
Propchange: directory/apacheds/trunk/jdbm-partition/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/jdbm-partition:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition:980138-980935
-/directory/apacheds/trunk/jdbm-partition:980025-980137
Propchange: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,6 +1,7 @@
+/directory/apacheds/branches/apacheds-codec-merge/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:980138-980935
/directory/apacheds/branches/apacheds-replication/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:749790-764110
/directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:806623-810034
/directory/apacheds/branches/apacheds-subtree/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:965203-965686
/directory/apacheds/branches/xdbm-refactoring/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:945827-946347
-/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:498338-580500,806623-894866*,980025-980137
+/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:498338-580500,806623-894866*
Propchange: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,5 +1,7 @@
+/directory/apacheds/branches/apacheds-codec-merge/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:980138-980935
/directory/apacheds/branches/apacheds-replication/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:749790-764110
+/directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:809853-810034
/directory/apacheds/branches/apacheds-subtree/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:965203-965686
/directory/apacheds/branches/xdbm-refactoring/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:945827-946347
-/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:498338-580500,806623-894866,980025-980137
+/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:498338-580500,806623-894866
Propchange: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,6 +1,7 @@
+/directory/apacheds/branches/apacheds-codec-merge/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:980138-980935
/directory/apacheds/branches/apacheds-replication/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:749790-764110
/directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:806623-810034
/directory/apacheds/branches/apacheds-subtree/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:965203-965686
/directory/apacheds/branches/xdbm-refactoring/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:945827-946347
-/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:498338-580500,806623-894866*,980025-980137
+/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:498338-580500,806623-894866*
Propchange: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,6 +1,7 @@
+/directory/apacheds/branches/apacheds-codec-merge/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:980138-980935
/directory/apacheds/branches/apacheds-replication/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:749790-764110
/directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:806623-810034
/directory/apacheds/branches/apacheds-subtree/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:965203-965686
/directory/apacheds/branches/xdbm-refactoring/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:945827-946347
-/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:498338-580500,806623-894866,980025-980137
+/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:498338-580500,806623-894866
Propchange: directory/apacheds/trunk/kerberos-shared/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/kerberos-shared:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/kerberos-shared:980138-980936
-/directory/apacheds/trunk/kerberos-shared:980025-980137
Propchange: directory/apacheds/trunk/kerberos-test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/kerberos-test:982369-987590
/directory/apacheds/branches/apacheds-dnfactory-experiment/kerberos-test:980138-980936
-/directory/apacheds/trunk/kerberos-test:980025-980137
Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java Fri Aug 20 19:31:58 2010
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.client.api;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -32,9 +33,6 @@ import java.util.List;
import org.apache.directory.ldap.client.api.LdapConnection;
import org.apache.directory.ldap.client.api.LdapNetworkConnection;
-import org.apache.directory.ldap.client.api.message.BindResponse;
-import org.apache.directory.ldap.client.api.message.SearchResponse;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
import org.apache.directory.server.annotations.CreateLdapServer;
import org.apache.directory.server.annotations.CreateTransport;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
@@ -46,24 +44,24 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.filter.EqualityNode;
import org.apache.directory.shared.ldap.filter.SearchScope;
+import org.apache.directory.shared.ldap.message.BindResponse;
+import org.apache.directory.shared.ldap.message.Response;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
import org.apache.directory.shared.ldap.schema.SchemaManager;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test the LdapConnection class
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-@RunWith ( FrameworkRunner.class )
-@CreateLdapServer (
- transports =
- {
- @CreateTransport( protocol = "LDAP" ),
- @CreateTransport( protocol = "LDAPS" )
- })
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer(transports =
+ { @CreateTransport(protocol = "LDAP"), @CreateTransport(protocol = "LDAPS") })
public class LdapConnectionTest extends AbstractLdapTestUnit
{
@@ -121,7 +119,7 @@ public class LdapConnectionTest extends
{
connection.close();
}
- catch( IOException ioe )
+ catch ( IOException ioe )
{
fail();
}
@@ -141,7 +139,7 @@ public class LdapConnectionTest extends
@Test
public void testLookup() throws Exception
{
- SearchResponse resp = connection.lookup( ADMIN_DN );
+ Response resp = connection.lookup( ADMIN_DN );
assertNotNull( resp );
Entry entry = ( ( SearchResultEntry ) resp ).getEntry();
@@ -157,14 +155,14 @@ public class LdapConnectionTest extends
@Test
public void searchByEntryUuid() throws Exception
{
- SearchResponse resp = connection.lookup( ADMIN_DN, "+" );
+ Response resp = connection.lookup( ADMIN_DN, "+" );
Entry entry = ( ( SearchResultEntry ) resp ).getEntry();
String uuid = entry.get( SchemaConstants.ENTRY_UUID_AT ).getString();
EqualityNode<String> filter = new EqualityNode<String>( SchemaConstants.ENTRY_UUID_AT, new StringValue( uuid ) );
- Cursor<SearchResponse> cursor = connection.search( ADMIN_DN, filter.toString(), SearchScope.SUBTREE, "+" );
+ Cursor<Response> cursor = connection.search( ADMIN_DN, filter.toString(), SearchScope.SUBTREE, "+" );
cursor.next();
Entry readEntry = ( ( SearchResultEntry ) cursor.get() ).getEntry();
@@ -206,7 +204,7 @@ public class LdapConnectionTest extends
@Test
public void testSearchEmptyDNWithOneLevelScopeAndNoObjectClassPresenceFilter() throws Exception
{
- Cursor<SearchResponse> cursor = connection.search( "", "(objectClass=*)", SearchScope.ONELEVEL, "*", "+" );
+ Cursor<Response> cursor = connection.search( "", "(objectClass=*)", SearchScope.ONELEVEL, "*", "+" );
HashMap<String, Entry> map = new HashMap<String, Entry>();
while ( cursor.next() )
Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java Fri Aug 20 19:31:58 2010
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.client.api;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
@@ -34,7 +35,6 @@ import javax.net.ssl.X509TrustManager;
import org.apache.directory.ldap.client.api.LdapConnection;
import org.apache.directory.ldap.client.api.LdapConnectionConfig;
import org.apache.directory.ldap.client.api.LdapNetworkConnection;
-import org.apache.directory.ldap.client.api.message.BindResponse;
import org.apache.directory.server.annotations.CreateLdapServer;
import org.apache.directory.server.annotations.CreateTransport;
import org.apache.directory.server.annotations.SaslMechanism;
@@ -47,37 +47,28 @@ import org.apache.directory.server.ldap.
import org.apache.directory.server.ldap.handlers.bind.plain.PlainMechanismHandler;
import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
+import org.apache.directory.shared.ldap.message.BindResponse;
import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test the LdapConnection class with SSL enabled
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-@RunWith ( FrameworkRunner.class )
-@CreateLdapServer (
- transports =
- {
- @CreateTransport( protocol = "LDAP" ),
- @CreateTransport( protocol = "LDAPS" )
- },
- saslHost="localhost",
- saslMechanisms =
- {
- @SaslMechanism( name=SupportedSaslMechanisms.PLAIN, implClass=PlainMechanismHandler.class ),
- @SaslMechanism( name=SupportedSaslMechanisms.CRAM_MD5, implClass=CramMd5MechanismHandler.class),
- @SaslMechanism( name=SupportedSaslMechanisms.DIGEST_MD5, implClass=DigestMd5MechanismHandler.class),
- @SaslMechanism( name=SupportedSaslMechanisms.GSSAPI, implClass=GssapiMechanismHandler.class),
- @SaslMechanism( name=SupportedSaslMechanisms.NTLM, implClass=NtlmMechanismHandler.class),
- @SaslMechanism( name=SupportedSaslMechanisms.GSS_SPNEGO, implClass=NtlmMechanismHandler.class)
- },
- extendedOpHandlers =
- {
- StoredProcedureExtendedOperationHandler.class
- })
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer(transports =
+ { @CreateTransport(protocol = "LDAP"), @CreateTransport(protocol = "LDAPS") }, saslHost = "localhost", saslMechanisms =
+ { @SaslMechanism(name = SupportedSaslMechanisms.PLAIN, implClass = PlainMechanismHandler.class),
+ @SaslMechanism(name = SupportedSaslMechanisms.CRAM_MD5, implClass = CramMd5MechanismHandler.class),
+ @SaslMechanism(name = SupportedSaslMechanisms.DIGEST_MD5, implClass = DigestMd5MechanismHandler.class),
+ @SaslMechanism(name = SupportedSaslMechanisms.GSSAPI, implClass = GssapiMechanismHandler.class),
+ @SaslMechanism(name = SupportedSaslMechanisms.NTLM, implClass = NtlmMechanismHandler.class),
+ @SaslMechanism(name = SupportedSaslMechanisms.GSS_SPNEGO, implClass = NtlmMechanismHandler.class) }, extendedOpHandlers =
+ { StoredProcedureExtendedOperationHandler.class })
public class LdapSSLConnectionTest extends AbstractLdapTestUnit
{
private static LdapConnectionConfig config;
@@ -92,10 +83,12 @@ public class LdapSSLConnectionTest exten
{
}
+
public void checkServerTrusted( X509Certificate[] x509Certificates, String s ) throws CertificateException
{
}
+
public X509Certificate[] getAcceptedIssuers()
{
return new X509Certificate[0];
@@ -106,7 +99,8 @@ public class LdapSSLConnectionTest exten
config.setLdapHost( "localhost" );
config.setUseSsl( true );
config.setLdapPort( ldapServer.getPortSSL() );
- config.setTrustManagers( new TrustManager[]{ X509 } );
+ config.setTrustManagers( new TrustManager[]
+ { X509 } );
}