| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | PreOperationAddOperation addOperation, boolean performFiltering) |
| | | { |
| | | return fractionalRemoveAttributesFromEntry(fractionalConfig, |
| | | addOperation.getEntryDN().getRDN(), addOperation.getObjectClasses(), |
| | | addOperation.getEntryDN().rdn(), addOperation.getObjectClasses(), |
| | | addOperation.getUserAttributes(), performFiltering); |
| | | } |
| | | |
| | |
| | | */ |
| | | |
| | | boolean inconsistentOperation = false; |
| | | RDN rdn = modifyDNOperation.getEntryDN().getRDN(); |
| | | RDN rdn = modifyDNOperation.getEntryDN().rdn(); |
| | | RDN newRdn = modifyDNOperation.getNewRDN(); |
| | | |
| | | // Go through each attribute of the old RDN |
| | |
| | | { |
| | | DN entryDN = entryToRename.getDN(); |
| | | ModifyDNOperation newOp = renameEntry( |
| | | entryDN, freedDN.getRDN(), freedDN.getParent(), false); |
| | | entryDN, freedDN.rdn(), freedDN.parent(), false); |
| | | |
| | | ResultCode res = newOp.getResultCode(); |
| | | if (res != ResultCode.SUCCESS) |
| | |
| | | RDN currentRDN; |
| | | if (currentDN != null) |
| | | { |
| | | currentRDN = currentDN.getRDN(); |
| | | currentRDN = currentDN.rdn(); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | newSuperior = entryDN.getParent(); |
| | | newSuperior = entryDN.parent(); |
| | | } |
| | | |
| | | //If we could not find the new parent entry, we missed this entry |
| | |
| | | // stop the processing. |
| | | if (newSuperior == null) |
| | | { |
| | | markConflictEntry(op, currentDN, currentDN.getParent().concat(newRDN)); |
| | | markConflictEntry(op, currentDN, currentDN.parent().child(newRDN)); |
| | | numUnresolvedNamingConflicts.incrementAndGet(); |
| | | return true; |
| | | } |
| | | |
| | | DN newDN = newSuperior.concat(newRDN); |
| | | DN newDN = newSuperior.child(newRDN); |
| | | |
| | | if (currentDN == null) |
| | | { |
| | |
| | | addConflict(msg); |
| | | |
| | | String conflictRDN = |
| | | generateConflictRDN(entryUUID, op.getEntryDN().getRDN().toString()); |
| | | msg.setDN(DN.decode(conflictRDN + "," + getBaseDNString())); |
| | | generateConflictRDN(entryUUID, op.getEntryDN().rdn().toString()); |
| | | msg.setDN(DN.valueOf(conflictRDN + "," + getBaseDNString())); |
| | | // reset the parent entryUUID so that the check done is the |
| | | // handleConflict phase does not fail. |
| | | msg.setParentEntryUUID(null); |
| | |
| | | } |
| | | else |
| | | { |
| | | msg.setDN(DN.decode(msg.getDN().getRDN() + "," + parentDn)); |
| | | msg.setDN(DN.valueOf(msg.getDN().rdn() + "," + parentDn)); |
| | | numResolvedNamingConflicts.incrementAndGet(); |
| | | } |
| | | return false; |
| | |
| | | addConflict(msg); |
| | | String conflictRDN = |
| | | generateConflictRDN(entryUUID, msg.getDN().toNormalizedString()); |
| | | msg.setDN(DN.decode(conflictRDN)); |
| | | msg.setDN(DN.valueOf(conflictRDN)); |
| | | numUnresolvedNamingConflicts.incrementAndGet(); |
| | | return false; |
| | | } |
| | |
| | | */ |
| | | private RDN generateDeleteConflictDn(String entryUUID, DN dn) |
| | | { |
| | | String newRDN = "entryuuid=" + entryUUID + "+" + dn.getRDN(); |
| | | String newRDN = "entryuuid=" + entryUUID + "+" + dn.rdn(); |
| | | try |
| | | { |
| | | return RDN.decode(newRDN); |
| | |
| | | { |
| | | try |
| | | { |
| | | DN eclConfigEntryDN = DN.decode("cn=external changeLog," + config.dn()); |
| | | DN eclConfigEntryDN = DN.valueOf("cn=external changeLog," + config.dn()); |
| | | if (DirectoryServer.getConfigHandler().entryExists(eclConfigEntryDN)) |
| | | { |
| | | DirectoryServer.getConfigHandler().deleteEntry(eclConfigEntryDN, null); |
| | |
| | | { |
| | | // no ECL config provided hence create a default one |
| | | // create the default one |
| | | DN eclConfigEntryDN = DN.decode("cn=external changelog," + configDn); |
| | | DN eclConfigEntryDN = DN.valueOf("cn=external changelog," + configDn); |
| | | if (!DirectoryServer.getConfigHandler().entryExists(eclConfigEntryDN)) |
| | | { |
| | | // no entry exist yet for the ECL config for this domain |