Codota Logo
org.ldaptive.ext
Code IndexAdd Codota to your IDE (free)

How to use org.ldaptive.ext

Best Java code snippets using org.ldaptive.ext (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: com.floragunn/ldaptive

/**
 * Creates a new merge request.
 *
 * @param  entry  to merge into the LDAP
 */
public MergeRequest(final LdapEntry entry)
{
 setEntry(entry);
}
origin: com.floragunn/ldaptive

/**
 * Creates a new merge request.
 *
 * @param  entry  to merge into the LDAP
 * @param  delete  whether the supplied entry should be deleted
 */
public MergeRequest(final LdapEntry entry, final boolean delete)
{
 setEntry(entry);
 setDeleteEntry(delete);
}
origin: org.opensaml/opensaml-storage-impl

/**
 * Executes a {@link MergeOperation} with the supplied entry.
 * 
 * @param entry to merge
 * 
 * @return response for the merge operation
 * 
 * @throws LdapException if the operation fails
 */
@Nonnull private Response<Void> merge(@Nonnull final LdapEntry entry) throws LdapException {
  Connection conn = null;
  try {
    conn = connectionFactory.getConnection();
    final MergeOperation merge = new MergeOperation(conn);
    final MergeRequest request = new MergeRequest(entry);
    request.setIncludeAttributes(entry.getAttributeNames());
    return merge.execute(request);
  } finally {
    conn.close();
  }
}
origin: com.floragunn/ldaptive

throws LdapException
final LdapEntry sourceEntry = request.getEntry();
Response<Void> response;
 final SearchOperation search = new SearchOperation(getConnection());
 searchResponse = search.execute(
  SearchRequest.newObjectScopeSearchRequest(sourceEntry.getDn(), request.getSearchAttributes()));
} catch (LdapException e) {
 if (e.getResultCode() != ResultCode.NO_SUCH_OBJECT) {
 if (request.getDeleteEntry()) {
  logger.info("target entry does not exist, no delete performed for request {}", request);
  response = new Response<>(null, null);
 } else {
  response = add(request, sourceEntry);
} else if (request.getDeleteEntry()) {
 response = delete(request, sourceEntry);
} else {
 response = modify(request, sourceEntry, searchResponse.getResult().getEntry());
origin: vt-middleware/ldaptive

 @Override
 public String toString()
 {
  return
   String.format(
    "[%s@%d::ldapEntry=%s, deleteEntry=%s, searchAttributes=%s, " +
    "includeAttributes=%s, excludeAttributes=%s, controls=%s, " +
    "referralHandler=%s, intermediateResponseHandlers=%s]",
    getClass().getName(),
    hashCode(),
    ldapEntry,
    deleteEntry,
    Arrays.toString(searchAttrs),
    Arrays.toString(includeAttrs),
    Arrays.toString(excludeAttrs),
    Arrays.toString(getControls()),
    getReferralHandler(),
    Arrays.toString(getIntermediateResponseHandlers()));
 }
}
origin: vt-middleware/ldaptive

@Override
public Response<Void> merge(final T object)
 throws LdapException
{
 final LdapEntry entry = new LdapEntry();
 getLdapEntryMapper().map(object, entry);
 final MergeRequest request = new MergeRequest(entry);
 try (Connection conn = getConnectionFactory().getConnection()) {
  conn.open();
  final MergeOperation merge = new MergeOperation(conn);
  return merge.execute(request);
 }
}
origin: com.floragunn/ldaptive

 /**
  * Executes a {@link DeleteOperation} for the supplied entry.
  *
  * @param  request  merge request
  * @param  entry  to delete from the LDAP
  *
  * @return  response of the delete operation
  *
  * @throws  LdapException  if an error occurs executing the deleting operation
  */
 protected Response<Void> delete(final MergeRequest request, final LdapEntry entry)
  throws LdapException
 {
  Response<Void> response;
  final DeleteOperation delete = new DeleteOperation(getConnection());
  response = delete.execute(new DeleteRequest(entry.getDn()));
  logger.info("delete entry {} for request {}", entry, request);
  return response;
 }
}
origin: org.ldaptive/ldaptive

throws LdapException
final LdapEntry sourceEntry = request.getEntry();
final Response<Void> response;
 final SearchOperation search = new SearchOperation(getConnection());
 searchResponse = search.execute(
  SearchRequest.newObjectScopeSearchRequest(sourceEntry.getDn(), request.getSearchAttributes()));
} catch (LdapException e) {
 if (e.getResultCode() != ResultCode.NO_SUCH_OBJECT) {
 if (request.getDeleteEntry()) {
  logger.info("target entry does not exist, no delete performed for request {}", request);
  response = new Response<>(null, null);
 } else {
  response = add(request, sourceEntry);
} else if (request.getDeleteEntry()) {
 response = delete(request, sourceEntry);
} else {
 response = modify(request, sourceEntry, searchResponse.getResult().getEntry());
origin: org.ldaptive/ldaptive

 @Override
 public String toString()
 {
  return
   String.format(
    "[%s@%d::ldapEntry=%s, deleteEntry=%s, searchAttributes=%s, " +
    "includeAttributes=%s, excludeAttributes=%s, controls=%s, " +
    "referralHandler=%s, intermediateResponseHandlers=%s]",
    getClass().getName(),
    hashCode(),
    ldapEntry,
    deleteEntry,
    Arrays.toString(searchAttrs),
    Arrays.toString(includeAttrs),
    Arrays.toString(excludeAttrs),
    Arrays.toString(getControls()),
    getReferralHandler(),
    Arrays.toString(getIntermediateResponseHandlers()));
 }
}
origin: vt-middleware/ldaptive

/**
 * Creates a new merge request.
 *
 * @param  entry  to merge into the LDAP
 * @param  delete  whether the supplied entry should be deleted
 */
public MergeRequest(final LdapEntry entry, final boolean delete)
{
 setEntry(entry);
 setDeleteEntry(delete);
}
origin: org.ldaptive/ldaptive

 /**
  * Executes a {@link DeleteOperation} for the supplied entry.
  *
  * @param  request  merge request
  * @param  entry  to delete from the LDAP
  *
  * @return  response of the delete operation
  *
  * @throws  LdapException  if an error occurs executing the deleting operation
  */
 protected Response<Void> delete(final MergeRequest request, final LdapEntry entry)
  throws LdapException
 {
  final Response<Void> response;
  final DeleteOperation delete = new DeleteOperation(getConnection());
  response = delete.execute(new DeleteRequest(entry.getDn()));
  logger.info("delete entry {} for request {}", entry, request);
  return response;
 }
}
origin: org.ldaptive/ldaptive

/**
 * Creates a new merge request.
 *
 * @param  entry  to merge into the LDAP
 */
public MergeRequest(final LdapEntry entry)
{
 setEntry(entry);
}
origin: vt-middleware/ldaptive

throws LdapException
final LdapEntry sourceEntry = request.getEntry();
final Response<Void> response;
 final SearchOperation search = new SearchOperation(getConnection());
 searchResponse = search.execute(
  SearchRequest.newObjectScopeSearchRequest(sourceEntry.getDn(), request.getSearchAttributes()));
} catch (LdapException e) {
 if (e.getResultCode() != ResultCode.NO_SUCH_OBJECT) {
 if (request.getDeleteEntry()) {
  logger.info("target entry does not exist, no delete performed for request {}", request);
  response = new Response<>(null, null);
 } else {
  response = add(request, sourceEntry);
} else if (request.getDeleteEntry()) {
 response = delete(request, sourceEntry);
} else {
 response = modify(request, sourceEntry, searchResponse.getResult().getEntry());
origin: com.floragunn/ldaptive

 @Override
 public String toString()
 {
  return
   String.format(
    "[%s@%d::ldapEntry=%s, deleteEntry=%s, searchAttributes=%s, " +
    "includeAttributes=%s, excludeAttributes=%s, controls=%s, " +
    "referralHandler=%s, intermediateResponseHandlers=%s]",
    getClass().getName(),
    hashCode(),
    ldapEntry,
    deleteEntry,
    Arrays.toString(searchAttrs),
    Arrays.toString(includeAttrs),
    Arrays.toString(excludeAttrs),
    Arrays.toString(getControls()),
    getReferralHandler(),
    Arrays.toString(getIntermediateResponseHandlers()));
 }
}
origin: org.ldaptive/ldaptive

/**
 * Creates a new merge request.
 *
 * @param  entry  to merge into the LDAP
 * @param  delete  whether the supplied entry should be deleted
 */
public MergeRequest(final LdapEntry entry, final boolean delete)
{
 setEntry(entry);
 setDeleteEntry(delete);
}
origin: vt-middleware/ldaptive

 /**
  * Executes a {@link DeleteOperation} for the supplied entry.
  *
  * @param  request  merge request
  * @param  entry  to delete from the LDAP
  *
  * @return  response of the delete operation
  *
  * @throws  LdapException  if an error occurs executing the deleting operation
  */
 protected Response<Void> delete(final MergeRequest request, final LdapEntry entry)
  throws LdapException
 {
  final Response<Void> response;
  final DeleteOperation delete = new DeleteOperation(getConnection());
  response = delete.execute(new DeleteRequest(entry.getDn()));
  logger.info("delete entry {} for request {}", entry, request);
  return response;
 }
}
origin: vt-middleware/ldaptive

/**
 * Creates a new merge request.
 *
 * @param  entry  to merge into the LDAP
 */
public MergeRequest(final LdapEntry entry)
{
 setEntry(entry);
}
origin: org.ldaptive/ldaptive

/**
 * Executes an {@link AddOperation} for the supplied entry.
 *
 * @param  request  merge request
 * @param  entry  to add to the LDAP
 *
 * @return  response of the add operation
 *
 * @throws  LdapException  if an error occurs executing the add operation
 */
protected Response<Void> add(final MergeRequest request, final LdapEntry entry)
 throws LdapException
{
 final Response<Void> response;
 final AddOperation add = new AddOperation(getConnection());
 response = add.execute(new AddRequest(entry.getDn(), entry.getAttributes()));
 logger.info("added entry {} for request {}", entry, request);
 return response;
}
origin: com.floragunn/ldaptive

/**
 * Executes an {@link AddOperation} for the supplied entry.
 *
 * @param  request  merge request
 * @param  entry  to add to the LDAP
 *
 * @return  response of the add operation
 *
 * @throws  LdapException  if an error occurs executing the add operation
 */
protected Response<Void> add(final MergeRequest request, final LdapEntry entry)
 throws LdapException
{
 Response<Void> response;
 final AddOperation add = new AddOperation(getConnection());
 response = add.execute(new AddRequest(entry.getDn(), entry.getAttributes()));
 logger.info("added entry {} for request {}", entry, request);
 return response;
}
origin: vt-middleware/ldaptive

/**
 * Executes an {@link AddOperation} for the supplied entry.
 *
 * @param  request  merge request
 * @param  entry  to add to the LDAP
 *
 * @return  response of the add operation
 *
 * @throws  LdapException  if an error occurs executing the add operation
 */
protected Response<Void> add(final MergeRequest request, final LdapEntry entry)
 throws LdapException
{
 final Response<Void> response;
 final AddOperation add = new AddOperation(getConnection());
 response = add.execute(new AddRequest(entry.getDn(), entry.getAttributes()));
 logger.info("added entry {} for request {}", entry, request);
 return response;
}
org.ldaptive.ext

Most used classes

  • MergeOperation
    The merge operation performs the LDAP operations necessary to synchronize the data in an LdapEntry w
  • MergeRequest
    Contains the data required to perform a merge operation.
  • ExtendedRequest
    Marker interface for ldap extended requests.
  • ExtendedResponse
    Marker interface for ldap extended responses.
  • ExtendedResponseFactory
    Utility class for creating extended responses.
  • CancelRequest,
  • CancelResponse,
  • PasswordModifyOperation,
  • PasswordModifyRequest,
  • PasswordModifyResponse$GenPasswdHandler,
  • PasswordModifyResponse,
  • WhoAmIOperation,
  • WhoAmIRequest,
  • WhoAmIResponse
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now