From 1df4f51adf614210ca4a9b9728327090ec5ea264 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Fri, 11 Sep 2015 20:33:53 +0000
Subject: [PATCH] OPENDJ-1666 PR-19 CREST-3.0.0 Migration
---
opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Rest2LDAP.java | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Rest2LDAP.java b/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Rest2LDAP.java
index 74d250d..a6e3501 100644
--- a/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Rest2LDAP.java
+++ b/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Rest2LDAP.java
@@ -31,8 +31,8 @@
import java.util.Set;
import java.util.concurrent.TimeUnit;
-import org.forgerock.json.fluent.JsonValue;
-import org.forgerock.json.fluent.JsonValueException;
+import org.forgerock.json.JsonValue;
+import org.forgerock.json.JsonValueException;
import org.forgerock.json.resource.BadRequestException;
import org.forgerock.json.resource.CollectionResourceProvider;
import org.forgerock.json.resource.ResourceException;
@@ -49,11 +49,11 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.Entry;
import org.forgerock.opendj.ldap.EntryNotFoundException;
-import org.forgerock.opendj.ldap.LdapException;
import org.forgerock.opendj.ldap.FailoverLoadBalancingAlgorithm;
import org.forgerock.opendj.ldap.Filter;
import org.forgerock.opendj.ldap.LDAPConnectionFactory;
import org.forgerock.opendj.ldap.LDAPOptions;
+import org.forgerock.opendj.ldap.LdapException;
import org.forgerock.opendj.ldap.LinkedAttribute;
import org.forgerock.opendj.ldap.MultipleEntriesFoundException;
import org.forgerock.opendj.ldap.RDN;
@@ -74,7 +74,6 @@
* collections.
*/
public final class Rest2LDAP {
-
/**
* Indicates whether or not LDAP client connections should use SSL or
* StartTLS.
@@ -715,23 +714,23 @@
}
@Override
- SearchRequest createSearchRequest(final Context c, final DN baseDN, final String resourceId) {
+ SearchRequest createSearchRequest(final RequestState requestState, final DN baseDN, final String resourceId) {
return newSearchRequest(baseDN, SearchScope.SINGLE_LEVEL, Filter.equality(idAttribute
.toString(), resourceId));
}
@Override
- void getLDAPAttributes(final Context c, final Set<String> ldapAttributes) {
+ void getLDAPAttributes(final RequestState requestState, final Set<String> ldapAttributes) {
ldapAttributes.add(idAttribute.toString());
}
@Override
- String getResourceId(final Context c, final Entry entry) {
+ String getResourceId(final RequestState requestState, final Entry entry) {
return entry.parseAttribute(idAttribute).asString();
}
@Override
- void setResourceId(final Context c, final DN baseDN, final String resourceId,
+ void setResourceId(final RequestState requestState, final DN baseDN, final String resourceId,
final Entry entry) throws ResourceException {
if (isServerProvided) {
if (resourceId != null) {
@@ -756,23 +755,23 @@
}
@Override
- SearchRequest createSearchRequest(final Context c, final DN baseDN, final String resourceId) {
+ SearchRequest createSearchRequest(final RequestState requestState, final DN baseDN, final String resourceId) {
return newSearchRequest(baseDN.child(rdn(resourceId)), SearchScope.BASE_OBJECT, Filter
.objectClassPresent());
}
@Override
- void getLDAPAttributes(final Context c, final Set<String> ldapAttributes) {
+ void getLDAPAttributes(final RequestState requestState, final Set<String> ldapAttributes) {
ldapAttributes.add(attribute.toString());
}
@Override
- String getResourceId(final Context c, final Entry entry) {
+ String getResourceId(final RequestState requestState, final Entry entry) {
return entry.parseAttribute(attribute).asString();
}
@Override
- void setResourceId(final Context c, final DN baseDN, final String resourceId,
+ void setResourceId(final RequestState requestState, final DN baseDN, final String resourceId,
final Entry entry) throws ResourceException {
if (resourceId != null) {
entry.setName(baseDN.child(rdn(resourceId)));
@@ -987,10 +986,6 @@
return simple(AttributeDescription.valueOf(attribute));
}
- private static ConnectionFactory configureConnectionFactory(final JsonValue configuration) {
- return configureConnectionFactory(configuration, (ClassLoader) null);
- }
-
private static ConnectionFactory configureConnectionFactory(final JsonValue configuration,
final ClassLoader providerClassLoader) {
// Parse pool parameters,
--
Gitblit v1.10.0