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