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
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2006-2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.core;
028
029 import org.opends.server.types.ByteString;
030 import org.opends.server.types.DN;
031 import 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 */
037 public 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 public abstract 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 public abstract 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 public abstract DN getEntryDN();
068
069 /**
070 * Retrieves the change number that has been assigned to this operation.
071 *
072 * @return The change number that has been assigned to this operation, or -1
073 * if none has been assigned yet or if there is no applicable
074 * synchronization mechanism in place that uses change numbers.
075 */
076 public abstract long getChangeNumber();
077
078 /**
079 * Specifies the change number that has been assigned to this operation by the
080 * synchronization mechanism.
081 *
082 * @param changeNumber The change number that has been assigned to this
083 * operation by the synchronization mechanism.
084 */
085 public abstract void setChangeNumber(long changeNumber);
086
087 /**
088 * Retrieves the proxied authorization DN for this operation if proxied
089 * authorization has been requested.
090 *
091 * @return The proxied authorization DN for this operation if proxied
092 * authorization has been requested, or {@code null} if proxied
093 * authorization has not been requested.
094 */
095 public abstract DN getProxiedAuthorizationDN();
096
097 /**
098 * Set the proxied authorization DN for this operation if proxied
099 * authorization has been requested.
100 *
101 * @param proxiedAuthorizationDN
102 * The proxied authorization DN for this operation if proxied
103 * authorization has been requested, or {@code null} if proxied
104 * authorization has not been requested.
105 */
106 public abstract void setProxiedAuthorizationDN(DN proxiedAuthorizationDN);
107
108
109 }