See: Description
| Package | Description |
|---|---|
| org.forgerock.opendj.io |
Classes and interfaces providing I/O functionality.
|
| org.forgerock.opendj.ldap |
Classes and interfaces for core types including connections, entries, and
attributes.
|
| org.forgerock.opendj.ldap.controls |
Classes and interfaces for common LDAP controls.
|
| org.forgerock.opendj.ldap.requests |
Classes and interfaces for core LDAP requests.
|
| org.forgerock.opendj.ldap.responses |
Classes and interfaces for core LDAP responses.
|
| org.forgerock.opendj.ldap.schema |
Classes and interfaces for constructing and querying LDAP schemas.
|
| org.forgerock.opendj.ldap.spi |
Interfaces and classes for service providers.
|
| org.forgerock.opendj.ldif |
Classes and interfaces for reading and writing LDIF.
|
| org.forgerock.opendj.security |
An LDAP based security provider having the name "OpenDJ" and exposing an LDAP/LDIF based
KeyStore service. |
// Create an LDIF writer which will write the search results to stdout.
final LDIFEntryWriter writer = new LDIFEntryWriter(System.out);
Connection connection = null;
try
{
// Connect and bind to the server.
final LDAPConnectionFactory factory = new LDAPConnectionFactory("localhost", 1389);
connection = factory.getConnection();
connection.bind(userName, password);
// Read the entries and output them as LDIF.
final ConnectionEntryReader reader = connection.search(baseDN, scope, filter, attributes);
while (reader.hasNext())
{
if (reader.isEntry())
{
// Got an entry.
final SearchResultEntry entry = reader.readEntry();
writer.writeComment("Search result entry: " + entry.getName().toString());
writer.writeEntry(entry);
}
else
{
// Got a continuation reference.
final SearchResultReference ref = reader.readReference();
writer.writeComment("Search result reference: " + ref.getURIs().toString());
}
}
writer.flush();
}
catch (final Exception e)
{
// Handle exceptions...
System.err.println(e.getMessage());
}
finally
{
if (connection != null)
{
connection.close();
}
}
|
org.forgerock.opendj.ldap.controls.
Copyright © 2017-2020 Wren Security. All Rights Reserved.