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-2015 ForgeRock AS
026 */
027package org.opends.server.types.operation;
028
029
030
031import org.forgerock.opendj.ldap.ByteString;
032
033
034/**
035 * This class defines a set of methods that are available for use by
036 * pre-parse plugins for modify DN operations.  Note that this
037 * interface is intended only to define an API for use by plugins and
038 * is not intended to be implemented by any custom classes.
039 */
040@org.opends.server.types.PublicAPI(
041     stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
042     mayInstantiate=false,
043     mayExtend=false,
044     mayInvoke=true)
045public interface PreParseModifyDNOperation
046       extends PreParseOperation
047{
048  /**
049   * Retrieves the raw, unprocessed entry DN as included in the client
050   * request.  The DN that is returned may or may not be a valid DN,
051   * since no validation will have been performed upon it.
052   *
053   * @return  The raw, unprocessed entry DN as included in the client
054   *          request.
055   */
056  ByteString getRawEntryDN();
057
058
059
060  /**
061   * Specifies the raw, unprocessed entry DN as included in the client
062   * request.  This should only be called by pre-parse plugins.
063   *
064   * @param  rawEntryDN  The raw, unprocessed entry DN as included in
065   *                     the client request.
066   */
067  void setRawEntryDN(ByteString rawEntryDN);
068
069
070
071  /**
072   * Retrieves the raw, unprocessed newRDN as included in the request
073   * from the client.  This may or may not contain a valid RDN, as no
074   * validation will have been performed on it.
075   *
076   * @return  The raw, unprocessed newRDN as included in the request
077   *          from the client.
078   */
079  ByteString getRawNewRDN();
080
081
082
083  /**
084   * Specifies the raw, unprocessed newRDN as included in the request
085   * from the client.  This should only be called by pre-parse plugins
086   * and should not be used in later stages of processing.
087   *
088   * @param  rawNewRDN  The raw, unprocessed newRDN as included in the
089   *                    request from the client.
090   */
091  void setRawNewRDN(ByteString rawNewRDN);
092
093
094
095  /**
096   * Indicates whether the current RDN value should be removed from
097   * the entry.
098   *
099   * @return  <CODE>true</CODE> if the current RDN value should be
100   *          removed from the entry, or <CODE>false</CODE> if not.
101   */
102  boolean deleteOldRDN();
103
104
105
106  /**
107   * Specifies whether the current RDN value should be removed from
108   * the entry.
109   *
110   * @param  deleteOldRDN  Specifies whether the current RDN value
111   *                       should be removed from the entry.
112   */
113  void setDeleteOldRDN(boolean deleteOldRDN);
114
115
116
117  /**
118   * Retrieves the raw, unprocessed newSuperior from the client
119   * request.  This may or may not contain a valid DN, as no
120   * validation will have been performed on it.
121   *
122   * @return  The raw, unprocessed newSuperior from the client
123   *          request, or <CODE>null</CODE> if there is none.
124   */
125  ByteString getRawNewSuperior();
126
127
128
129  /**
130   * Specifies the raw, unprocessed newSuperior for this modify DN
131   * operation, as provided in the request from the client.  This
132   * method should only be called by pre-parse plugins.
133   *
134   * @param  rawNewSuperior  The raw, unprocessed newSuperior as
135   *                         provided in the request from the client.
136   */
137  void setRawNewSuperior(ByteString rawNewSuperior);
138}
139