All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ldaptive.ad.control.ShowDeletedControl Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
/* See LICENSE for licensing and NOTICE for copyright. */
package org.ldaptive.ad.control;

import org.ldaptive.LdapUtils;
import org.ldaptive.control.AbstractControl;
import org.ldaptive.control.RequestControl;

/**
 * Request control for active directory servers to include deleted objects that match a search filter. See
 * http://msdn.microsoft.com/en-us/library/cc223326.aspx
 *
 * @author  Middleware Services
 */
public class ShowDeletedControl extends AbstractControl implements RequestControl
{

  /** OID of this control. */
  public static final String OID = "1.2.840.113556.1.4.417";

  /** hash code seed. */
  private static final int HASH_CODE_SEED = 911;


  /** Default constructor. */
  public ShowDeletedControl()
  {
    super(OID);
  }


  /**
   * Creates a new show deleted control.
   *
   * @param  critical  whether this control is critical
   */
  public ShowDeletedControl(final boolean critical)
  {
    super(OID, critical);
  }


  @Override
  public int hashCode()
  {
    return LdapUtils.computeHashCode(HASH_CODE_SEED, getOID(), getCriticality());
  }


  @Override
  public String toString()
  {
    return String.format("[%s@%d::criticality=%s]", getClass().getName(), hashCode(), getCriticality());
  }


  @Override
  public byte[] encode()
  {
    return null;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy