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