001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2006-2008 Sun Microsystems, Inc.
025 *      Portions Copyright 2014 ForgeRock AS
026 */
027package org.opends.server.core;
028
029import org.forgerock.opendj.ldap.ByteString;
030import org.opends.server.types.DN;
031import org.opends.server.types.Operation;
032
033/**
034 * This interface defines an operation that may be used to remove an entry from
035 * the Directory Server.
036 */
037public interface DeleteOperation extends Operation
038{
039
040  /**
041   * Retrieves the raw, unprocessed entry DN as included in the client request.
042   * The DN that is returned may or may not be a valid DN, since no validation
043   * will have been performed upon it.
044   *
045   * @return  The raw, unprocessed entry DN as included in the client request.
046   */
047  ByteString getRawEntryDN();
048
049  /**
050   * Specifies the raw, unprocessed entry DN as included in the client request.
051   * This should only be called by pre-parse plugins.  All other code that needs
052   * to set the entry DN should use the <CODE>setEntryDN</CODE> method.
053   *
054   * @param  rawEntryDN  The raw, unprocessed entry DN as included in the client
055   *                     request.
056   */
057  void setRawEntryDN(ByteString rawEntryDN);
058
059  /**
060   * Retrieves the DN of the entry to delete.  This should not be called by
061   * pre-parse plugins because the processed DN will not be available yet.
062   * Instead, they should call the <CODE>getRawEntryDN</CODE> method.
063   *
064   * @return  The DN of the entry to delete, or <CODE>null</CODE> if the raw
065   *          entry DN has not yet been processed.
066   */
067  DN getEntryDN();
068
069  /**
070   * Retrieves the proxied authorization DN for this operation if proxied
071   * authorization has been requested.
072   *
073   * @return  The proxied authorization DN for this operation if proxied
074   *          authorization has been requested, or {@code null} if proxied
075   *          authorization has not been requested.
076   */
077  DN getProxiedAuthorizationDN();
078
079  /**
080   * Set the proxied authorization DN for this operation if proxied
081   * authorization has been requested.
082   *
083   * @param proxiedAuthorizationDN
084   *          The proxied authorization DN for this operation if proxied
085   *          authorization has been requested, or {@code null} if proxied
086   *          authorization has not been requested.
087   */
088  void setProxiedAuthorizationDN(DN proxiedAuthorizationDN);
089
090
091}