| | |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | private static final String EXPORT_BASE_DN = "dc=replicationChanges"; |
| | | private static final String BASE_DN = "dc=replicationchanges"; |
| | | |
| | | // The base DNs for this backend. |
| | | private DN[] baseDNs; |
| | |
| | | ReplicationServerDomain rc = rsdi.next(); |
| | | |
| | | // Skip containers that are not covered by the include branches. |
| | | baseDN = DN.decode(rc.getBaseDn().toString() + "," + EXPORT_BASE_DN); |
| | | baseDN = DN.decode(rc.getBaseDn().toString() + "," + BASE_DN); |
| | | |
| | | if (includeBranches == null || includeBranches.isEmpty()) |
| | | { |
| | |
| | | try |
| | | { |
| | | AddChangeRecordEntry changeRecord = |
| | | new AddChangeRecordEntry(DN.decode(EXPORT_BASE_DN), |
| | | new AddChangeRecordEntry(DN.decode(BASE_DN), |
| | | attributes); |
| | | ldifWriter.writeChangeRecord(changeRecord); |
| | | } |
| | |
| | | { |
| | | AddChangeRecordEntry changeRecord = |
| | | new AddChangeRecordEntry(DN.decode( |
| | | exportContainer.getBaseDn() + "," + EXPORT_BASE_DN), |
| | | exportContainer.getBaseDn() + "," + BASE_DN), |
| | | attributes); |
| | | ldifWriter.writeChangeRecord(changeRecord); |
| | | } |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | Message message = ERR_BACKEND_EXPORT_ENTRY.get( |
| | | exportContainer.getBaseDn() + "," + EXPORT_BASE_DN, |
| | | exportContainer.getBaseDn() + "," + BASE_DN, |
| | | String.valueOf(e)); |
| | | logError(message); |
| | | } |
| | |
| | | |
| | | dn = DN.decode("puid=" + addMsg.getParentUid() + "," + |
| | | "changeNumber=" + msg.getChangeNumber().toString() + "," + |
| | | msg.getDn() +","+ "dc=replicationChanges"); |
| | | msg.getDn() +","+ BASE_DN); |
| | | |
| | | Map<AttributeType,List<Attribute>> attributes = |
| | | new HashMap<AttributeType,List<Attribute>>(); |
| | |
| | | |
| | | dn = DN.decode("uuid=" + msg.getUniqueId() + "," + |
| | | "changeNumber=" + delMsg.getChangeNumber().toString()+ "," + |
| | | msg.getDn() +","+ "dc=replicationChanges"); |
| | | msg.getDn() +","+ BASE_DN); |
| | | |
| | | DeleteChangeRecordEntry changeRecord = |
| | | new DeleteChangeRecordEntry(dn); |
| | |
| | | |
| | | dn = DN.decode("uuid=" + msg.getUniqueId() + "," + |
| | | "changeNumber=" + msg.getChangeNumber().toString()+ "," + |
| | | msg.getDn() +","+ "dc=replicationChanges"); |
| | | msg.getDn() +","+ BASE_DN); |
| | | op.setInternalOperation(true); |
| | | |
| | | ModifyChangeRecordEntry changeRecord = |
| | |
| | | |
| | | dn = DN.decode("uuid=" + msg.getUniqueId() + "," + |
| | | "changeNumber=" + msg.getChangeNumber().toString()+ "," + |
| | | msg.getDn() +","+ "dc=replicationChanges"); |
| | | msg.getDn() +","+ BASE_DN); |
| | | op.setInternalOperation(true); |
| | | |
| | | ModifyDNChangeRecordEntry changeRecord = |
| | |
| | | else |
| | | { |
| | | // Get the base DN, scope, and filter for the search. |
| | | DN searchBaseDN = searchOperation.getBaseDN(); |
| | | DN searchBaseDN = searchOperation.getBaseDN(); |
| | | SearchScope scope = searchOperation.getScope(); |
| | | SearchFilter filter = searchOperation.getFilter(); |
| | | |
| | | if (entry.matchesBaseAndScope(searchBaseDN, scope) && |
| | | filter.matchesEntry(entry)) |
| | | boolean ms = entry.matchesBaseAndScope(searchBaseDN, scope); |
| | | boolean mf = filter.matchesEntry(entry); |
| | | if ( ms && mf ) |
| | | { |
| | | searchOperation.returnEntry(entry, new LinkedList<Control>()); |
| | | } |
| | |
| | | { |
| | | if (baseDNSet.contains(searchBaseDN)) |
| | | { |
| | | searchOperation.returnEntry( |
| | | new Entry(searchBaseDN, rootObjectclasses, attributes, |
| | | operationalAttributes), |
| | | new LinkedList<Control>()); |
| | | // Get the base DN, scope, and filter for the search. |
| | | SearchScope scope = searchOperation.getScope(); |
| | | SearchFilter filter = searchOperation.getFilter(); |
| | | Entry re = new Entry(searchBaseDN, rootObjectclasses, attributes, |
| | | operationalAttributes); |
| | | |
| | | if (re.matchesBaseAndScope(searchBaseDN, scope) && |
| | | filter.matchesEntry(re)) |
| | | { |
| | | searchOperation.returnEntry(re, new LinkedList<Control>()); |
| | | } |
| | | return; |
| | | } |
| | | else |
| | |
| | | } |
| | | } |
| | | |
| | | // Get the base DN, scope, and filter for the search. |
| | | SearchScope scope = searchOperation.getScope(); |
| | | SearchFilter filter = searchOperation.getFilter(); |
| | | Entry re = new Entry(searchBaseDN, rootObjectclasses, attributes, |
| | | operationalAttributes); |
| | | |
| | | if (re.matchesBaseAndScope(searchBaseDN, scope) && |
| | | filter.matchesEntry(re)) |
| | | { |
| | | searchOperation.returnEntry(re, new LinkedList<Control>()); |
| | | } |
| | | |
| | | // Walk through all entries and send the ones that match. |
| | | Iterator<ReplicationServerDomain> rsdi = server.getCacheIterator(); |
| | | if (rsdi != null) |
| | |
| | | ReplicationServerDomain rsd = rsdi.next(); |
| | | |
| | | // Skip containers that are not covered by the include branches. |
| | | baseDN = DN.decode(rsd.getBaseDn().toString() + "," + EXPORT_BASE_DN); |
| | | baseDN = DN.decode(rsd.getBaseDn().toString() + "," + BASE_DN); |
| | | |
| | | if (searchBaseDN.isDescendantOf(baseDN) || |
| | | searchBaseDN.isAncestorOf(baseDN)) |