| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.replication.protocol; |
| | | |
| | |
| | | import org.opends.server.types.AbstractOperation; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.operation.PostOperationModifyDNOperation; |
| | | |
| | | /** |
| | |
| | | { |
| | | try |
| | | { |
| | | String newStringDN = newRDN + "," + newSuperior; |
| | | DN newDN = DN.decode(newStringDN); |
| | | DN newDN; |
| | | if (newSuperior == null) |
| | | { |
| | | DN parentDn = DN.decode(this.getDn()).getParent(); |
| | | newDN = parentDn.concat(RDN.decode(newRDN)); |
| | | } |
| | | else |
| | | { |
| | | String newStringDN = newRDN + "," + newSuperior; |
| | | newDN = DN.decode(newStringDN); |
| | | } |
| | | |
| | | |
| | | if (newDN.isAncestorOf(targetDn)) |
| | | return true; |