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 2008 Sun Microsystems, Inc.
015 * Portions Copyright 2014-2016 ForgeRock AS.
016 */
017package org.opends.server.types.operation;
018
019
020
021import org.opends.server.types.*;
022import org.forgerock.opendj.ldap.ByteString;
023import org.forgerock.opendj.ldap.DN;
024import org.forgerock.opendj.ldap.RDN;
025
026
027/**
028 * This class defines a set of methods that are available for use by
029 * subordinate modify DN operation plugins.  Note that this interface
030 * is intended only to define an API for use by plugins and is not
031 * intended to be implemented by any custom classes.
032 */
033@org.opends.server.types.PublicAPI(
034     stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
035     mayInstantiate=false,
036     mayExtend=false,
037     mayInvoke=true)
038public interface SubordinateModifyDNOperation
039       extends InProgressOperation
040{
041  /**
042   * Retrieves the raw, unprocessed entry DN as included in the client
043   * request.  The DN that is returned may or may not be a valid DN,
044   * since no validation will have been performed upon it.
045   *
046   * @return  The raw, unprocessed entry DN as included in the client
047   *          request.
048   */
049  ByteString getRawEntryDN();
050
051
052
053  /**
054   * Retrieves the DN of the entry to rename.  This should not be
055   * called by pre-parse plugins because the processed DN will not be
056   * available yet.  Instead, they should call the
057   * {@code getRawEntryDN} method.
058   *
059   * @return  The DN of the entry to rename, or {@code null} if the
060   *          raw entry DN has not yet been processed.
061   */
062  DN getEntryDN();
063
064
065
066  /**
067   * Retrieves the raw, unprocessed newRDN as included in the request
068   * from the client.  This may or may not contain a valid RDN, as no
069   * validation will have been performed on it.
070   *
071   * @return  The raw, unprocessed newRDN as included in the request
072   *          from the client.
073   */
074  ByteString getRawNewRDN();
075
076
077
078  /**
079   * Retrieves the new RDN to use for the entry.  This should not be
080   * called by pre-parse plugins, because the processed newRDN will
081   * not yet be available.  Pre-parse plugins should instead use the
082   * {@code getRawNewRDN} method.
083   *
084   * @return  The new RDN to use for the entry, or {@code null} if the
085   *          raw newRDN has not yet been processed.
086   */
087  RDN getNewRDN();
088
089
090
091  /**
092   * Indicates whether the current RDN value should be removed from
093   * the entry.
094   *
095   * @return  {@code true} if the current RDN value should be removed
096   *          from the entry, or {@code false} if not.
097   */
098  boolean deleteOldRDN();
099
100
101
102  /**
103   * Retrieves the raw, unprocessed newSuperior from the client
104   * request.  This may or may not contain a valid DN, as no
105   * validation will have been performed on it.
106   *
107   * @return  The raw, unprocessed newSuperior from the client
108   *          request, or {@code null} if there is none.
109   */
110  ByteString getRawNewSuperior();
111
112
113
114  /**
115   * Retrieves the newSuperior DN for the entry.  This should not be
116   * called by pre-parse plugins, because the processed DN will not
117   * yet be available at that time.  Instead, they should use the
118   * {@code getRawNewSuperior} method.
119   *
120   * @return  The newSuperior DN for the entry, or {@code null} if
121   *          there is no newSuperior DN for this request or if the
122   *          raw newSuperior has not yet been processed.
123   */
124  DN getNewSuperior();
125
126
127
128  /**
129   * Retrieves the current entry, before it is renamed.  This will not
130   * be available to pre-parse plugins or during the conflict
131   * resolution portion of the synchronization processing.
132   *
133   * @return  The current entry, or {@code null} if it is not yet
134   *           available.
135   */
136  Entry getOriginalEntry();
137
138
139
140  /**
141   * Retrieves the new entry, as it will appear after it is renamed.
142   * This will not be  available to pre-parse plugins or during the
143   * conflict resolution portion of the synchronization processing.
144   *
145   * @return  The updated entry, or {@code null} if it is not yet
146   *           available.
147   */
148  Entry getUpdatedEntry();
149}
150