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

org.ldaptive.ad.control.ShowRecycledControl 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 tombstones, deleted-objects, and recycled-objects that match
 * a search filter. See http://msdn.microsoft.com/en-us/library/dd304621.aspx
 *
 * @author  Middleware Services
 */
public class ShowRecycledControl extends AbstractControl implements RequestControl
{

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

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


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


  /**
   * Creates a new show recycled control.
   *
   * @param  critical  whether this control is critical
   */
  public ShowRecycledControl(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