From b362d9da285a8dc1b86db29b945feb3bc245b03b Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Tue, 22 May 2012 16:28:29 +0000
Subject: [PATCH] Checkpoint basic GET functionality, including example gateway for testing.
---
opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/LDAPResource.java | 21 +++++----------------
1 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/LDAPResource.java b/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/LDAPResource.java
index d67d9d4..58fdbc8 100644
--- a/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/LDAPResource.java
+++ b/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/LDAPResource.java
@@ -63,25 +63,13 @@
public class LDAPResource implements Resource {
private final EntryContainer entryContainer;
private final AttributeMapper attributeMapper;
- private final EtagStrategy etagStrategy;
/**
* Creates a new LDAP resource.
- *
- * @param entryContainer
- * The entry container which will be used to interact with the
- * LDAP server.
- * @param etagStrategy
- * The algorithm which should be used to obtain a resource's etag
- * from an entry.
- * @param attributeMapper
- * The attribute mapper.
*/
- public LDAPResource(final EntryContainer entryContainer, final EtagStrategy etagStrategy,
- final AttributeMapper attributeMapper) {
- this.entryContainer = entryContainer;
- this.etagStrategy = etagStrategy;
- this.attributeMapper = attributeMapper;
+ public LDAPResource(final EntryContainer container, final AttributeMapper mapper) {
+ this.entryContainer = container;
+ this.attributeMapper = mapper;
}
/**
@@ -171,7 +159,7 @@
}
public void handleResult(final SearchResultEntry entry) {
- final String revision = etagStrategy.getEtagFromEntry(entry);
+ final String revision = entryContainer.getEtagFromEntry(entry);
final ResultHandler<Map<String, Object>> mapHandler =
new ResultHandler<Map<String, Object>>() {
public void handleErrorResult(
@@ -252,4 +240,5 @@
return requestedLDAPAttributes;
}
}
+
}
--
Gitblit v1.10.0