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.types.operation;
018
019
020
021import java.util.List;
022
023import org.opends.server.types.*;
024import org.forgerock.opendj.ldap.ByteString;
025import org.forgerock.opendj.ldap.DN;
026import org.forgerock.opendj.ldap.RDN;
027
028
029/**
030 * This class defines a set of methods that are available for use by
031 * post-response plugins for modify DN operations.  Note that this
032 * interface is intended only to define an API for use by plugins and
033 * is not intended to be implemented by any custom classes.
034 */
035@org.opends.server.types.PublicAPI(
036     stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
037     mayInstantiate=false,
038     mayExtend=false,
039     mayInvoke=true)
040public interface PostResponseModifyDNOperation
041       extends PostResponseOperation
042{
043  /**
044   * Retrieves the raw, unprocessed entry DN as included in the client
045   * request.  The DN that is returned may or may not be a valid DN,
046   * since no validation will have been performed upon it.
047   *
048   * @return  The raw, unprocessed entry DN as included in the client
049   *          request.
050   */
051  ByteString getRawEntryDN();
052
053
054
055  /**
056   * Retrieves the DN of the entry to rename.  This should not be
057   * called by pre-parse plugins because the processed DN will not be
058   * available yet.  Instead, they should call the
059   * <CODE>getRawEntryDN</CODE> method.
060   *
061   * @return  The DN of the entry to rename, or <CODE>null</CODE> if
062   *          the raw entry DN has not yet been processed.
063   */
064  DN getEntryDN();
065
066
067
068  /**
069   * Retrieves the raw, unprocessed newRDN as included in the request
070   * from the client.  This may or may not contain a valid RDN, as no
071   * validation will have been performed on it.
072   *
073   * @return  The raw, unprocessed newRDN as included in the request
074   *          from the client.
075   */
076  ByteString getRawNewRDN();
077
078
079
080  /**
081   * Retrieves the new RDN to use for the entry.  This should not be
082   * called by pre-parse plugins, because the processed newRDN will
083   * not yet be available.  Pre-parse plugins should instead use the
084   * <CODE>getRawNewRDN</CODE> method.
085   *
086   * @return  The new RDN to use for the entry, or <CODE>null</CODE>
087   *          if the raw newRDN has not yet been processed.
088   */
089  RDN getNewRDN();
090
091
092
093  /**
094   * Indicates whether the current RDN value should be removed from
095   * the entry.
096   *
097   * @return  <CODE>true</CODE> if the current RDN value should be
098   *          removed from the entry, or <CODE>false</CODE> if not.
099   */
100  boolean deleteOldRDN();
101
102
103
104  /**
105   * Retrieves the raw, unprocessed newSuperior from the client
106   * request.  This may or may not contain a valid DN, as no
107   * validation will have been performed on it.
108   *
109   * @return  The raw, unprocessed newSuperior from the client
110   *          request, or <CODE>null</CODE> if there is none.
111   */
112  ByteString getRawNewSuperior();
113
114
115
116  /**
117   * Retrieves the newSuperior DN for the entry.  This should not be
118   * called by pre-parse plugins, because the processed DN will not
119   * yet be available at that time.  Instead, they should use the
120   * <CODE>getRawNewSuperior</CODE> method.
121   *
122   * @return  The newSuperior DN for the entry, or <CODE>null</CODE>
123   *          if there is no newSuperior DN for this request or if the
124   *          raw newSuperior has not yet been processed.
125   */
126  DN getNewSuperior();
127
128
129
130  /**
131   * Retrieves the set of modifications applied to attributes of the
132   * target entry in the course of processing this modify DN
133   * operation.  This will include attribute-level changes from the
134   * modify DN itself (e.g., removing old RDN values if deleteOldRDN
135   * is set, or adding new RDN values that don't already exist), but
136   * it may also be used by pre-operation plugins to cause additional
137   * changes in the entry.  In this case, those plugins may add
138   * modifications to this list through the
139   * <CODE>addModification</CODE> method (the list returned from this
140   * method should not be modified directly) if any changes should be
141   * processed in addition to the core modify DN processing.  Backends
142   * may read this list to identify which attribute-level changes were
143   * applied in order to more easily apply updates to attribute
144   * indexes.
145   *
146   * @return  The set of modifications applied to attributes during
147   *          the course of the modify DN processing, or
148   *          <CODE>null</CODE> if that information is not yet
149   *          available (e.g., during pre-parse plugins).
150   */
151  List<Modification> getModifications();
152
153
154
155  /**
156   * Retrieves the current entry, before it is renamed.  This will not
157   * be available to pre-parse plugins or during the conflict
158   * resolution portion of the synchronization processing.
159   *
160   * @return  The current entry, or <CODE>null</CODE> if it is not yet
161   *           available.
162   */
163  Entry getOriginalEntry();
164
165
166
167  /**
168   * Retrieves the new entry, as it will appear after it is renamed.
169   * This will not be  available to pre-parse plugins or during the
170   * conflict resolution portion of the synchronization processing.
171   *
172   * @return  The updated entry, or <CODE>null</CODE> if it is not yet
173   *           available.
174   */
175  Entry getUpdatedEntry();
176}
177