(CR-4811) Converted opendj3 code to use SearchRequest like API
Requests.java, AbstractRequestImpl.java, SearchRequest.java:
Added to emulate opendj SDK classes.
Augmented the equivalent SDK Requests with some convenience methods, dealing with String/DNs, or String/SearchFilters.
InternalClientConnection.java:
Removed many processSearch() methods.
Only 3 are left:
- processSearch(String baseDN, SearchScope, String filter)
- to be kept
- processSearch(SearchRequest, InternalSearchListener)
- to be kept
- processSearch(ByteString rawBaseDN, SearchScope, DereferenceAliasesPolicy, int sizeLimit, int timeLimit, boolean typesOnly, RawFilter, Set<String> attributes, List<Control> controls, InternalSearchListener)
- Needed by opendj-server3x-adapter, I will get rid of it
For the future, when finally moving to the SDK Filter class, I think there is a little optimization to do. Currently a lot of code is building search filters from static strings, and incurs a parsing cost, but I think it should be possible in many places to statically build filters by using Filter methods like or(), and(), etc. to avoid the cost of parsing the string.