@@ -0,0 +1,2574 @@
+/*%0A *  Licensed to the Apache Software Foundation (ASF) under one%0A *  or more contributor license agreements.  See the NOTICE file%0A *  distributed with this work for additional information%0A *  regarding copyright ownership.  The ASF licenses this file%0A *  to you under the Apache License, Version 2.0 (the%0A *  %22License%22); you may not use this file except in compliance%0A *  with the License.  You may obtain a copy of the License at%0A *  %0A *    http://www.apache.org/licenses/LICENSE-2.0%0A *  %0A *  Unless required by applicable law or agreed to in writing,%0A *  software distributed under the License is distributed on an%0A *  %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A *  KIND, either express or implied.  See the License for the%0A *  specific language governing permissions and limitations%0A *  under the License. %0A *  %0A */%0Apackage org.apache.directory.server.core.interceptor.context;%0A%0Aimport org.apache.directory.shared.ldap.name.LdapDN;%0A%0A/**%0A * A ModifyDN context used for Interceptors. It contains all the informations%0A * needed for the modify DN operation, and used by all the interceptors%0A *%0A * @author %3Ca href=%22mailto:dev@directory.apache.org%22%3EApache Directory Project%3C/a%3E%0A * @version $Rev$, $Date$%0A */%0Apublic class ModifyDNServiceContext extends AbstractServiceContext%0A%7B%0A    /** The new DN */%0A    private String newDn;%0A%0A    /** The flag to remove the old DN Attribute  */%0A    private boolean delOldDn;%0A    %0A    /**%0A     * %0A     * Creates a new instance of ModifyDNServiceContext.%0A     *%0A     */%0A    public ModifyDNServiceContext()%0A    %7B%0A    %09super();%0A    %7D%0A%0A    /**%0A     * %0A     * Creates a new instance of ModifyDNServiceContext.%0A     *%0A     */%0A    public ModifyDNServiceContext( LdapDN oldDn, String newDn, boolean delOldDn )%0A    %7B%0A        super( oldDn );%0A        this.newDn = newDn;%0A        this.delOldDn = delOldDn;%0A    %7D%0A%0A    /**%0A     * @return The delete old DN flag%0A     */%0A%09public boolean getDelOldDn() %0A%09%7B%0A%09%09return delOldDn;%0A%09%7D%0A%0A%09/**%0A%09 * Set the flag to delete the old DN%0A%09 * @param delOldDn the flag to set%0A%09 */%0A%09public void setDelOldDn( boolean delOldDn ) %0A%09%7B%0A%09%09this.delOldDn = delOldDn;%0A%09%7D%0A%0A%09/**%0A%09 * @return The new DN%0A%09 */%0A%09public String getNewDn() %0A%09%7B%0A%09%09return newDn;%0A%09%7D%0A%0A%09/**%0A%09 * Set the new DN%0A%09 * @param newDn The new Dn%0A%09 */%0A%09public void setNewDn( String newDn ) %0A%09%7B%0A%09%09this.newDn = newDn;%0A%09%7D%0A%0A%09/**%0A     * @see Object#toString()%0A     */%0A    public String toString()%0A    %7B%0A        return %22ModifyDNContext for old DN '%22 + getDn().getUpName() + %22'%22 +%0A        %22, newDn '%22 + newDn + %22'%22 +%0A        ( delOldDn ? %22, delete old Dn%22 : %22%22 ) ; %0A    %7D%0A%7D%0A

Add a serviceContext for the modifyDn operation