Tabnine Logo
MergeOperation
Code IndexAdd Tabnine to your IDE (free)

How to use
MergeOperation
in
org.ldaptive.ext

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

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: 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

 final SearchOperation search = new SearchOperation(getConnection());
 searchResponse = search.execute(
  SearchRequest.newObjectScopeSearchRequest(sourceEntry.getDn(), request.getSearchAttributes()));
 } else {
  response = add(request, sourceEntry);
 response = delete(request, sourceEntry);
} else {
 response = modify(request, sourceEntry, searchResponse.getResult().getEntry());
origin: com.floragunn/ldaptive

 final SearchOperation search = new SearchOperation(getConnection());
 searchResponse = search.execute(
  SearchRequest.newObjectScopeSearchRequest(sourceEntry.getDn(), request.getSearchAttributes()));
 } else {
  response = add(request, sourceEntry);
 response = delete(request, sourceEntry);
} else {
 response = modify(request, sourceEntry, searchResponse.getResult().getEntry());
origin: vt-middleware/ldaptive

 final SearchOperation search = new SearchOperation(getConnection());
 searchResponse = search.execute(
  SearchRequest.newObjectScopeSearchRequest(sourceEntry.getDn(), request.getSearchAttributes()));
 } else {
  response = add(request, sourceEntry);
 response = delete(request, sourceEntry);
} else {
 response = modify(request, sourceEntry, searchResponse.getResult().getEntry());
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: 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: 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: 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

 request);
final ModifyOperation modify = new ModifyOperation(getConnection());
response = modify.execute(
 new ModifyRequest(
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;
}
origin: com.floragunn/ldaptive

 request);
final ModifyOperation modify = new ModifyOperation(getConnection());
response = modify.execute(
 new ModifyRequest(
origin: org.ldaptive/ldaptive

 request);
final ModifyOperation modify = new ModifyOperation(getConnection());
response = modify.execute(
 new ModifyRequest(
org.ldaptive.extMergeOperation

Javadoc

The merge operation performs the LDAP operations necessary to synchronize the data in an LdapEntry with it's corresponding entry in the LDAP. The following logic is executed:
  • if the entry does not exist in the LDAP, execute an add
  • if the request is for a delete, execute a delete
  • if the entry exists in the LDAP, execute a modify

LdapEntry#computeModifications(LdapEntry,LdapEntry) is used to determine the list of attribute modifications that are necessary to perform the merge. Either MergeRequest#getIncludeAttributes() or MergeRequest#getExcludeAttributes() will be used, but not both.

Most used methods

  • <init>
    Creates a new merge operation.
  • add
    Executes an AddOperation for the supplied entry.
  • delete
    Executes a DeleteOperation for the supplied entry.
  • execute
  • getConnection
  • modify
    Retrieves the attribute modifications from LdapEntry#computeModifications(LdapEntry,LdapEntry) and e

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JPanel (javax.swing)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now