From 8e012da0b6407e65a09520a0a9455a9c63c25819 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 26 Jun 2013 14:43:44 +0000
Subject: [PATCH] InternalClientConnection.java, InternalSearchOperation.java: Used interfaces instead of concrete classes.
---
opends/src/server/org/opends/server/protocols/internal/InternalSearchOperation.java | 22 ++++------------------
opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java | 31 ++++++++++---------------------
2 files changed, 14 insertions(+), 39 deletions(-)
diff --git a/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java b/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
index 4414f35..2882d45 100644
--- a/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
+++ b/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
@@ -27,17 +27,8 @@
*/
package org.opends.server.protocols.internal;
-
-
import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
@@ -60,8 +51,6 @@
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
-
-
/**
* This class defines a pseudo-connection object that can be used for
* performing internal operations.
@@ -2091,7 +2080,7 @@
DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit,
boolean typesOnly, String filterString,
- LinkedHashSet<String> attributes)
+ Set<String> attributes)
throws DirectoryException
{
return processSearch(rawBaseDN, scope, derefPolicy, sizeLimit,
@@ -2133,7 +2122,7 @@
DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit,
boolean typesOnly, String filterString,
- LinkedHashSet<String> attributes,
+ Set<String> attributes,
InternalSearchListener searchListener)
throws DirectoryException
{
@@ -2178,7 +2167,7 @@
DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit,
boolean typesOnly, String filterString,
- LinkedHashSet<String> attributes,
+ Set<String> attributes,
List<Control> controls,
InternalSearchListener searchListener)
throws DirectoryException
@@ -2255,7 +2244,7 @@
DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit,
boolean typesOnly, RawFilter filter,
- LinkedHashSet<String> attributes)
+ Set<String> attributes)
{
return processSearch(rawBaseDN, scope, derefPolicy, sizeLimit,
timeLimit, typesOnly, filter, attributes,
@@ -2292,7 +2281,7 @@
DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit,
boolean typesOnly, RawFilter filter,
- LinkedHashSet<String> attributes,
+ Set<String> attributes,
InternalSearchListener searchListener)
{
return processSearch(rawBaseDN, scope, derefPolicy, sizeLimit,
@@ -2332,7 +2321,7 @@
DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit,
boolean typesOnly, RawFilter filter,
- LinkedHashSet<String> attributes,
+ Set<String> attributes,
List<Control> controls,
InternalSearchListener searchListener)
{
@@ -2401,7 +2390,7 @@
DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit,
boolean typesOnly, SearchFilter filter,
- LinkedHashSet<String> attributes)
+ Set<String> attributes)
{
return processSearch(baseDN, scope, derefPolicy, sizeLimit,
timeLimit, typesOnly, filter, attributes,
@@ -2437,7 +2426,7 @@
DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit,
boolean typesOnly, SearchFilter filter,
- LinkedHashSet<String> attributes,
+ Set<String> attributes,
InternalSearchListener searchListener)
{
return processSearch(baseDN, scope, derefPolicy, sizeLimit,
@@ -2476,7 +2465,7 @@
DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit,
boolean typesOnly, SearchFilter filter,
- LinkedHashSet<String> attributes,
+ Set<String> attributes,
List<Control> controls,
InternalSearchListener searchListener)
{
diff --git a/opends/src/server/org/opends/server/protocols/internal/InternalSearchOperation.java b/opends/src/server/org/opends/server/protocols/internal/InternalSearchOperation.java
index f98084a..d8553f8 100644
--- a/opends/src/server/org/opends/server/protocols/internal/InternalSearchOperation.java
+++ b/opends/src/server/org/opends/server/protocols/internal/InternalSearchOperation.java
@@ -27,27 +27,13 @@
*/
package org.opends.server.protocols.internal;
-
-
-import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.opends.server.api.ClientConnection;
import org.opends.server.core.SearchOperationBasis;
-import org.opends.server.types.ByteString;
-import org.opends.server.types.Control;
-import org.opends.server.types.DN;
-import org.opends.server.types.DereferencePolicy;
-import org.opends.server.types.DirectoryException;
-import org.opends.server.types.RawFilter;
-import org.opends.server.types.SearchFilter;
-import org.opends.server.types.SearchResultEntry;
-import org.opends.server.types.SearchResultReference;
-import org.opends.server.types.SearchScope;
-
-
+import org.opends.server.types.*;
/**
* This class defines a subclass of the core search operation that is
@@ -71,7 +57,7 @@
private LinkedList<SearchResultEntry> entryList;
/** The set of search references returned for this search. */
- private LinkedList<SearchResultReference> referenceList;
+ private List<SearchResultReference> referenceList;
@@ -179,7 +165,7 @@
List<Control> requestControls, DN baseDN,
SearchScope scope, DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit, boolean typesOnly,
- SearchFilter filter, LinkedHashSet<String> attributes,
+ SearchFilter filter, Set<String> attributes,
InternalSearchListener searchListener)
{
super(internalConnection, operationID, messageID, requestControls,
@@ -262,7 +248,7 @@
* search, or <CODE>null</CODE> if a custom internal search
* listener is to be used.
*/
- public LinkedList<SearchResultReference> getSearchReferences()
+ public List<SearchResultReference> getSearchReferences()
{
return referenceList;
}
--
Gitblit v1.10.0