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