From 7502e11a640c6eb92c4fc7604a4abf31c28745ed Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 20 Jun 2011 11:16:07 +0000
Subject: [PATCH] Fix OPENDJ-206: Add schema reading methods to SchemaBuilder and remove Schema/RootDSE methods from the Connection/AsynchronousConnection APIs
---
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/AbstractAsynchronousConnection.java | 46 +++++-----------------------------------------
1 files changed, 5 insertions(+), 41 deletions(-)
diff --git a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/AbstractAsynchronousConnection.java b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/AbstractAsynchronousConnection.java
index c21f791..e565a14 100644
--- a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/AbstractAsynchronousConnection.java
+++ b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/AbstractAsynchronousConnection.java
@@ -30,9 +30,7 @@
-import static org.forgerock.opendj.ldap.CoreMessages.ERR_NO_SEARCH_RESULT_ENTRIES;
-import static org.forgerock.opendj.ldap.CoreMessages.ERR_UNEXPECTED_SEARCH_RESULT_ENTRIES;
-import static org.forgerock.opendj.ldap.CoreMessages.ERR_UNEXPECTED_SEARCH_RESULT_REFERENCES;
+import static org.forgerock.opendj.ldap.CoreMessages.*;
import static org.forgerock.opendj.ldap.ErrorResultException.newErrorResult;
import java.util.Collection;
@@ -41,7 +39,6 @@
import org.forgerock.opendj.ldap.requests.*;
import org.forgerock.opendj.ldap.responses.*;
-import org.forgerock.opendj.ldap.schema.Schema;
@@ -347,7 +344,10 @@
{
final SearchRequest request = Requests.newSearchRequest(name,
SearchScope.BASE_OBJECT, Filter.getObjectClassPresentFilter());
- request.getAttributes().addAll(attributeDescriptions);
+ if (attributeDescriptions != null)
+ {
+ request.getAttributes().addAll(attributeDescriptions);
+ }
return searchSingleEntry(request, handler);
}
@@ -356,42 +356,6 @@
/**
* {@inheritDoc}
*/
- public FutureResult<RootDSE> readRootDSE(
- final ResultHandler<? super RootDSE> handler)
- throws UnsupportedOperationException, IllegalStateException
- {
- return RootDSE.readRootDSE(this, handler);
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- public FutureResult<Schema> readSchema(final DN name,
- final ResultHandler<? super Schema> handler)
- throws UnsupportedOperationException, IllegalStateException
- {
- return Schema.readSchema(this, name, handler);
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- public FutureResult<Schema> readSchemaForEntry(final DN name,
- final ResultHandler<? super Schema> handler)
- throws UnsupportedOperationException, IllegalStateException
- {
- return Schema.readSchemaForEntry(this, name, handler);
- }
-
-
-
- /**
- * {@inheritDoc}
- */
public FutureResult<Result> search(final SearchRequest request,
final SearchResultHandler handler) throws UnsupportedOperationException,
IllegalStateException, NullPointerException
--
Gitblit v1.10.0