congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DeleteRequest.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.ldaptive.DeleteRequest
constructor

Best Java code snippets using org.ldaptive.DeleteRequest.<init> (Showing top 13 results out of 315)

origin: org.opensaml/opensaml-storage-impl

/**
 * Executes a {@link DeleteOperation} on the supplied DN.
 * 
 * @param dn to delete
 * 
 * @return response for the delete operation
 * 
 * @throws LdapException if the operation fails
 */
@Nonnull private Response<Void> delete(@Nonnull final String dn) throws LdapException {
  Connection conn = null;
  try {
    conn = connectionFactory.getConnection();
    final DeleteOperation delete = new DeleteOperation(conn);
    return delete.execute(new DeleteRequest(dn));
  } finally {
    conn.close();
  }
}
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

/**
 * Executes the ldap delete operation.
 *
 * @param  cf  connection factory.
 * @param  entryDns  to delete
 *
 * @return  status code
 *
 * @throws  Exception  on any LDAP search error
 */
protected int delete(final ConnectionFactory cf, final String[] entryDns)
 throws Exception
{
 final Connection conn = cf.getConnection();
 conn.open();
 for (String dn : entryDns) {
  final DeleteOperation op = new DeleteOperation(conn);
  op.execute(new DeleteRequest(dn));
  System.out.println(String.format("Deleted entry: %s", dn));
 }
 conn.close();
 return 0;
}
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: com.floragunn/ldaptive

/**
 * Executes the ldap delete operation.
 *
 * @param  cf  connection factory.
 * @param  entryDns  to delete
 *
 * @return  status code
 *
 * @throws  Exception  on any LDAP search error
 */
protected int delete(final ConnectionFactory cf, final String[] entryDns)
 throws Exception
{
 final Connection conn = cf.getConnection();
 conn.open();
 for (String dn : entryDns) {
  final DeleteOperation op = new DeleteOperation(conn);
  op.execute(new DeleteRequest(dn));
  System.out.println(String.format("Deleted entry: %s", dn));
 }
 conn.close();
 return 0;
}
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 the ldap delete operation.
 *
 * @param  cf  connection factory.
 * @param  entryDns  to delete
 *
 * @return  status code
 *
 * @throws  Exception  on any LDAP search error
 */
protected int delete(final ConnectionFactory cf, final String[] entryDns)
 throws Exception
{
 final Connection conn = cf.getConnection();
 conn.open();
 for (String dn : entryDns) {
  final DeleteOperation op = new DeleteOperation(conn);
  op.execute(new DeleteRequest(dn));
  System.out.println(String.format("Deleted entry: %s", dn));
 }
 conn.close();
 return 0;
}
origin: vt-middleware/ldaptive

 @Override
 public Response<Void> delete(final T object)
  throws LdapException
 {
  final String dn = getLdapEntryMapper().mapDn(object);
  final DeleteRequest request = new DeleteRequest(dn);
  try (Connection conn = getConnectionFactory().getConnection()) {
   conn.open();

   final DeleteOperation delete = new DeleteOperation(conn);
   return delete.execute(request);
  }
 }
}
origin: org.jasig.cas/cas-server-support-ldap-core

  /**
   * Execute delete operation boolean.
   *
   * @param connectionFactory the connection factory
   * @param entry             the entry
   * @return the boolean
   * @throws LdapException the ldap exception
   */
  public static boolean executeDeleteOperation(final ConnectionFactory connectionFactory,
                         final LdapEntry entry) throws LdapException {

    try (Connection connection = createConnection(connectionFactory)) {
      final DeleteOperation delete = new DeleteOperation(connection);
      final DeleteRequest request = new DeleteRequest(entry.getDn());
      request.setReferralHandler(new DeleteReferralHandler());
      final Response<Void> res = delete.execute(request);
      return res.getResultCode() == ResultCode.SUCCESS;
    } catch (final LdapException e) {
      LOGGER.error(e.getMessage(), e);
    }
    return false;
  }
}
origin: org.pac4j/pac4j-ldap

@Override
protected void deleteById(final String id) {
  Connection connection = null;
  try {
    connection = connectionFactory.getConnection();
    connection.open();
    final DeleteOperation delete = new DeleteOperation(connection);
    delete.execute(new DeleteRequest(getIdAttribute() + "=" + id + "," + usersDn));
  } catch (final LdapException e) {
    throw new TechnicalException(e);
  } finally {
    if (connection != null) {
      connection.close();
    }
  }
}
origin: vt-middleware/ldaptive

@Override
protected DeleteRequest createReferralRequest(final DeleteRequest request, final LdapURL url)
{
 final DeleteRequest referralRequest = new DeleteRequest();
 referralRequest.setControls(request.getControls());
 referralRequest.setIntermediateResponseHandlers(request.getIntermediateResponseHandlers());
 referralRequest.setReferralHandler(
  new DeleteReferralHandler(getReferralLimit(), getReferralDepth() + 1, getReferralConnectionFactory()));
 if (!url.getEntry().isDefaultBaseDn()) {
  referralRequest.setDn(url.getEntry().getBaseDn());
 } else {
  referralRequest.setDn(request.getDn());
 }
 return referralRequest;
}
origin: org.ldaptive/ldaptive

@Override
protected DeleteRequest createReferralRequest(final DeleteRequest request, final LdapURL url)
{
 final DeleteRequest referralRequest = new DeleteRequest();
 referralRequest.setControls(request.getControls());
 referralRequest.setIntermediateResponseHandlers(request.getIntermediateResponseHandlers());
 referralRequest.setReferralHandler(
  new DeleteReferralHandler(getReferralLimit(), getReferralDepth() + 1, getReferralConnectionFactory()));
 if (!url.getEntry().isDefaultBaseDn()) {
  referralRequest.setDn(url.getEntry().getBaseDn());
 } else {
  referralRequest.setDn(request.getDn());
 }
 return referralRequest;
}
origin: com.floragunn/ldaptive

@Override
protected DeleteRequest createReferralRequest(final DeleteRequest request, final LdapURL url)
{
 final DeleteRequest referralRequest = new DeleteRequest();
 referralRequest.setControls(request.getControls());
 referralRequest.setIntermediateResponseHandlers(request.getIntermediateResponseHandlers());
 referralRequest.setReferralHandler(
  new DeleteReferralHandler(getReferralLimit(), getReferralDepth() + 1, getReferralConnectionFactory()));
 if (!url.getEntry().isDefaultBaseDn()) {
  referralRequest.setDn(url.getEntry().getBaseDn());
 } else {
  referralRequest.setDn(request.getDn());
 }
 return referralRequest;
}
org.ldaptiveDeleteRequest<init>

Javadoc

Default constructor.

Popular methods of DeleteRequest

  • getControls
  • getDn
    Returns the DN to delete.
  • setReferralHandler
  • getIntermediateResponseHandlers
  • getReferralHandler
  • setControls
  • setDn
    Sets the DN to delete.
  • setIntermediateResponseHandlers

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • BoxLayout (javax.swing)
  • JFileChooser (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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