|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.tools.LDAPSearch
public class LDAPSearch
This class provides a tool that can be used to issue search requests to the Directory Server.
Constructor Summary | |
---|---|
LDAPSearch(java.util.concurrent.atomic.AtomicInteger nextMessageID,
java.io.PrintStream out,
java.io.PrintStream err)
Constructor for the LDAPSearch object. |
Method Summary | |
---|---|
int |
executeSearch(LDAPConnection connection,
java.lang.String baseDN,
java.util.ArrayList<LDAPFilter> filters,
java.util.LinkedHashSet<java.lang.String> attributes,
LDAPSearchOptions searchOptions,
int wrapColumn)
Execute the search based on the specified input parameters. |
java.util.ArrayList<LDAPControl> |
getResponseControls()
Retrieves the set of response controls included in the last search result done message. |
static void |
main(java.lang.String[] args)
The main method for LDAPSearch tool. |
static int |
mainSearch(java.lang.String[] args)
Parses the provided command-line arguments and uses that information to run the ldapsearch tool. |
static int |
mainSearch(java.lang.String[] args,
boolean initializeServer,
java.io.OutputStream outStream,
java.io.OutputStream errStream)
Parses the provided command-line arguments and uses that information to run the ldapsearch tool. |
void |
toLDIF(SearchResultEntryProtocolOp entry,
java.lang.StringBuilder buffer,
int wrapColumn,
boolean typesOnly)
Appends an LDIF representation of the entry to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LDAPSearch(java.util.concurrent.atomic.AtomicInteger nextMessageID, java.io.PrintStream out, java.io.PrintStream err)
nextMessageID
- The message ID counter to use for requests.out
- The print stream to use for standard output.err
- The print stream to use for standard error.Method Detail |
---|
public int executeSearch(LDAPConnection connection, java.lang.String baseDN, java.util.ArrayList<LDAPFilter> filters, java.util.LinkedHashSet<java.lang.String> attributes, LDAPSearchOptions searchOptions, int wrapColumn) throws java.io.IOException, LDAPException
connection
- The connection to use for the search.baseDN
- The base DN for the search request.filters
- The filters to use for the results.attributes
- The attributes to return in the results.searchOptions
- The constraints for the search.wrapColumn
- The column at which to wrap long lines.
java.io.IOException
- If a problem occurs while attempting to communicate
with the Directory Server.
LDAPException
- If the Directory Server returns an error response.public void toLDIF(SearchResultEntryProtocolOp entry, java.lang.StringBuilder buffer, int wrapColumn, boolean typesOnly)
entry
- The entry to be written as LDIF.buffer
- The buffer to which the entry should be appended.wrapColumn
- The column at which long lines should be wrapped.typesOnly
- Indicates whether to include only attribute types
without values.public java.util.ArrayList<LDAPControl> getResponseControls()
public static void main(java.lang.String[] args)
args
- The command-line arguments provided to this program.public static int mainSearch(java.lang.String[] args)
args
- The command-line arguments provided to this program.
public static int mainSearch(java.lang.String[] args, boolean initializeServer, java.io.OutputStream outStream, java.io.OutputStream errStream)
args
- The command-line arguments provided to this
program.initializeServer
- Indicates whether to initialize the server.outStream
- The output stream to use for standard output, or
null
if standard output is not
needed.errStream
- The output stream to use for standard error, or
null
if standard error is not
needed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |